whois 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. data/CHANGELOG.rdoc +11 -0
  2. data/lib/whois/record/parser/NOTES.txt +18 -2
  3. data/lib/whois/record/parser/kero.yachay.pe.rb +6 -3
  4. data/lib/whois/record/parser/whois.dns.pt.rb +1 -1
  5. data/lib/whois/record/parser/whois.gg.rb +17 -7
  6. data/lib/whois/record/parser/whois.kenic.or.ke.rb +8 -6
  7. data/lib/whois/record/parser/whois.na-nic.com.na.rb +6 -4
  8. data/lib/whois/record/parser/whois.netcom.cm.rb +8 -6
  9. data/lib/whois/record/parser/whois.nic.cx.rb +9 -7
  10. data/lib/whois/record/parser/whois.nic.gl.rb +6 -4
  11. data/lib/whois/record/parser/whois.nic.gs.rb +5 -3
  12. data/lib/whois/record/parser/whois.nic.ki.rb +5 -3
  13. data/lib/whois/record/parser/whois.nic.mg.rb +5 -3
  14. data/lib/whois/record/parser/whois.nic.ms.rb +5 -3
  15. data/lib/whois/record/parser/whois.nic.net.nf.rb +5 -3
  16. data/lib/whois/record/parser/whois.nic.net.ng.rb +5 -3
  17. data/lib/whois/record/parser/whois.pnina.ps.rb +5 -3
  18. data/lib/whois/record/parser/whois.registry.gy.rb +5 -3
  19. data/lib/whois/record/parser/whois.sk-nic.sk.rb +9 -13
  20. data/lib/whois/record/parser/whois.srs.net.nz.rb +7 -3
  21. data/lib/whois/version.rb +1 -1
  22. data/spec/fixtures/responses/whois.dns.pt/status_reserved.expected +1 -1
  23. data/spec/fixtures/responses/whois.gg/status_available.expected +2 -2
  24. data/spec/fixtures/responses/whois.gg/status_available.txt +31 -23
  25. data/spec/fixtures/responses/whois.gg/status_registered.expected +6 -4
  26. data/spec/fixtures/responses/whois.gg/status_registered.txt +53 -31
  27. data/spec/fixtures/responses/whois.pnina.ps/property_status_active_pending_transfer.expected +8 -0
  28. data/spec/fixtures/responses/whois.pnina.ps/property_status_active_pending_transfer.txt +69 -0
  29. data/spec/fixtures/responses/whois.sk-nic.sk/property_status_dom_ta.expected +8 -0
  30. data/spec/fixtures/responses/whois.sk-nic.sk/property_status_dom_ta.txt +25 -0
  31. data/spec/fixtures/responses/whois.srs.net.nz/property_status_pendingrelease.expected +8 -0
  32. data/spec/fixtures/responses/whois.srs.net.nz/property_status_pendingrelease.txt +68 -0
  33. data/spec/whois/record/parser/responses/whois.dns.pt/status_reserved_spec.rb +1 -1
  34. data/spec/whois/record/parser/responses/whois.gg/status_available_spec.rb +2 -2
  35. data/spec/whois/record/parser/responses/whois.gg/status_registered_spec.rb +6 -4
  36. data/spec/whois/record/parser/responses/whois.pnina.ps/property_status_active_pending_transfer_spec.rb +39 -0
  37. data/spec/whois/record/parser/responses/whois.sk-nic.sk/property_status_dom_ta_spec.rb +39 -0
  38. data/spec/whois/record/parser/responses/whois.srs.net.nz/property_status_pendingrelease_spec.rb +39 -0
  39. data/whois.gemspec +3 -3
  40. metadata +11 -2
data/CHANGELOG.rdoc CHANGED
@@ -1,6 +1,17 @@
1
1
  = Changelog
2
2
 
3
3
 
