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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whois
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-16 00:00:00.000000000Z
12
+ date: 2012-03-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70126118233660 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,21 +21,31 @@ dependencies:
21
21
  version: '0.9'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70126118233660
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '0.9'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rspec
27
- requirement: &70126118233200 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
31
36
  - !ruby/object:Gem::Version
32
- version: 2.8.0
37
+ version: 2.9.0
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *70126118233200
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 2.9.0
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: mocha
38
- requirement: &70126118232820 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70126118232820
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: yard
49
- requirement: &70126118232400 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,7 +69,12 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *70126118232400
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  description: Whois is an intelligent WHOIS client and parser written in pure Ruby.
59
79
  It can query registry data for IPv4, IPv6 and top level domains, parse and convert
60
80
  responses into easy-to-use Ruby objects.
@@ -96,23 +116,6 @@ files:
96
116
  - lib/whois/record/parser/kero.yachay.pe.rb
97
117
  - lib/whois/record/parser/NOTES.txt
98
118
  - lib/whois/record/parser/saudinic.net.sa.rb
99
- - lib/whois/record/parser/scanners/afilias.rb
100
- - lib/whois/record/parser/scanners/ast.rb
101
- - lib/whois/record/parser/scanners/base.rb
102
- - lib/whois/record/parser/scanners/iana.rb
103
- - lib/whois/record/parser/scanners/verisign.rb
104
- - lib/whois/record/parser/scanners/whois.biz.rb
105
- - lib/whois/record/parser/scanners/whois.centralnic.com.rb
106
- - lib/whois/record/parser/scanners/whois.cnnic.cn.rb
107
- - lib/whois/record/parser/scanners/whois.denic.de.rb
108
- - lib/whois/record/parser/scanners/whois.dns.hr.rb
109
- - lib/whois/record/parser/scanners/whois.nc.rb
110
- - lib/whois/record/parser/scanners/whois.nic.hu.rb
111
- - lib/whois/record/parser/scanners/whois.nic.it.rb
112
- - lib/whois/record/parser/scanners/whois.registry.qa.rb
113
- - lib/whois/record/parser/scanners/whois.rnids.rs.rb
114
- - lib/whois/record/parser/scanners/whois.smallregistry.net.rb
115
- - lib/whois/record/parser/scanners/whois.tld.ee.rb
116
119
  - lib/whois/record/parser/whois.adamsnames.tc.rb
117
120
  - lib/whois/record/parser/whois.aeda.net.ae.rb
118
121
  - lib/whois/record/parser/whois.aero.rb
@@ -124,6 +127,7 @@ files:
124
127
  - lib/whois/record/parser/whois.ausregistry.net.au.rb
125
128
  - lib/whois/record/parser/whois.biz.rb
126
129
  - lib/whois/record/parser/whois.cat.rb
130
+ - lib/whois/record/parser/whois.cctld.by.rb
127
131
  - lib/whois/record/parser/whois.cctld.uz.rb
128
132
  - lib/whois/record/parser/whois.centralnic.com.rb
129
133
  - lib/whois/record/parser/whois.centralnic.net.rb
@@ -152,6 +156,7 @@ files:
152
156
  - lib/whois/record/parser/whois.dreamhost.com.rb
153
157
  - lib/whois/record/parser/whois.educause.edu.rb
154
158
  - lib/whois/record/parser/whois.eenet.ee.rb
159
+ - lib/whois/record/parser/whois.enom.com.rb
155
160
  - lib/whois/record/parser/whois.eu.org.rb
156
161
  - lib/whois/record/parser/whois.eu.rb
157
162
  - lib/whois/record/parser/whois.fi.rb
@@ -281,6 +286,27 @@ files:
281
286
  - lib/whois/record/parser.rb
282
287
  - lib/whois/record/part.rb
283
288
  - lib/whois/record/registrar.rb
