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
@@ -1,111 +0,0 @@
1
- #--
2
- # Ruby Whois
3
- #
4
- # An intelligent pure Ruby WHOIS client and parser.
5
- #
6
- # Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
7
- #++
8
-
9
-
10
- require 'whois/record/parser/scanners/base'
11
-
12
-
13
- module Whois
14
- class Record
15
- class Parser
16
- module Scanners
17
-
18
- class WhoisNicIt < Base
19
-
20
- self.tokenizers += [
21
- :skip_empty_line,
22
- :scan_response_unavailable,
23
- :scan_disclaimer,
24
- :scan_keyvalue,
25
- :scan_section,
26
- ]
27
-
28
-
29
- tokenizer :scan_response_unavailable do
30
- if @input.scan(/Service temporarily unavailable\.\n/)
31
- @ast["response:unavailable"] = true
32
- end
33
- end
34
-
35
- tokenizer :scan_disclaimer do
36
- if @input.match?(/\*(.*?)\*\n/)
37
- disclaimer = []
38
- while @input.scan(/\*(.*?)\*\n/)
39
- matched = @input[1].strip
40
- disclaimer << matched if matched =~ /\w+/
41
- end
42
- @ast["Disclaimer"] = disclaimer.join(" ")
43
- end
44
- end
45
-
46
- tokenizer :scan_section do
47
- if @input.scan(/([^:]+?)\n/)
48
- section = @input[1].strip
49
- content = parse_section_pairs ||
50
- parse_section_items
51
- @input.match?(/\n+/) || error!("Unexpected end of section")
52
- @ast[section] = content
53
- end
54
- end
55
-
56
-
57
- private
58
-
59
- def parse_section_items
60
- if @input.match?(/(\s+)([^:]+?)\n/)
61
- items = []
62
- indentation = @input[1].length
63
- while item = parse_section_items_item(indentation)
64
- items << item
65
- end
66
- items
67
- end
68
- end
69
-
70
- def parse_section_items_item(indentation)
71
- if @input.scan(/\s{#{indentation}}(.+)\n/)
72
- @input[1]
73
- end
74
- end
75
-
76
- def parse_section_pairs
77
- contents = {}
78
- while content = parse_section_pair
79
- contents.merge!(content)
80
- end
81
- if !contents.empty?
82
- contents
83
- else
84
- false
85
- end
86
- end
87
-
88
- def parse_section_pair
89
- if @input.scan(/(\s+)(.+?):(\s+)(.*?)\n/)
90
- key = @input[2].strip
91
- values = [@input[4].strip]
92
- indentation = @input[1].length + @input[2].length + 1 + @input[3].length
93
- while value = parse_section_pair_newlinevalue(indentation)
94
- values << value
95
- end
96
- { key => values.join("\n") }
97
- end
98
- end
99
-
100
- def parse_section_pair_newlinevalue(indentation)
101
- if @input.scan(/\s{#{indentation}}(.+)\n/)
102
- @input[1]
103
- end
104
- end
105
-
106
- end
107
-
108
- end
109
- end
110
- end
111
- end
@@ -1,41 +0,0 @@
1
- #--
2
- # Ruby Whois
3
- #
4
- # An intelligent pure Ruby WHOIS client and parser.
5
- #
6
- # Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
7
- #++
8
-
9
-
10
- require 'whois/record/parser/scanners/base'
11
-
12
-
13
- module Whois
14
- class Record
15
- class Parser
16
- module Scanners
17
-
18
- # Scanner for the whois.registry.qa record.
19
- #
20
- # @since 2.1.0
21
- class WhoisRegistryQa < Base
22
-
23
- self.tokenizers += [
24
- :skip_empty_line,
25
- :scan_available,
26
- :scan_keyvalue,
27
- ]
28
-
29
-
30
- tokenizer :scan_available do
31
- if @input.scan(/^No Data Found\n/)
32
- @ast["status:available"] = true
33
- end
34
- end
35
-
36
- end
37
-
38
- end
39
- end
40
- end
41
- end
@@ -1,78 +0,0 @@
1
- #--
2
- # Ruby Whois
3
- #
4
- # An intelligent pure Ruby WHOIS client and parser.
5
- #
6
- # Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
7
- #++
8
-
9
-
10
- require 'whois/record/parser/scanners/base'
11
-
12
-
13
- module Whois
14
- class Record
15
- class Parser
16
- module Scanners
17
-
18
- # Scanner for the whois.rnids.rs record.
19
- #
20
- # @since RELEASE
21
- class WhoisRnidsRs < Base
22
-
23
- self.tokenizers += [
24
- :scan_available,
25
- :skip_comment,
26
- :flag_group_start,
27
- :scan_group_keyvalue,
28
- :flag_group_end,
29
- :skip_empty_line,
30
- ]
31
-
32
-
33
- GROUPS = ["Owner", "Administrative contact", "Technical contact"]
34
-
35
- tokenizer :scan_available do
36
- if @input.scan(/^%ERROR:103: Domain is not registered/)
37
- @ast["status:available"] = true
38
- end
39
- end
40
-
41
- tokenizer :flag_group_start do
42
- if GROUPS.any? { |group| @input.check(/^(#{group}):/) }
43
- @tmp["group"] = @input[1]
44
- end
45
- false
46
- end
47
-
48
- tokenizer :flag_group_end do
49
- if @input.match?(/^\n/)
50
- @tmp.delete("group")
51
- end
52
- end
53
-
54
- tokenizer :scan_group_keyvalue do
55
- if @input.scan(/(.+?):(.*?)\n/)
56
- key, value = @input[1].strip, @input[2].strip
57
-
58
- target = @tmp["group"] ? (@ast[@tmp["group"]] ||= {}) : @ast
59
-
60
- if target[key].nil?
61
- target[key] = value
62
- else
63
- target[key] = Array.wrap(target[key])
64
- target[key] << value
65
- end
66
- end
67
- end
68
-
69
- tokenizer :skip_comment do
70
- @input.skip(/^%.*\n/)
71
- end
72
-
73
- end
74
-
75
- end
76
- end
77
- end
78
- end
@@ -1,62 +0,0 @@
1
- #--
2
- # Ruby Whois
3
- #
4
- # An intelligent pure Ruby WHOIS client and parser.
5
- #
6
- # Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
7
- #++
8
-
9
-
10
- require 'whois/record/parser/scanners/base'
11
-
12
-
13
- module Whois
14
- class Record
15
- class Parser
16
- module Scanners
17
-
18
- class WhoisSmallregistryNet < Base
19
-
20
- self.tokenizers += [
21
- :scan_yaml_header,
22
- :scan_disclaimer,
23
- :scan_request_time,
24
- :scan_available,
25
- :scan_body,
26
- ]
27
-
28
- tokenizer :scan_yaml_header do
29
- # skip the YAML prelude
30
- @input.scan(/^---.*\n/)
31
- end
32
-
33
- tokenizer :scan_disclaimer do
34
- if @input.match?(/^#/) && disclaimer = @input.scan_until(/^#\n/)
35
- @ast["field:disclaimer"] = disclaimer
36
- end
37
- end
38
-
39
- tokenizer :scan_request_time do
40
- if @input.scan(/^# (\d+-\d+-\d+T.*)\n/)
41
- @ast["field:request_time"] = @input[1].strip
42
- end
43
- end
44
-
45
- tokenizer :scan_available do
46
- if @input.scan(/^# Object not found.*\n/)
47
- @ast["status:available"] = true
48
- end
49
- end
50
-
51
- tokenizer :scan_body do
52
- str = @input.rest
53
- str.gsub!(/ (![\w]+) \n/, " \n") # remove custom types
54
- @ast.merge! YAML.load(str)
55
- @input.terminate
56
- end
57
-
58
- end
59
- end
60
- end
61
- end
62
- end
@@ -1,52 +0,0 @@
1
- #--
2
- # Ruby Whois
3
- #
4
- # An intelligent pure Ruby WHOIS client and parser.
5
- #
6
- # Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
7
- #++
8
-
9
-
10
- require 'whois/record/parser/scanners/base'
11
-
12
-
13
- module Whois
14
- class Record
15
- class Parser
16
- module Scanners
17
-
18
- # Scanner for the whois.tld.ee record.
19
- #
20
- # @todo This is an incomplete scanner, it skips all the properties
21
- # except contacts.
22
- class WhoisTldEe < Base
23
-
24
- self.tokenizers += [
25
- :scan_contact,
26
- :todo_content,
27
- ]
28
-
29
-
30
- tokenizer :scan_contact do
31
- if @input.scan(/contact:\s+(.*)\n/)
32
- section = @input[1].strip
33
- content = {}
34
-
35
- while @input.scan(/(.*?):\s+(.*?)\n/)
36
- content[@input[1]] = @input[2]
37
- end
38
-
39
- @ast[section] = content
40
- end
41
- end
42
-
43
- tokenizer :todo_content do
44
- @input.scan(/(.*)\n/)
45
- end
46
-
47
- end
48
-
49
- end
50
- end
51
- end
52
- end
@@ -1,27 +0,0 @@
1
- #status
2
- should: %s == :available
3
-
4
- #available?
5
- should: %s == true
6
-
7
- #registered?
8
- should: %s == false
9
-
10
-
11
- #created_on
12
- should: %s == nil
13
-
14
- #updated_on
15
- should: %s == nil
16
-
17
- #expires_on
18
- should: %s == nil
19
-
20
-
21
- #registrar
22
- should: %s == nil
23
-
24
-
25
- #nameservers
26
- should: %s CLASS(array)
27
- should: %s == []
@@ -1,9 +0,0 @@
1
- Domain name: u34jedzcq.ca
2
- Domain status: AVAIL
3
-
4
- % WHOIS look-up made at 2009-12-23 13:52:55 (GMT)
5
- %
6
- % Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal
7
- % Notice, available at http://www.cira.ca/legal-notice/?lang=en
8
- %
9
- % (c) 2007 Canadian Internet Registration Authority, (http://www.cira.ca/)
@@ -1,46 +0,0 @@
1
- #status
2
- should: %s == :registered
3
-
4
- #available?
5
- should: %s == false
6
-
7
- #registered?
8
- should: %s == true
9
-
10
-
11
- #created_on
12
- should: %s CLASS(time)
13
- should: %s == Time.parse("2000-10-03 00:00:00")
14
-
15
- #updated_on
16
- should: %s CLASS(time)
17
- should: %s == Time.parse("2009-05-27 00:00:00")
18
-
19
- #expires_on
20
- should: %s CLASS(time)
21
- should: %s == Time.parse("2011-04-28 00:00:00")
22
-
23
-
24
- #registrar
25
- should: %s CLASS(registrar)
26
- should: %s.id == "70"
27
- should: %s.name == "Webnames.ca Inc."
28
- should: %s.organization == "Webnames.ca Inc."
29
- should: %s.url == nil
30
-
31
-
32
- #nameservers
33
- should: %s CLASS(array)
34
- should: %s SIZE(4)
35
- should: %s[0] CLASS(nameserver)
36
- should: %s[0].name == "ns1.google.com"
37
- should: %s[0].ipv4 == "216.239.32.10"
38
- should: %s[1] CLASS(nameserver)
39
- should: %s[1].name == "ns2.google.com"
40
- should: %s[1].ipv4 == "216.239.34.10"
41
- should: %s[2] CLASS(nameserver)
42
- should: %s[2].name == "ns3.google.com"
43
- should: %s[2].ipv4 == "216.239.36.10"
44
- should: %s[3] CLASS(nameserver)
45
- should: %s[3].name == "ns4.google.com"
46
- should: %s[3].ipv4 == "216.239.38.10"
@@ -1,47 +0,0 @@
1
- Domain name: google.ca
2
- Domain status: EXIST
3
- Domain number: 273289
4
- Approval date: 2000/10/03
5
- Renewal date: 2011/04/28
6
- Updated date: 2009/05/27
7
-
8
- Registrar:
9
- Name: Webnames.ca Inc.
10
- Number: 70
11
-
12
- Registrant:
13
- Name: Google Inc.
14
- Number: 853723
15
-
16
- Administrative contact:
17
- Name: Rose Hagan
18
- Job Title:
19
- Postal address: Google Inc.
20
- 130 King St. W., Suite 1800
21
- Toronto ON M5X 1E3 Canada
22
- Phone: 1 416 8653361
23
- Fax: 1 416 9456616
24
- Email: dns-admin@google.com
25
-
26
- Technical contact:
27
- Name: Rose Hagan
28
- Job Title:
29
- Postal address: Google Inc.
30
- 1600 Amphitheatre Parkway
31
- Mountain View CA 94043 United States
32
- Phone: 1 650 2530000
33
- Fax: 1 650 6188571
34
- Email: dns-admin@google.com
35
-
36
- Name servers:
37
- ns1.google.com 216.239.32.10
38
- ns2.google.com 216.239.34.10
39
- ns3.google.com 216.239.36.10
40
- ns4.google.com 216.239.38.10
41
-
42
- % WHOIS look-up made at 2009-12-23 13:52:54 (GMT)
43
- %
44
- % Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal
45
- % Notice, available at http://www.cira.ca/legal-notice/?lang=en
46
- %
47
- % (c) 2007 Canadian Internet Registration Authority, (http://www.cira.ca/)
@@ -1,34 +0,0 @@
1
- #status
2
- should: %s == :available
3
-
4
- #available?
5
- should: %s == true
6
-
7
- #registered?
8
- should: %s == false
9
-
10
-
11
- #created_on
12
- should: %s == nil
13
-
14
- #updated_on
15
- should: %s == nil
16
-
17
- #expires_on
18
- should: %s == nil
19
-
20
-
21
- #registrar
22
- should: %s == nil
23
-
24
-
25
- #nameservers
26
- should: %s CLASS(array)
27
- should: %s == []
28
-
29
-
30
- #valid?
31
- should: %s == true
32
-
33
- #invalid?
34
- should: %s == false
@@ -1,48 +0,0 @@
1
- #status
2
- should: %s == :registered
3
-
4
- #available?
5
- should: %s == false
6
-
7
- #registered?
8
- should: %s == true
9
-
10
-
11
- #created_on
12
- should: %s CLASS(time)
13
- should: %s == Time.parse("2000-10-03 00:00:00")
14
-
15
- #updated_on
16
- should: %s == nil
17
-
18
- #expires_on
19
- should: %s CLASS(time)
20
- should: %s == Time.parse("2011-04-28 00:00:00")
21
-
22
-
23
- #registrar
24
- should: %s CLASS(registrar)
25
- should: %s.id == "70"
26
- should: %s.name == "Webnames.ca Inc."
27
- should: %s.organization == "Webnames.ca Inc."
28
- should: %s.url == nil
29
-
30
-
31
- #nameservers
32
- should: %s CLASS(array)
33
- should: %s SIZE(4)
34
- should: %s[0] CLASS(nameserver)
35
- should: %s[0].name == "ns1.google.com"
36
- should: %s[1] CLASS(nameserver)
37
- should: %s[1].name == "ns2.google.com"
38
- should: %s[2] CLASS(nameserver)
39
- should: %s[2].name == "ns3.google.com"
40
- should: %s[3] CLASS(nameserver)
41
- should: %s[3].name == "ns4.google.com"
42
-
43
-
44
- #valid?
45
- should: %s == true
46
-
47
- #invalid?
48
- should: %s == false
@@ -1,65 +0,0 @@
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/schema-1/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.cira.ca.rb'
15
-
16
- describe Whois::Record::Parser::WhoisCiraCa, "status_available.expected" do
17
-
18
- before(:each) do
19
- file = fixture("responses", "whois.cira.ca/schema-1/status_available.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
- @parser.status.should == :available
27
- end
28
- end
29
- describe "#available?" do
30
- it do
31
- @parser.available?.should == true
32
- end
33
- end
34
- describe "#registered?" do
35
- it do
36
- @parser.registered?.should == false
37
- end
38
- end
39
- describe "#created_on" do
40
- it do
41
- @parser.created_on.should == nil
42
- end
43
- end
44
- describe "#updated_on" do
45
- it do
46
- @parser.updated_on.should == nil
47
- end
48
- end
49
- describe "#expires_on" do
50
- it do
51
- @parser.expires_on.should == nil
52
- end
53
- end
54
- describe "#registrar" do
55
- it do
56
- @parser.registrar.should == nil
57
- end
58
- end
59
- describe "#nameservers" do
60
- it do
61
- @parser.nameservers.should be_a(Array)
62
- @parser.nameservers.should == []
63
- end
64
- end
65
- end