whois 2.6.1 → 2.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/CHANGELOG.md +11 -0
  2. data/lib/whois/definitions/tlds.rb +1 -0
  3. data/lib/whois/record/parser/whois.ati.tn.rb +1 -1
  4. data/lib/whois/record/parser/whois.godaddy.com.rb +0 -4
  5. data/lib/whois/record/parser/whois.markmonitor.com.rb +0 -4
  6. data/lib/whois/record/parser/whois.networksolutions.com.rb +146 -0
  7. data/lib/whois/record/parser/whois.registry.om.rb +1 -1
  8. data/lib/whois/record/parser/whois.sx.rb +124 -0
  9. data/lib/whois/record/parser/whois.ua.rb +70 -10
  10. data/lib/whois/record/scanners/base.rb +19 -6
  11. data/lib/whois/record/scanners/whois.ati.tn.rb +1 -1
  12. data/lib/whois/record/scanners/whois.registry.om.rb +1 -1
  13. data/lib/whois/record/scanners/whois.rnids.rs.rb +11 -11
  14. data/lib/whois/record/scanners/whois.sx.rb +81 -0
  15. data/lib/whois/version.rb +1 -1
  16. data/spec/fixtures/responses/whois.networksolutions.com/property_contacts_short.expected +47 -0
  17. data/spec/fixtures/responses/whois.networksolutions.com/property_contacts_short.txt +61 -0
  18. data/spec/fixtures/responses/whois.networksolutions.com/status_registered.expected +89 -0
  19. data/spec/fixtures/responses/whois.networksolutions.com/status_registered.txt +65 -0
  20. data/spec/fixtures/responses/whois.sx/status_available.expected +55 -0
  21. data/spec/fixtures/responses/whois.sx/status_available.txt +9 -0
  22. data/spec/fixtures/responses/whois.sx/status_registered.expected +85 -0
  23. data/spec/fixtures/responses/whois.sx/status_registered.txt +21 -0
  24. data/spec/fixtures/responses/whois.ua/property_contacts_multiple.expected +107 -0
  25. data/spec/fixtures/responses/whois.ua/property_contacts_multiple.txt +84 -0
  26. data/spec/fixtures/responses/whois.ua/status_available.expected +30 -1
  27. data/spec/fixtures/responses/whois.ua/status_registered.expected +65 -3
  28. data/spec/fixtures/responses/whois.ua/status_registered.txt +10 -9
  29. data/spec/tlds +1 -0
  30. data/spec/whois/record/parser/responses/whois.net.ua/property_contacts_multiple_spec.rb +157 -0
  31. data/spec/whois/record/parser/responses/whois.net.ua/property_nameservers_uppercase_spec.rb +4 -4
  32. data/spec/whois/record/parser/responses/whois.net.ua/status_available_spec.rb +47 -5
  33. data/spec/whois/record/parser/responses/whois.net.ua/status_registered_spec.rb +82 -7
  34. data/spec/whois/record/parser/responses/whois.networksolutions.com/property_contacts_short_spec.rb +77 -0
  35. data/spec/whois/record/parser/responses/whois.networksolutions.com/status_registered_spec.rb +133 -0
  36. data/spec/whois/record/parser/responses/whois.sx/status_available_spec.rb +106 -0
  37. data/spec/whois/record/parser/responses/whois.sx/status_registered_spec.rb +136 -0
  38. data/spec/whois/record/parser/responses/whois.ua/property_contacts_multiple_spec.rb +157 -0
  39. data/spec/whois/record/parser/responses/whois.ua/status_available_spec.rb +43 -1
  40. data/spec/whois/record/parser/responses/whois.ua/status_registered_spec.rb +78 -3
  41. data/whois.gemspec +4 -4
  42. metadata +22 -3