289
+ - lib/whois/record/scanners/afilias.rb
290
+ - lib/whois/record/scanners/ast.rb
291
+ - lib/whois/record/scanners/base.rb
292
+ - lib/whois/record/scanners/iana.rb
293
+ - lib/whois/record/scanners/verisign.rb
294
+ - lib/whois/record/scanners/whois.audns.net.au.rb
295
+ - lib/whois/record/scanners/whois.biz.rb
296
+ - lib/whois/record/scanners/whois.cctld.by.rb
297
+ - lib/whois/record/scanners/whois.centralnic.com.rb
298
+ - lib/whois/record/scanners/whois.cira.ca.rb
299
+ - lib/whois/record/scanners/whois.cnnic.cn.rb
300
+ - lib/whois/record/scanners/whois.denic.de.rb
301
+ - lib/whois/record/scanners/whois.dns.hr.rb
302
+ - lib/whois/record/scanners/whois.domainregistry.ie.rb
303
+ - lib/whois/record/scanners/whois.nc.rb
304
+ - lib/whois/record/scanners/whois.nic.hu.rb
305
+ - lib/whois/record/scanners/whois.nic.it.rb
306
+ - lib/whois/record/scanners/whois.registry.qa.rb
307
+ - lib/whois/record/scanners/whois.rnids.rs.rb
308
+ - lib/whois/record/scanners/whois.smallregistry.net.rb
309
+ - lib/whois/record/scanners/whois.tld.ee.rb
284
310
  - lib/whois/record/super_struct.rb
285
311
  - lib/whois/record.rb
286
312
  - lib/whois/server/adapters/afilias.rb
@@ -398,6 +424,10 @@ files:
398
424
  - spec/fixtures/responses/whois.cat/status_available.txt
399
425
  - spec/fixtures/responses/whois.cat/status_registered.expected
400
426
  - spec/fixtures/responses/whois.cat/status_registered.txt
427
+ - spec/fixtures/responses/whois.cctld.by/status_available.expected
428
+ - spec/fixtures/responses/whois.cctld.by/status_available.txt
429
+ - spec/fixtures/responses/whois.cctld.by/status_registered.expected
430
+ - spec/fixtures/responses/whois.cctld.by/status_registered.txt
401
431
  - spec/fixtures/responses/whois.cctld.uz/status_available.expected
402
432
  - spec/fixtures/responses/whois.cctld.uz/status_available.txt
403
433
  - spec/fixtures/responses/whois.cctld.uz/status_registered.expected
@@ -498,27 +528,23 @@ files:
498
528
  - spec/fixtures/responses/whois.centralnic.com/za.com/status_available.txt
499
529
  - spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected
500
530
  - spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.txt