4
+ == Release 2.0.6
5
+
6
+ * CHANGED: whois.gg has changed response format.
7
+
8
+ * FIXED: whois.pnina.ps parser do not support `Active' status variants.
9
+
10
+ * FIXED: whois.sk-nic.sk parser must support `DOM_TA' status.
11
+
12
+ * FIXED: whois.srs.net.nz parser must support `210 PendingRelease' status.
13
+
14
+
4
15
  == Release 2.0.5
5
16
 
6
17
  * SERVER: Updated .BI TLD definition.
@@ -36,8 +36,7 @@ whois.nic.mg
36
36
  whois.na-nic.com.na
37
37
  kero.yachay.pe
38
38
  whois.kenic.or.ke
39
-
40
- # http://coccaregistry.net/index.php/whois.html
39
+ # start http://coccaregistry.net/index.php/whois.html
41
40
  whois.nic.cx
42
41
  whois.nic.gs
43
42
  whois.nic.ki
@@ -45,6 +44,23 @@ whois.nic.net.nf
45
44
  whois.nic.net.sb
46
45
  whois.nic.tl
47
46
  whois.nic.ms
47
+ # end http://coccaregistry.net/index.php/whois.html
48
+
49
+ lib/whois/record/parser/kero.yachay.pe.rb
50
+ lib/whois/record/parser/whois.gg.rb
51
+ lib/whois/record/parser/whois.kenic.or.ke.rb
52
+ lib/whois/record/parser/whois.na-nic.com.na.rb
53
+ lib/whois/record/parser/whois.netcom.cm.rb
54
+ lib/whois/record/parser/whois.nic.cx.rb
55
+ lib/whois/record/parser/whois.nic.gl.rb
56
+ lib/whois/record/parser/whois.nic.gs.rb
57
+ lib/whois/record/parser/whois.nic.ki.rb
58
+ lib/whois/record/parser/whois.nic.mg.rb
59
+ lib/whois/record/parser/whois.nic.ms.rb
60
+ lib/whois/record/parser/whois.nic.net.nf.rb
61
+ lib/whois/record/parser/whois.nic.net.ng.rb
62
+ lib/whois/record/parser/whois.pnina.ps.rb
63
+ lib/whois/record/parser/whois.registry.gy.rb
48
64
 
49
65
  # AFNIC
50
66
  whois.nic.fr
@@ -30,9 +30,12 @@ module Whois
30
30
  property_supported :status do
31
31
  if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
35
- when "inactive" then :inactive
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
37
+ when "inactive"
38
+ :inactive
36
39
  else
37
40
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
38
41
  end
@@ -51,7 +51,7 @@ module Whois
51
51
 
52
52
  property_supported :created_on do
53
53
  if content_for_scanner =~ / Creation Date .+?:\s+(.*)\n/
54
- DateTime.strptime($1, "%d/%m/%Y").to_time
54
+ Time.utc(*$1.split("/").reverse)
55
55
  end
56
56
  end
57
57
 
@@ -28,10 +28,12 @@ module Whois
28
28
  class WhoisGg < Base
29
29
 
30
30
  property_supported :status do
31
- if content_for_scanner =~ /status:(.+?)\n/
31
+ if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "0" then :available
34
- when "1" then :registered
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -49,17 +51,25 @@ module Whois
49
51
  end
50
52
 
51
53
 
52
- property_not_supported :created_on
54
+ property_supported :created_on do
55
+ if content_for_scanner =~ /Created:\s+(.+?)\n/
56
+ Time.parse($1)
57
+ end
58
+ end
53
59
 
54
- property_not_supported :updated_on
60
+ property_supported :updated_on do
61
+ if content_for_scanner =~ /Modified:\s+(.+?)\n/
62
+ Time.parse($1)
63
+ end
64
+ end
55
65
 
56
66
  property_not_supported :expires_on
57
67
 
58
68
 
59
69
  property_supported :nameservers do
60
- if content_for_scanner =~ /Registered Nameservers\n[-]+\n((.+\n)+)\n/
70
+ if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
61
71
  $1.split("\n").map do |name|
62
- Record::Nameserver.new(name.chomp("."))
72
+ Record::Nameserver.new(name.strip)
63
73
  end
64
74
  end
65
75
  end
@@ -30,8 +30,10 @@ module Whois
30
30
  property_supported :status do
31
31
  if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -41,7 +43,7 @@ module Whois
41
43
  end
42
44
 
43
45
  property_supported :available? do
44
- (status == :available)
46
+ status == :available
45
47
  end
46
48
 
47
49
  property_supported :registered? do
@@ -50,19 +52,19 @@ module Whois
50
52
 
51
53
 
52
54
  property_supported :created_on do
53
- if content_for_scanner =~ /Created:\s+(.+)\n/
55
+ if content_for_scanner =~ /Created:\s+(.+?)\n/
54
56
  Time.parse($1)
55
57
  end
56
58
  end
57
59
 
58
60
  property_supported :updated_on do
59
- if content_for_scanner =~ /Modified:\s+(.+)\n/
61
+ if content_for_scanner =~ /Modified:\s+(.+?)\n/
60
62
  Time.parse($1)
61
63
  end
62
64
  end
63
65
 
64
66
  property_supported :expires_on do
65
- if content_for_scanner =~ /Expires:\s+(.+)\n/
67
+ if content_for_scanner =~ /Expires:\s+(.+?)\n/
66
68
  Time.parse($1)
67
69
  end
68
70
  end
@@ -30,8 +30,10 @@ module Whois
30
30
  property_supported :status do
31
31
  if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -41,7 +43,7 @@ module Whois
41
43
  end
42
44
 
43
45
  property_supported :available? do
44
- (status == :available)
46
+ status == :available
45
47
  end
46
48
 
47
49
  property_supported :registered? do
@@ -71,7 +73,7 @@ module Whois
71
73
  property_supported :nameservers do
72
74
  if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
73
75
  $1.split("\n").map do |name|
74
- Record::Nameserver.new(name.strip.downcase)
76
+ Record::Nameserver.new(name.strip)
75
77
  end
76
78
  end
77
79
  end
@@ -28,10 +28,12 @@ module Whois
28
28
  class WhoisNetcomCm < Base
29
29
 
30
30
  property_supported :status do
31
- if content_for_scanner =~ /Status:\s+(.*?)\n/
31
+ if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -50,19 +52,19 @@ module Whois
50
52
 
51
53
 
52
54
  property_supported :created_on do
53
- if content_for_scanner =~ /Created:\s+(.*)\n/
55
+ if content_for_scanner =~ /Created:\s+(.+?)\n/
54
56
  Time.parse($1)
55
57
  end
56
58
  end
57
59
 
58
60
  property_supported :updated_on do
59
- if content_for_scanner =~ /Modified:\s+(.*)\n/
61
+ if content_for_scanner =~ /Modified:\s+(.+?)\n/
60
62
  Time.parse($1)
61
63
  end
62
64
  end
63
65
 
64
66
  property_supported :expires_on do
65
- if content_for_scanner =~ /Expires:\s+(.*)\n/
67
+ if content_for_scanner =~ /Expires:\s+(.+?)\n/
66
68
  Time.parse($1)
67
69
  end
68
70
  end
@@ -28,10 +28,12 @@ module Whois
28
28
  class WhoisNicCx < Base
29
29
 
30
30
  property_supported :status do
31
- if content_for_scanner =~ /Status:\s+(.*?)\n/
31
+ if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -41,7 +43,7 @@ module Whois
41
43
  end
42
44
 
43
45
  property_supported :available? do
44
- (status == :available)
46
+ status == :available
45
47
  end
46
48
 
47
49
  property_supported :registered? do
@@ -50,19 +52,19 @@ module Whois
50
52
 
51
53
 
52
54
  property_supported :created_on do
53
- if content_for_scanner =~ /Created:\s+(.*)\n/
55
+ if content_for_scanner =~ /Created:\s+(.+?)\n/
54
56
  Time.parse($1)
55
57
  end
56
58
  end
57
59
 
58
60
  property_supported :updated_on do
59
- if content_for_scanner =~ /Modified:\s+(.*)\n/
61
+ if content_for_scanner =~ /Modified:\s+(.+?)\n/
60
62
  Time.parse($1)
61
63
  end
62
64
  end
63
65
 
64
66
  property_supported :expires_on do
65
- if content_for_scanner =~ /Expires:\s+(.*)\n/
67
+ if content_for_scanner =~ /Expires:\s+(.+?)\n/
66
68
  Time.parse($1)
67
69
  end
68
70
  end
@@ -30,8 +30,10 @@ module Whois
30
30
  property_supported :status do
31
31
  if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -41,7 +43,7 @@ module Whois
41
43
  end
42
44
 
43
45
  property_supported :available? do
44
- (status == :available)
46
+ status == :available
45
47
  end
46
48
 
47
49
  property_supported :registered? do
@@ -71,7 +73,7 @@ module Whois
71
73
  property_supported :nameservers do
72
74
  if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
73
75
  $1.split("\n").map do |name|
74
- Record::Nameserver.new(name.strip.downcase)
76
+ Record::Nameserver.new(name.strip)
75
77
  end
76
78
  end
77
79
  end
@@ -30,8 +30,10 @@ module Whois
30
30
  property_supported :status do
31
31
  if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -41,7 +43,7 @@ module Whois
41
43
  end
42
44
 
43
45
  property_supported :available? do
44
- (status == :available)
46
+ status == :available
45
47
  end
46
48
 
47
49
  property_supported :registered? do
@@ -30,8 +30,10 @@ module Whois
30
30
  property_supported :status do
31
31
  if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -41,7 +43,7 @@ module Whois
41
43
  end
42
44
 
43
45
  property_supported :available? do
44
- (status == :available)
46
+ status == :available
45
47
  end
46
48
 
47
49
  property_supported :registered? do
@@ -30,8 +30,10 @@ module Whois
30
30
  property_supported :status do
31
31
  if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -41,7 +43,7 @@ module Whois
41
43
  end
42
44
 
43
45
  property_supported :available? do
44
- (status == :available)
46
+ status == :available
45
47
  end
46
48
 
47
49
  property_supported :registered? do
@@ -30,8 +30,10 @@ module Whois
30
30
  property_supported :status do
31
31
  if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -41,7 +43,7 @@ module Whois
41
43
  end
42
44
 
43
45
  property_supported :available? do
44
- (status == :available)
46
+ status == :available
45
47
  end
46
48
 
47
49
  property_supported :registered? do
@@ -30,8 +30,10 @@ module Whois
30
30
  property_supported :status do
31
31
  if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -41,7 +43,7 @@ module Whois
41
43
  end
42
44
 
43
45
  property_supported :available? do
44
- (status == :available)
46
+ status == :available
45
47
  end
46
48
 
47
49
  property_supported :registered? do
@@ -30,8 +30,10 @@ module Whois
30
30
  property_supported :status do
31
31
  if content_for_scanner =~ /Status:\s+(.+?)\n/
32
32
  case $1.downcase
33
- when "active" then :registered
34
- when "not registered" then :available
33
+ when "active"
34
+ :registered
35
+ when "not registered"
36
+ :available
35
37
  else
36
38
  Whois.bug!(ParserError, "Unknown status `#{$1}'.")
37
39
  end
@@ -41,7 +43,7 @@ module Whois
41
43
  end
42
44
 
43
45
  property_supported :available? do
44
- (status == :available)
46
+ status == :available
45
47
  end
46
48
 
47
49
  property_supported :registered? do