@@ -0,0 +1,77 @@
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.networksolutions.com/property_contacts_short.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.networksolutions.com.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisNetworksolutionsCom, "property_contacts_short.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.networksolutions.com/property_contacts_short.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].organization.should == "mpowers LLC"
31
+ @parser.registrant_contacts[0].address.should == "21010 Southbank St #575"
32
+ @parser.registrant_contacts[0].city.should == "Potomac Falls"
33
+ @parser.registrant_contacts[0].zip.should == "20165"
34
+ @parser.registrant_contacts[0].state.should == "VA"
35
+ @parser.registrant_contacts[0].country_code.should == "US"
36
+ @parser.registrant_contacts[0].phone.should == nil
37
+ @parser.registrant_contacts[0].fax.should == nil
38
+ @parser.registrant_contacts[0].email.should == nil
39
+ end
40
+ end
41
+ describe "#admin_contacts" do
42
+ it do
43
+ @parser.admin_contacts.should be_a(Array)
44
+ @parser.admin_contacts.should have(1).items
45
+ @parser.admin_contacts[0].should be_a(Whois::Record::Contact)
46
+ @parser.admin_contacts[0].type.should == Whois::Record::Contact::TYPE_ADMIN
47
+ @parser.admin_contacts[0].name.should == "mpowers LLC"
48
+ @parser.admin_contacts[0].organization.should == nil
49
+ @parser.admin_contacts[0].address.should == "21010 Southbank St #575"
50
+ @parser.admin_contacts[0].city.should == "Potomac Falls"
51
+ @parser.admin_contacts[0].zip.should == "20165"
52
+ @parser.admin_contacts[0].state.should == "VA"
53
+ @parser.admin_contacts[0].country_code.should == "US"
54
+ @parser.admin_contacts[0].phone.should == "+1.5712832829"
55
+ @parser.admin_contacts[0].fax.should == nil
56
+ @parser.admin_contacts[0].email.should == "michael@mpowers.net"
57
+ end
58
+ end
59
+ describe "#technical_contacts" do
60
+ it do
61
+ @parser.technical_contacts.should be_a(Array)
62
+ @parser.technical_contacts.should have(1).items
63
+ @parser.technical_contacts[0].should be_a(Whois::Record::Contact)
64
+ @parser.technical_contacts[0].type.should == Whois::Record::Contact::TYPE_TECHNICAL
65
+ @parser.technical_contacts[0].name.should == "mpowers LLC"
66
+ @parser.technical_contacts[0].organization.should == nil
67
+ @parser.technical_contacts[0].address.should == "21010 Southbank St #575"
68
+ @parser.technical_contacts[0].city.should == "Potomac Falls"
69
+ @parser.technical_contacts[0].zip.should == "20165"
70
+ @parser.technical_contacts[0].state.should == "VA"
71
+ @parser.technical_contacts[0].country_code.should == "US"
72
+ @parser.technical_contacts[0].phone.should == "+1.5712832829"
73
+ @parser.technical_contacts[0].fax.should == nil
74
+ @parser.technical_contacts[0].email.should == "michael@mpowers.net"
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,133 @@
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.networksolutions.com/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.networksolutions.com.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisNetworksolutionsCom, "status_registered.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.networksolutions.com/status_registered.txt")
20
+ part = Whois::Record::Part.new(:body => File.read(file))
21
+ @parser = klass.new(part)
22
+ end
23
+
24
+ describe "#status" do
25
+ it do
26
+ lambda { @parser.status }.should raise_error(Whois::PropertyNotSupported)
27
+ end
28
+ end
29
+ describe "#available?" do
30
+ it do
31
+ @parser.available?.should == false
32
+ end
33
+ end
34
+ describe "#registered?" do
35
+ it do
36
+ @parser.registered?.should == true
37
+ end
38
+ end
39
+ describe "#created_on" do
40
+ it do
41
+ @parser.created_on.should be_a(Time)
42
+ @parser.created_on.should == Time.parse("1997-06-10")
43
+ end
44
+ end
45
+ describe "#updated_on" do
46
+ it do
47
+ lambda { @parser.updated_on }.should raise_error(Whois::PropertyNotSupported)
48
+ end
49
+ end
50
+ describe "#expires_on" do
51
+ it do
52
+ @parser.expires_on.should be_a(Time)
53
+ @parser.expires_on.should == Time.parse("2014-06-09")
54
+ end
55
+ end
56
+ describe "#registrar" do
57
+ it do
58
+ @parser.registrar.should be_a(Whois::Record::Registrar)
59
+ @parser.registrar.name.should == "Network Solutions"
60
+ @parser.registrar.organization.should == "Network Solutions, LLC"
61
+ @parser.registrar.url.should == "http://www.networksolutions.com/"
62
+ end
63
+ end
64
+ describe "#registrant_contacts" do
65
+ it do
66
+ @parser.registrant_contacts.should be_a(Array)
67
+ @parser.registrant_contacts.should have(1).items
68
+ @parser.registrant_contacts[0].should be_a(Whois::Record::Contact)
69
+ @parser.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT
70
+ @parser.registrant_contacts[0].name.should == nil
71
+ @parser.registrant_contacts[0].organization.should == "XIF Communications"
72
+ @parser.registrant_contacts[0].address.should == "1200 New Hampshire Avenue NW\nSuite 410"
73
+ @parser.registrant_contacts[0].city.should == "Washington"
74
+ @parser.registrant_contacts[0].zip.should == "20036"
75
+ @parser.registrant_contacts[0].state.should == "DC"
76
+ @parser.registrant_contacts[0].country_code.should == "US"
77
+ @parser.registrant_contacts[0].phone.should == nil
78
+ @parser.registrant_contacts[0].fax.should == nil
79
+ @parser.registrant_contacts[0].email.should == nil
80
+ end
81
+ end
82
+ describe "#admin_contacts" do
83
+ it do
84
+ @parser.admin_contacts.should be_a(Array)
85
+ @parser.admin_contacts.should have(1).items
86
+ @parser.admin_contacts[0].should be_a(Whois::Record::Contact)
87
+ @parser.admin_contacts[0].type.should == Whois::Record::Contact::TYPE_ADMIN
88
+ @parser.admin_contacts[0].name.should == "Communications, XIF ContactMiddleName"
89
+ @parser.admin_contacts[0].organization.should == "XIF Communications"
90
+ @parser.admin_contacts[0].address.should == "1200 New Hampshire Avenue NW\nSuite 410"
91
+ @parser.admin_contacts[0].city.should == "Washington"
92
+ @parser.admin_contacts[0].zip.should == "20036"
93
+ @parser.admin_contacts[0].state.should == "DC"
94
+ @parser.admin_contacts[0].country_code.should == "US"
95
+ @parser.admin_contacts[0].phone.should == "202-463-7200"
96
+ @parser.admin_contacts[0].fax.should == "202-318-4003"
97
+ @parser.admin_contacts[0].email.should == "noc@xif.com"
98
+ end
99
+ end
100
+ describe "#technical_contacts" do
101
+ it do
102
+ @parser.technical_contacts.should be_a(Array)
103
+ @parser.technical_contacts.should have(1).items
104
+ @parser.technical_contacts[0].should be_a(Whois::Record::Contact)
105
+ @parser.technical_contacts[0].type.should == Whois::Record::Contact::TYPE_TECHNICAL
106
+ @parser.technical_contacts[0].name.should == "Communications, XIF ContactMiddleName"
107
+ @parser.technical_contacts[0].organization.should == "XIF Communications"
108
+ @parser.technical_contacts[0].address.should == "1200 New Hampshire Avenue NW\nSuite 410"
109
+ @parser.technical_contacts[0].city.should == "Washington"
110
+ @parser.technical_contacts[0].zip.should == "20036"
111
+ @parser.technical_contacts[0].state.should == "DC"
112
+ @parser.technical_contacts[0].country_code.should == "US"
113
+ @parser.technical_contacts[0].phone.should == "202-463-7200"
114
+ @parser.technical_contacts[0].fax.should == "202-318-4003"
115
+ @parser.technical_contacts[0].email.should == "noc@xif.com"
116
+ end
117
+ end
118
+ describe "#nameservers" do
119
+ it do
120
+ @parser.nameservers.should be_a(Array)
121
+ @parser.nameservers.should have(3).items
122
+ @parser.nameservers[0].should be_a(Whois::Record::Nameserver)
123
+ @parser.nameservers[0].name.should == "ns01.xif.com"
124
+ @parser.nameservers[0].ipv4.should == "63.240.200.70"
125
+ @parser.nameservers[1].should be_a(Whois::Record::Nameserver)
126
+ @parser.nameservers[1].name.should == "ns-east.cerf.net"
127
+ @parser.nameservers[1].ipv4.should == "207.252.96.3"
128
+ @parser.nameservers[2].should be_a(Whois::Record::Nameserver)
129
+ @parser.nameservers[2].name.should == "ns-west.cerf.net"
130
+ @parser.nameservers[2].ipv4.should == "192.153.156.3"
131
+ end
132
+ end
133
+ end
@@ -0,0 +1,106 @@
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.sx/status_available.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.sx.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisSx, "status_available.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.sx/status_available.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 == "u34jedzcq.sx"
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_url" do
40
+ it do
41
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_whois" do
45
+ it do
46
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
47
+ end
48
+ end
49
+ describe "#status" do
50
+ it do
51
+ @parser.status.should == :available
52
+ end
53
+ end
54
+ describe "#available?" do
55
+ it do
56
+ @parser.available?.should == true
57
+ end
58
+ end
59
+ describe "#registered?" do
60
+ it do
61
+ @parser.registered?.should == false
62
+ end
63
+ end
64
+ describe "#created_on" do
65
+ it do
66
+ lambda { @parser.created_on }.should raise_error(Whois::PropertyNotSupported)
67
+ end
68
+ end
69
+ describe "#updated_on" do
70
+ it do
71
+ lambda { @parser.updated_on }.should raise_error(Whois::PropertyNotSupported)
72
+ end
73
+ end
74
+ describe "#expires_on" do
75
+ it do
76
+ lambda { @parser.expires_on }.should raise_error(Whois::PropertyNotSupported)
77
+ end
78
+ end
79
+ describe "#registrar" do
80
+ it do
81
+ @parser.registrar.should == nil
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
+ lambda { @parser.admin_contacts }.should raise_error(Whois::PropertyNotSupported)
93
+ end
94
+ end
95
+ describe "#technical_contacts" do
96
+ it do
97
+ lambda { @parser.technical_contacts }.should raise_error(Whois::PropertyNotSupported)
98
+ end
99
+ end
100
+ describe "#nameservers" do
101
+ it do
102
+ @parser.nameservers.should be_a(Array)
103
+ @parser.nameservers.should == []
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,136 @@
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.sx/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.sx.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisSx, "status_registered.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.sx/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 == "whois.sx"
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_url" do
40
+ it do
41
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_whois" do
45
+ it do
46
+ lambda { @parser.referral_whois }.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
+ lambda { @parser.created_on }.should raise_error(Whois::PropertyNotSupported)
67
+ end
68
+ end
69
+ describe "#updated_on" do
70
+ it do
71
+ lambda { @parser.updated_on }.should raise_error(Whois::PropertyNotSupported)
72
+ end
73
+ end
74
+ describe "#expires_on" do
75
+ it do
76
+ lambda { @parser.expires_on }.should raise_error(Whois::PropertyNotSupported)
77
+ end
78
+ end
79
+ describe "#registrar" do
80
+ it do
81
+ @parser.registrar.should be_a(Whois::Record::Registrar)
82
+ @parser.registrar.id.should == nil
83
+ @parser.registrar.name.should == "SX Registry S.A."
84
+ @parser.registrar.organization.should == nil
85
+ @parser.registrar.url.should == "http://registry.sx"
86
+ end
87
+ end
88
+ describe "#registrant_contacts" do
89
+ it do
90
+ @parser.registrant_contacts.should be_a(Array)
91
+ @parser.registrant_contacts.should have(1).items
92
+ @parser.registrant_contacts[0].should be_a(Whois::Record::Contact)
93
+ @parser.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT
94
+ @parser.registrant_contacts[0].id.should == nil
95
+ @parser.registrant_contacts[0].name.should == "SX Registry S.A."
96
+ @parser.registrant_contacts[0].organization.should == nil
97
+ @parser.registrant_contacts[0].address.should == nil
98
+ @parser.registrant_contacts[0].city.should == nil
99
+ @parser.registrant_contacts[0].zip.should == nil
100
+ @parser.registrant_contacts[0].state.should == nil
101
+ @parser.registrant_contacts[0].country.should == nil
102
+ @parser.registrant_contacts[0].country_code.should == nil
103
+ @parser.registrant_contacts[0].phone.should == nil
104
+ @parser.registrant_contacts[0].fax.should == nil
105
+ @parser.registrant_contacts[0].email.should == nil
106
+ end
107
+ end
108
+ describe "#admin_contacts" do
109
+ it do
110
+ lambda { @parser.admin_contacts }.should raise_error(Whois::PropertyNotSupported)
111
+ end
112
+ end
113
+ describe "#technical_contacts" do
114
+ it do
115
+ lambda { @parser.technical_contacts }.should raise_error(Whois::PropertyNotSupported)
116
+ end
117
+ end
118
+ describe "#nameservers" do
119
+ it do
120
+ @parser.nameservers.should be_a(Array)
121
+ @parser.nameservers.should have(3).items
122
+ @parser.nameservers[0].should be_a(Whois::Record::Nameserver)
123
+ @parser.nameservers[0].name.should == "a.ns.sx"
124
+ @parser.nameservers[0].ipv4.should == nil
125
+ @parser.nameservers[0].ipv6.should == nil
126
+ @parser.nameservers[1].should be_a(Whois::Record::Nameserver)
127
+ @parser.nameservers[1].name.should == "b.ns.sx"
128
+ @parser.nameservers[1].ipv4.should == nil
129
+ @parser.nameservers[1].ipv6.should == nil
130
+ @parser.nameservers[2].should be_a(Whois::Record::Nameserver)
131
+ @parser.nameservers[2].name.should == "c.ns.sx"
132
+ @parser.nameservers[2].ipv4.should == nil
133
+ @parser.nameservers[2].ipv6.should == nil
134
+ end
135
+ end
136
+ end