501
- - spec/fixtures/responses/whois.cira.ca/schema-1/status_available.expected
502
- - spec/fixtures/responses/whois.cira.ca/schema-1/status_available.txt
503
- - spec/fixtures/responses/whois.cira.ca/schema-1/status_registered.expected
504
- - spec/fixtures/responses/whois.cira.ca/schema-1/status_registered.txt
505
- - spec/fixtures/responses/whois.cira.ca/schema-2/property_status_autorenew_grace.expected
506
- - spec/fixtures/responses/whois.cira.ca/schema-2/property_status_autorenew_grace.txt
507
- - spec/fixtures/responses/whois.cira.ca/schema-2/property_status_available.expected
508
- - spec/fixtures/responses/whois.cira.ca/schema-2/property_status_available.txt
509
- - spec/fixtures/responses/whois.cira.ca/schema-2/property_status_redemption.expected
510
- - spec/fixtures/responses/whois.cira.ca/schema-2/property_status_redemption.txt
511
- - spec/fixtures/responses/whois.cira.ca/schema-2/property_status_registered.expected
512
- - spec/fixtures/responses/whois.cira.ca/schema-2/property_status_registered.txt
513
- - spec/fixtures/responses/whois.cira.ca/schema-2/property_status_tobereleased.expected
514
- - spec/fixtures/responses/whois.cira.ca/schema-2/property_status_tobereleased.txt
515
- - spec/fixtures/responses/whois.cira.ca/schema-2/property_status_unavailable.txt
516
- - spec/fixtures/responses/whois.cira.ca/schema-2/status_available.expected
517
- - spec/fixtures/responses/whois.cira.ca/schema-2/status_available.txt
518
- - spec/fixtures/responses/whois.cira.ca/schema-2/status_invalid.expected
519
- - spec/fixtures/responses/whois.cira.ca/schema-2/status_invalid.txt
520
- - spec/fixtures/responses/whois.cira.ca/schema-2/status_registered.expected
521
- - spec/fixtures/responses/whois.cira.ca/schema-2/status_registered.txt
531
+ - spec/fixtures/responses/whois.cira.ca/property_status_autorenew_grace.expected
532
+ - spec/fixtures/responses/whois.cira.ca/property_status_autorenew_grace.txt
533
+ - spec/fixtures/responses/whois.cira.ca/property_status_available.expected
534
+ - spec/fixtures/responses/whois.cira.ca/property_status_available.txt
535
+ - spec/fixtures/responses/whois.cira.ca/property_status_redemption.expected
536
+ - spec/fixtures/responses/whois.cira.ca/property_status_redemption.txt
537
+ - spec/fixtures/responses/whois.cira.ca/property_status_registered.expected
538
+ - spec/fixtures/responses/whois.cira.ca/property_status_registered.txt
539
+ - spec/fixtures/responses/whois.cira.ca/property_status_tobereleased.expected
540
+ - spec/fixtures/responses/whois.cira.ca/property_status_tobereleased.txt
541
+ - spec/fixtures/responses/whois.cira.ca/property_status_unavailable.txt
542
+ - spec/fixtures/responses/whois.cira.ca/status_available.expected
543
+ - spec/fixtures/responses/whois.cira.ca/status_available.txt
544
+ - spec/fixtures/responses/whois.cira.ca/status_invalid.expected
545
+ - spec/fixtures/responses/whois.cira.ca/status_invalid.txt
546
+ - spec/fixtures/responses/whois.cira.ca/status_registered.expected
547
+ - spec/fixtures/responses/whois.cira.ca/status_registered.txt
522
548
  - spec/fixtures/responses/whois.cnnic.cn/property_status_ok.expected
523
549
  - spec/fixtures/responses/whois.cnnic.cn/property_status_ok.txt
524
550
  - spec/fixtures/responses/whois.cnnic.cn/status_available.expected
@@ -691,6 +717,12 @@ files:
691
717
  - spec/fixtures/responses/whois.eenet.ee/status_available.txt
692
718
  - spec/fixtures/responses/whois.eenet.ee/status_registered.expected
693
719
  - spec/fixtures/responses/whois.eenet.ee/status_registered.txt
720
+ - spec/fixtures/responses/whois.enom.com/property_contacts_almost_empty.expected
721
+ - spec/fixtures/responses/whois.enom.com/property_contacts_almost_empty.txt
722
+ - spec/fixtures/responses/whois.enom.com/property_contacts_long_address.expected
723
+ - spec/fixtures/responses/whois.enom.com/property_contacts_long_address.txt
724
+ - spec/fixtures/responses/whois.enom.com/status_registered.expected
725
+ - spec/fixtures/responses/whois.enom.com/status_registered.txt
694
726
  - spec/fixtures/responses/whois.eu/property_nameservers.expected
695
727
  - spec/fixtures/responses/whois.eu/property_nameservers.txt
696
728
  - spec/fixtures/responses/whois.eu/status_available.expected
@@ -1665,6 +1697,8 @@ files:
1665
1697
  - spec/whois/record/parser/responses/whois.cat/property_status_ok_spec.rb
1666
1698
  - spec/whois/record/parser/responses/whois.cat/status_available_spec.rb
1667
1699
  - spec/whois/record/parser/responses/whois.cat/status_registered_spec.rb
1700
+ - spec/whois/record/parser/responses/whois.cctld.by/status_available_spec.rb
1701
+ - spec/whois/record/parser/responses/whois.cctld.by/status_registered_spec.rb
1668
1702
  - spec/whois/record/parser/responses/whois.cctld.uz/status_available_spec.rb
1669
1703
  - spec/whois/record/parser/responses/whois.cctld.uz/status_registered_spec.rb
1670
1704
  - spec/whois/record/parser/responses/whois.centralnic.com/ae.org/status_available_spec.rb
@@ -1714,16 +1748,14 @@ files:
1714
1748
  - spec/whois/record/parser/responses/whois.centralnic.com/uy.com/status_registered_spec.rb
1715
1749
  - spec/whois/record/parser/responses/whois.centralnic.com/za.com/status_available_spec.rb
1716
1750
  - spec/whois/record/parser/responses/whois.centralnic.com/za.com/status_registered_spec.rb
1717
- - spec/whois/record/parser/responses/whois.cira.ca/schema-1/status_available_spec.rb
1718
- - spec/whois/record/parser/responses/whois.cira.ca/schema-1/status_registered_spec.rb
1719
- - spec/whois/record/parser/responses/whois.cira.ca/schema-2/property_status_autorenew_grace_spec.rb
1720
- - spec/whois/record/parser/responses/whois.cira.ca/schema-2/property_status_available_spec.rb
1721
- - spec/whois/record/parser/responses/whois.cira.ca/schema-2/property_status_redemption_spec.rb
1722
- - spec/whois/record/parser/responses/whois.cira.ca/schema-2/property_status_registered_spec.rb
1723
- - spec/whois/record/parser/responses/whois.cira.ca/schema-2/property_status_tobereleased_spec.rb
1724
- - spec/whois/record/parser/responses/whois.cira.ca/schema-2/status_available_spec.rb
1725
- - spec/whois/record/parser/responses/whois.cira.ca/schema-2/status_invalid_spec.rb
1726
- - spec/whois/record/parser/responses/whois.cira.ca/schema-2/status_registered_spec.rb
1751
+ - spec/whois/record/parser/responses/whois.cira.ca/property_status_autorenew_grace_spec.rb
1752
+ - spec/whois/record/parser/responses/whois.cira.ca/property_status_available_spec.rb
1753
+ - spec/whois/record/parser/responses/whois.cira.ca/property_status_redemption_spec.rb
1754
+ - spec/whois/record/parser/responses/whois.cira.ca/property_status_registered_spec.rb
1755
+ - spec/whois/record/parser/responses/whois.cira.ca/property_status_tobereleased_spec.rb
1756
+ - spec/whois/record/parser/responses/whois.cira.ca/status_available_spec.rb
1757
+ - spec/whois/record/parser/responses/whois.cira.ca/status_invalid_spec.rb
1758
+ - spec/whois/record/parser/responses/whois.cira.ca/status_registered_spec.rb
1727
1759
  - spec/whois/record/parser/responses/whois.cnnic.cn/property_status_ok_spec.rb
1728
1760
  - spec/whois/record/parser/responses/whois.cnnic.cn/status_available_spec.rb
1729
1761
  - spec/whois/record/parser/responses/whois.cnnic.cn/status_registered_spec.rb
@@ -1809,6 +1841,9 @@ files:
1809
1841
  - spec/whois/record/parser/responses/whois.educause.edu/status_registered_spec.rb
1810
1842
  - spec/whois/record/parser/responses/whois.eenet.ee/status_available_spec.rb
1811
1843
  - spec/whois/record/parser/responses/whois.eenet.ee/status_registered_spec.rb
1844
+ - spec/whois/record/parser/responses/whois.enom.com/property_contacts_almost_empty_spec.rb
1845
+ - spec/whois/record/parser/responses/whois.enom.com/property_contacts_long_address_spec.rb
1846
+ - spec/whois/record/parser/responses/whois.enom.com/status_registered_spec.rb
1812
1847
  - spec/whois/record/parser/responses/whois.eu/property_nameservers_spec.rb
1813
1848
  - spec/whois/record/parser/responses/whois.eu/status_available_spec.rb
1814
1849
  - spec/whois/record/parser/responses/whois.eu/status_registered_spec.rb
@@ -2278,7 +2313,12 @@ files:
2278
2313
  - spec/whois/whois_spec.rb
2279
2314
  homepage: http://www.ruby-whois.org
2280
2315
  licenses: []
2281
- post_install_message:
2316
+ post_install_message: ! "********************************************************************************\n\n
2317
+ \ Thank you for installing the whois gem!\n\n If you like this gem, please support
2318
+ the project.\n http://pledgie.com/campaigns/11383\n\n Does your project or organization
2319
+ use this gem? Add it to the apps wiki.\n https://github.com/weppos/whois/wiki/apps\n\n
2320
+ \ Are you looking for a quick and convenient way to perform WHOIS queries?\n Check
2321
+ out RoboWhois WHOIS API.\n http://www.robowhois.com/\n\n********************************************************************************\n"
2282
2322
  rdoc_options: []
2283
2323
  require_paths:
2284
2324
  - lib
@@ -2296,7 +2336,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2296
2336
  version: '0'
2297
2337
  requirements: []
2298
2338
  rubyforge_project: whois
2299
- rubygems_version: 1.8.15
2339
+ rubygems_version: 1.8.18
2300
2340
  signing_key:
2301
2341
  specification_version: 3
2302
2342
  summary: An intelligent pure Ruby WHOIS client and parser.
@@ -1,66 +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 Afilias record.
19
- class Afilias < Base
20
-
21
- self.tokenizers += [
22
- :skip_empty_line,
23
- :scan_available,
24
- :scan_reserved,
25
- :scan_throttled,
26
- :scan_disclaimer,
27
- :scan_keyvalue,
28
- ]
29
-
30
-
31
- tokenizer :scan_available do
32
- if @input.scan(/^NOT FOUND\n/)
33
- @ast["status:available"] = true
34
- end
35
- end
36
-
37
- # .XXX
38
- tokenizer :scan_reserved do
39
- if @input.scan(/^Reserved by ICM Registry\n/)
40
- @ast["status:reserved"] = true
41
- end
42
- end
43
-
44
- # .ORG
45
- tokenizer :scan_throttled do
46
- if @input.match?(/^WHOIS LIMIT EXCEEDED/)
47
- @ast["response:throttled"] = true
48
- @input.skip(/^.+\n/)
49
- end
50
- end
51
-
52
- tokenizer :scan_disclaimer do
53
- if @input.pos == 0 && @input.match?(/^(.+\n){3,}\n/)
54
- lines = []
55
- while @input.scan(/^(.+)\n/)
56
- lines << @input[1].strip
57
- end
58
- @ast["property:disclaimer"] = lines.join(" ")
59
- end
60
- end
61
- end
62
-
63
- end
64
- end
65
- end
66
- end
@@ -1,69 +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 'strscan'
11
-
12
-
13
- module Whois
14
- class Record
15
- class Parser
16
- module Scanners
17
-
18
- # The Ast module tries to emulate a super-simple Abstract Syntax Tree structure
19
- # including method for accessing ast nodes.
20
- #
21
- # == Usage
22
- #
23
- # Include the Ast module and provide a <tt>parse</tt> instance method.
24
- # <tt>parse</tt> should returns a Hash representing the AST.
25
- #
26
- # def parse
27
- # Scanner.new.parse
28
- # end
29
- # # => { "created_on" => "2009-12-12", ... }
30
- #
31
- # Now you can access the AST using the <tt>node</tt> method.
32
- #
33
- # node "created_on"
34
- # # => "2009-12-12"
35
- #
36
- # node? "created_on"
37
- # # => true
38
- #
39
- # node? "created_at"
40
- # # => false
41
- #
42
- module Ast
43
-
44
- def node(key)
45
- if block_given?
46
- value = ast[key]
47
- value = yield(value) unless value.nil?
48
- value
49
- else
50
- ast[key]
51
- end
52
- end
53
-
54
- def node?(key)
55
- !ast[key].nil?
56
- end
57
-
58
- private
59
-
60
- def ast
61
- @ast ||= parse
62
- end
63
-
64
- end
65
-
66
- end
67
- end
68
- end
69
- end
@@ -1,85 +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
- module Whois
11
- class Record
12
- class Parser
13
- module Scanners
14
-
15
- class Base
16
-
17
- class_attribute :tokenizers
18
- self.tokenizers = []
19
-
20
- def self.tokenizer(name, &block)
21
- define_method(name, &block)
22
- end
23
-
24
-
25
- def initialize(content)
26
- @input = StringScanner.new(content)
27
- end
28
-
29
- def parse
30
- # The temporary store.
31
- # Scanners may use this to store pointers, states or other flags.
32
- @tmp = {}
33
-
34
- # A super-simple AST store.
35
- @ast = {}
36
-
37
- tokenize until @input.eos?
38
-
39
- @ast
40
- end
41
-
42
-
43
- tokenizer :skip_empty_line do
44
- @input.skip(/^\n/)
45
- end
46
-
47
- tokenizer :skip_newline do
48
- @input.skip(/\n/)
49
- end
50
-
51
- tokenizer :scan_keyvalue do
52
- if @input.scan(/(.+?):(.*?)\n/)
53
- key, value = @input[1].strip, @input[2].strip
54
- if @ast[key].nil?
55
- @ast[key] = value
56
- else
57
- @ast[key] = [@ast[key]] unless @ast[key].is_a?(Array)
58
- @ast[key] << value
59
- end
60
- end
61
- end
62
-
63
- private
64
-
65
- def tokenize
66
- tokenizers.each do |tokenizer|
67
- return if send(tokenizer)
68
- end
69
- unexpected_token
70
- end
71
-
72
- def unexpected_token
73
- error!("Unexpected token")
74
- end
75
-
76
- def error!(message)
77
- raise ParserError, "#{message}: #{@input.peek(@input.string.length)}"
78
- end
79
-
80
- end
81
-
82
- end
83
- end
84
- end
85
- end
@@ -1,108 +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 Iana < Base
19
-
20
- self.tokenizers += [
21
- :skip_empty_line,
22
- :scan_disclaimer,
23
- :scan_section,
24
- ]
25
-
26
-
27
- tokenizer :scan_disclaimer do
28
- if @input.match?(/^\%(.*?)\n/)
29
- disclaimer = []
30
- while @input.scan(/\%(.*?)\n/)
31
- matched = @input[1].strip
32
- disclaimer << matched if matched =~ /\w+/
33
- end
34
- @ast["Disclaimer"] = disclaimer.join(" ")
35
- end
36
- end
37
-
38
- tokenizer :scan_section do
39
- if @input.scan(/^(.+):(.+)\n/)
40
-
41
- # Adapt the section's name depending on the first line
42
- section = case @input[1].strip
43
- when 'contact'
44
- @input[2].strip # use the contact type name as identifier
45
- when 'created', 'changed'
46
- 'dates'
47
- when 'nserver'
48
- 'nameservers'
49
- else
50
- @input[1].strip # Default name is the first label found
51
- end
52
-
53
- content = parse_section_pairs
54
- @input.match?(/\n+/) || error("Unexpected end of section")
55
- @ast[section] = content
56
- end
57
- end
58
-
59
-
60
- private
61
-
62
- def parse_section_pairs
63
- # Sets by default the firsts values found in the section parsing bellow
64
- section_name, section_value = @input[1].strip, @input[2].strip
65
- #contents = {section_name => section_value}
66
-
67
- contents = {}
68
-
69
- while content = parse_section_pair
70
- contents.merge!(content)
71
- end
72
-
73
- if contents.has_key? section_name
74
- contents[section_name].insert(0, "#{section_value}\n")
75
- else
76
- contents[section_name] = section_value
77
- end
78
-
79
- if !contents.empty?
80
- contents
81
- else
82
- false
83
- end
84
- end
85
-
86
- def parse_section_pair
87
- if @input.scan(/^(.+):\s*(.+)\n/)
88
- key = @input[1].strip
89
- values = [@input[2].strip]
90
-
91
- while value = parse_section_pair_newlinevalue(key)
92
- values << value
93
- end
94
- { key => values.join("\n") }
95
- end
96
- end
97
-
98
- def parse_section_pair_newlinevalue(key)
99
- if @input.scan(/^#{key}:\s*(.+)\n/)
100
- @input[1].strip
101
- end
102
- end
103
-
104
- end
105
- end
106
- end
107
- end
108
- end