whois 1.3.6 → 1.3.7

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.
data/CHANGELOG.rdoc CHANGED
@@ -1,6 +1,33 @@
1
1
  = Changelog
2
2
 
3
3
 
4
+ == Release 1.3.7
5
+
6
+ * SERVER: Updated the .ci TLD definition.
7
+
8
+ * SERVER: Removed the .co.uk TLD definition.
9
+
10
+ * NEW: Added simple .priv.at TLD parser (whois.nic.priv.at).
11
+
12
+ * NEW: Added simple .cx TLD parser (whois.nic.cx).
13
+
14
+ * NEW: Added simple .bo TLD parser (whois.nic.bo).
15
+
16
+ * NEW: Added simple .co.ca TLD parser (whois.co.ca).
17
+
18
+ * NEW: Added simple .ck TLD parser (whois.nic.ck).
19
+
20
+ * NEW: Added simple .cl TLD parser (whois.nic.cl).
21
+
22
+ * NEW: Added simple .cm TLD parser (whois.netcom.cm).
23
+
24
+ * NEW: Added simple .cz TLD parser (whois.nic.cz).
25
+
26
+ * CHANGED: Standardized whois.nic.af #status property, it now returns symbols instead of strings.
27
+
28
+ * CHANGED: Standardized whois.arnes.si #status property, it now returns symbols instead of strings.
29
+
30
+
4
31
  == Release 1.3.6
5
32
 
6
33
  * CHANGED: Deprecated Whois::Answer::Part#response.
@@ -55,7 +55,7 @@ module Whois
55
55
 
56
56
 
57
57
  property_supported :nameservers do
58
- @nameservers ||= content_for_scanner.scan(/Name Server:\s+(.*?)\n/).flatten
58
+ @nameservers ||= content_for_scanner.scan(/Name Server:\s+(.+?)\n/).flatten
59
59
  end
60
60
 
61
61
  end
@@ -35,17 +35,24 @@ module Whois
35
35
  class WhoisArnesSi < Base
36
36
 
37
37
  property_supported :status do
38
- @status ||= if content_for_scanner =~ /status:\s+(.*)\n/
39
- $1.downcase.to_sym
38
+ @status ||= if content_for_scanner =~ /status:\s+(.+)\n/
39
+ case $1.downcase
40
+ when "ok" then :registered
41
+ else
42
+ raise ParserError, "Unknown status `#{$1}'. " +
43
+ "Please report the issue at http://github.com/weppos/whois/issues"
44
+ end
45
+ else
46
+ :available
40
47
  end
41
48
  end
42
49
 
43
50
  property_supported :available? do
44
- @available ||= !!(content_for_scanner =~ /% No entries found/)
51
+ @available ||= !!(content_for_scanner =~ /% No entries found/)
45
52
  end
46
53
 
47
54
  property_supported :registered? do
48
- !available?
55
+ @registered ||= !available?
49
56
  end
50
57
 
51
58
 
@@ -0,0 +1,83 @@
1
+ #
2
+ # = Ruby Whois
3
+ #
4
+ # An intelligent pure Ruby WHOIS client and parser.
5
+ #
6
+ #
7
+ # Category:: Net
8
+ # Package:: Whois
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
+ #
12
+ #--
13
+ #
14
+ #++
15
+
16
+
17
+ require 'whois/answer/parser/base'
18
+
19
+
20
+ module Whois
21
+ class Answer
22
+ class Parser
23
+
24
+ #
25
+ # = whois.co.ca parser
26
+ #
27
+ # Parser for the whois.co.ca server.
28
+ #
29
+ # NOTE: This parser is just a stub and provides only a few basic methods
30
+ # to check for domain availability and get domain status.
31
+ # Please consider to contribute implementing missing methods.
32
+ # See WhoisNicIt parser for an explanation of all available methods
33
+ # and examples.
34
+ #
35
+ class WhoisCoCa < Base
36
+
37
+ property_supported :status do
38
+ @status ||= case
39
+ when available? then :available
40
+ when reserved? then :reserved
41
+ else :registered
42
+ end
43
+ end
44
+
45
+ property_supported :available? do
46
+ @available ||= !!(content_for_scanner =~ /^(.+) is available/)
47
+ end
48
+
49
+ property_supported :registered? do
50
+ @registered ||= !(available? || reserved?)
51
+ end
52
+
53
+
54
+ property_supported :created_on do
55
+ @created_on ||= if content_for_scanner =~ /date_approved:\s+(.+)\n/
56
+ Time.parse($1)
57
+ end
58
+ end
59
+
60
+ property_not_supported :updated_on
61
+
62
+ property_supported :expires_on do
63
+ @expires_on ||= if content_for_scanner =~ /date_renewal:\s+(.+)\n/
64
+ Time.parse($1)
65
+ end
66
+ end
67
+
68
+
69
+ property_supported :nameservers do
70
+ @nameservers ||= content_for_scanner.scan(/ns[\d]_hostname:\s+(.+)\n/).flatten
71
+ end
72
+
73
+
74
+ # NEWPROPERTY
75
+ def reserved?
76
+ !!(content_for_scanner =~ /^Domain is not available or is reserved by the registry/)
77
+ end
78
+
79
+ end
80
+
81
+ end
82
+ end
83
+ end
@@ -39,13 +39,14 @@ module Whois
39
39
  end
40
40
 
41
41
  property_supported :available? do
42
- @available ||= !!(content_for_scanner =~ /No entries found for the selected source/)
42
+ @available ||= !!(content_for_scanner =~ /No entries found for the selected source/)
43
43
  end
44
44
 
45
45
  property_supported :registered? do
46
- !available?
46
+ @registered ||= !available?
47
47
  end
48
48
 
49
+
49
50
  property_supported :created_on do
50
51
  @created_on ||= if content_for_scanner =~ /Registered:\s+(.+)$/
51
52
  Time.parse($1)
@@ -110,12 +110,14 @@ module Whois
110
110
  end
111
111
 
112
112
 
113
+ # NEWPROPERTY
113
114
  def version
114
115
  @version ||= if content_for_scanner =~ /^% Version: (.+)$/
115
116
  $1
116
117
  end
117
118
  end
118
119
 
120
+ # NEWPROPERTY
119
121
  def invalid?
120
122
  @invalid ||= (!!node("Invalid") || node("Status") == "invalid")
121
123
  end
@@ -0,0 +1,89 @@
1
+ #
2
+ # = Ruby Whois
3
+ #
4
+ # An intelligent pure Ruby WHOIS client and parser.
5
+ #
6
+ #
7
+ # Category:: Net
8
+ # Package:: Whois
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
+ #
12
+ #--
13
+ #
14
+ #++
15
+
16
+
17
+ require 'whois/answer/parser/base'
18
+
19
+
20
+ module Whois
21
+ class Answer
22
+ class Parser
23
+
24
+ #
25
+ # = whois.netcom.cm parser
26
+ #
27
+ # Parser for the whois.netcom.cm server.
28
+ #
29
+ # NOTE: This parser is just a stub and provides only a few basic methods
30
+ # to check for domain availability and get domain status.
31
+ # Please consider to contribute implementing missing methods.
32
+ # See WhoisNicIt parser for an explanation of all available methods
33
+ # and examples.
34
+ #
35
+ class WhoisNetcomCm < Base
36
+
37
+ property_supported :status do
38
+ @status ||= if content_for_scanner =~ /Status:\s+(.*?)\n/
39
+ case $1.downcase
40
+ when "active" then :registered
41
+ when "not registered" then :available
42
+ else
43
+ raise ParserError, "Unknown status `#{$1}'. " +
44
+ "Please report the issue at http://github.com/weppos/whois/issues"
45
+ end
46
+ end
47
+ end
48
+
49
+ property_supported :available? do
50
+ @available ||= (status == "Not Registered")
51
+ end
52
+
53
+ property_supported :registered? do
54
+ !available?
55
+ end
56
+
57
+
58
+ property_supported :created_on do
59
+ @created_on ||= if content_for_scanner =~ /Created:\s+(.*)\n/
60
+ Time.parse($1)
61
+ end
62
+ end
63
+
64
+ property_supported :updated_on do
65
+ @updated_on ||= if content_for_scanner =~ /Modified:\s+(.*)\n/
66
+ Time.parse($1)
67
+ end
68
+ end
69
+
70
+ property_supported :expires_on do
71
+ @expires_on ||= if content_for_scanner =~ /Expires:\s+(.*)\n/
72
+ Time.parse($1)
73
+ end
74
+ end
75
+
76
+
77
+ property_supported :nameservers do
78
+ @nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
79
+ $1.split("\n").map(&:strip)
80
+ else
81
+ []
82
+ end
83
+ end
84
+
85
+ end
86
+
87
+ end
88
+ end
89
+ end
@@ -35,17 +35,23 @@ module Whois
35
35
  class WhoisNicAf < Base
36
36
 
37
37
  property_supported :status do
38
- @status ||= if content_for_scanner =~ /Status:\s+(.*)\n/
39
- $1
38
+ @status ||= if content_for_scanner =~ /Status:\s+(.*?)\n/
39
+ case $1.downcase
40
+ when "active" then :registered
41
+ when "not registered" then :available
42
+ else
43
+ raise ParserError, "Unknown status `#{$1}'. " +
44
+ "Please report the issue at http://github.com/weppos/whois/issues"
45
+ end
40
46
  end
41
47
  end
42
48
 
43
49
  property_supported :available? do
44
- @available ||= (status == "Not Registered")
50
+ @available ||= (status == :available)
45
51
  end
46
52
 
47
53
  property_supported :registered? do
48
- !available?
54
+ @registered ||= !available?
49
55
  end
50
56
 
51
57
 
@@ -0,0 +1,84 @@
1
+ #
2
+ # = Ruby Whois
3
+ #
4
+ # An intelligent pure Ruby WHOIS client and parser.
5
+ #
6
+ #
7
+ # Category:: Net
8
+ # Package:: Whois
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
+ #
12
+ #--
13
+ #
14
+ #++
15
+
16
+
17
+ require 'whois/answer/parser/base'
18
+
19
+
20
+ module Whois
21
+ class Answer
22
+ class Parser
23
+
24
+ #
25
+ # = whois.registrypro.pro parser
26
+ #
27
+ # Parser for the whois.nic.bo server.
28
+ #
29
+ # NOTE: This parser is just a stub and provides only a few basic methods
30
+ # to check for domain availability and get domain status.
31
+ # Please consider to contribute implementing missing methods.
32
+ # See WhoisNicIt parser for an explanation of all available methods
33
+ # and examples.
34
+ #
35
+ class WhoisNicBo < Base
36
+
37
+ property_supported :domain do
38
+ @domain ||= if content_for_scanner =~ /Dominio:(.*)\n/
39
+ $1.strip
40
+ end
41
+ end
42
+
43
+ property_not_supported :domain_id
44
+
45
+
46
+ property_supported :status do
47
+ @status ||= if available?
48
+ :available
49
+ else
50
+ :registered
51
+ end
52
+ end
53
+
54
+ property_supported :available? do
55
+ @available ||= domain.nil?
56
+ end
57
+
58
+ property_supported :registered? do
59
+ @registered ||= !available?
60
+ end
61
+
62
+
63
+ property_supported :created_on do
64
+ @created_on ||= if content_for_scanner =~ /Fecha de registro:(.*)\n/
65
+ Time.parse($1)
66
+ end
67
+ end
68
+
69
+ property_not_supported :updated_on
70
+
71
+ property_supported :expires_on do
72
+ @expires_on ||= if content_for_scanner =~ /Fecha de vencimiento:(.*)\n/
73
+ Time.parse($1)
74
+ end
75
+ end
76
+
77
+
78
+ property_not_supported :nameservers
79
+
80
+ end
81
+
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,77 @@
1
+ #
2
+ # = Ruby Whois
3
+ #
4
+ # An intelligent pure Ruby WHOIS client and parser.
5
+ #
6
+ #
7
+ # Category:: Net
8
+ # Package:: Whois
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
+ #
12
+ #--
13
+ #
14
+ #++
15
+
16
+
17
+ require 'whois/answer/parser/base'
18
+
19
+
20
+ module Whois
21
+ class Answer
22
+ class Parser
23
+
24
+ #
25
+ # = whois.nic.ck parser
26
+ #
27
+ # Parser for the whois.nic.ck server.
28
+ #
29
+ # NOTE: This parser is just a stub and provides only a few basic methods
30
+ # to check for domain availability and get domain status.
31
+ # Please consider to contribute implementing missing methods.
32
+ # See WhoisNicIt parser for an explanation of all available methods
33
+ # and examples.
34
+ #
35
+ class WhoisNicCk < Base
36
+
37
+ property_supported :status do
38
+ @status ||= if available?
39
+ :available
40
+ else
41
+ :registered
42
+ end
43
+ end
44
+
45
+ property_supported :available? do
46
+ @available ||= !!(content_for_scanner =~ /% No entries found for the selected source/)
47
+ end
48
+
49
+ property_supported :registered? do
50
+ @registered ||= !available?
51
+ end
52
+
53
+
54
+ property_not_supported :created_on
55
+
56
+ property_supported :updated_on do
57
+ @updated_on ||= if content_for_scanner =~ /changed:\s+(.*)\n/
58
+ Time.parse($1.split(" ", 2).last)
59
+ end
60
+ end
61
+
62
+ property_supported :expires_on do
63
+ @expires_on ||= if content_for_scanner =~ /remarks:\s+expires (.+)\n/
64
+ Time.parse($1)
65
+ end
66
+ end
67
+
68
+
69
+ property_supported :nameservers do
70
+ @nameservers ||= content_for_scanner.scan(/nserver:\s+(.+)\n/).flatten
71
+ end
72
+
73
+ end
74
+
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,78 @@
1
+ #
2
+ # = Ruby Whois
3
+ #
4
+ # An intelligent pure Ruby WHOIS client and parser.
5
+ #
6
+ #
7
+ # Category:: Net
8
+ # Package:: Whois
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
+ #
12
+ #--
13
+ #
14
+ #++
15
+
16
+
17
+ require 'whois/answer/parser/base'
18
+
19
+
20
+ module Whois
21
+ class Answer
22
+ class Parser
23
+
24
+ #
25
+ # = whois.nic.cl parser
26
+ #
27
+ # Parser for the whois.nic.cl server.
28
+ #
29
+ # NOTE: This parser is just a stub and provides only a few basic methods
30
+ # to check for domain availability and get domain status.
31
+ # Please consider to contribute implementing missing methods.
32
+ # See WhoisNicIt parser for an explanation of all available methods
33
+ # and examples.
34
+ #
35
+ class WhoisNicCl < Base
36
+
37
+ property_supported :status do
38
+ @status ||= if available?
39
+ :available
40
+ else
41
+ :registered
42
+ end
43
+ end
44
+
45
+ property_supported :available? do
46
+ @available ||= !!(content_for_scanner =~ /^(.+?): no existe$/)
47
+ end
48
+
49
+ property_supported :registered? do
50
+ @registered ||= !available?
51
+ end
52
+
53
+
54
+ property_not_supported :created_on
55
+
56
+ # TODO: custom date format with foreigh month names
57
+ # property_supported :updated_on do
58
+ # @updated_on ||= if content_for_scanner =~ /changed:\s+(.*)\n/
59
+ # Time.parse($1.split(" ", 2).last)
60
+ # end
61
+ # end
62
+
63
+ property_not_supported :expires_on
64
+
65
+
66
+ property_supported :nameservers do
67
+ @nameservers ||= if content_for_scanner =~ /Servidores de nombre \(Domain servers\):\n((.+\n)+)\n/
68
+ $1.split("\n").map { |value| value.split(" ").first }
69
+ else
70
+ []
71
+ end
72
+ end
73
+
74
+ end
75
+
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,89 @@
1
+ #
2
+ # = Ruby Whois
3
+ #
4
+ # An intelligent pure Ruby WHOIS client and parser.
5
+ #
6
+ #
7
+ # Category:: Net
8
+ # Package:: Whois
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
+ #
12
+ #--
13
+ #
14
+ #++
15
+
16
+
17
+ require 'whois/answer/parser/base'
18
+
19
+
20
+ module Whois
21
+ class Answer
22
+ class Parser
23
+
24
+ #
25
+ # = whois.nic.cx parser
26
+ #
27
+ # Parser for the whois.nic.cx server.
28
+ #
29
+ # NOTE: This parser is just a stub and provides only a few basic methods
30
+ # to check for domain availability and get domain status.
31
+ # Please consider to contribute implementing missing methods.
32
+ # See WhoisNicIt parser for an explanation of all available methods
33
+ # and examples.
34
+ #
35
+ class WhoisNicCx < Base
36
+
37
+ property_supported :status do
38
+ @status ||= if content_for_scanner =~ /Status:\s+(.*?)\n/
39
+ case $1.downcase
40
+ when "active" then :registered
41
+ when "not registered" then :available
42
+ else
43
+ raise ParserError, "Unknown status `#{$1}'. " +
44
+ "Please report the issue at http://github.com/weppos/whois/issues"
45
+ end
46
+ end
47
+ end
48
+
49
+ property_supported :available? do
50
+ @available ||= (status == :available)
51
+ end
52
+
53
+ property_supported :registered? do
54
+ @registered ||= !available?
55
+ end
56
+
57
+
58
+ property_supported :created_on do
59
+ @created_on ||= if content_for_scanner =~ /Created:\s+(.*)\n/
60
+ Time.parse($1)
61
+ end
62
+ end
63
+
64
+ property_supported :updated_on do
65
+ @updated_on ||= if content_for_scanner =~ /Modified:\s+(.*)\n/
66
+ Time.parse($1)
67
+ end
68
+ end
69
+
70
+ property_supported :expires_on do
71
+ @expires_on ||= if content_for_scanner =~ /Expires:\s+(.*)\n/
72
+ Time.parse($1)
73
+ end
74
+ end
75
+
76
+
77
+ property_supported :nameservers do
78
+ @nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
79
+ $1.split("\n").map(&:strip)
80
+ else
81
+ []
82
+ end
83
+ end
84
+
85
+ end
86
+
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,86 @@
1
+ #
2
+ # = Ruby Whois
3
+ #
4
+ # An intelligent pure Ruby WHOIS client and parser.
5
+ #
6
+ #
7
+ # Category:: Net
8
+ # Package:: Whois
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
+ #
12
+ #--
13
+ #
14
+ #++
15
+
16
+
17
+ require 'whois/answer/parser/base'
18
+
19
+
20
+ module Whois
21
+ class Answer
22
+ class Parser
23
+
24
+ #
25
+ # = whois.nic.cz parser
26
+ #
27
+ # Parser for the whois.nic.cz server.
28
+ #
29
+ # NOTE: This parser is just a stub and provides only a few basic methods
30
+ # to check for domain availability and get domain status.
31
+ # Please consider to contribute implementing missing methods.
32
+ # See WhoisNicIt parser for an explanation of all available methods
33
+ # and examples.
34
+ #
35
+ class WhoisNicCz < Base
36
+
37
+ property_supported :status do
38
+ @status ||= if content_for_scanner =~ /status:\s+(.+)\n/
39
+ case $1.downcase
40
+ when "paid and in zone" then :registered
41
+ else
42
+ raise ParserError, "Unknown status `#{$1}'. " +
43
+ "Please report the issue at http://github.com/weppos/whois/issues"
44
+ end
45
+ else
46
+ :available
47
+ end
48
+ end
49
+
50
+ property_supported :available? do
51
+ @available ||= !!(content_for_scanner =~ /% No entries found/)
52
+ end
53
+
54
+ property_supported :registered? do
55
+ @registered ||= !available?
56
+ end
57
+
58
+
59
+ property_supported :created_on do
60
+ @created_on ||= if content_for_scanner =~ /registered:\s+(.*)\n/
61
+ Time.parse($1)
62
+ end
63
+ end
64
+
65
+ property_supported :updated_on do
66
+ @updated_on ||= if content_for_scanner =~ /changed:\s+(.*)\n/
67
+ Time.parse($1)
68
+ end
69
+ end
70
+
71
+ property_supported :expires_on do
72
+ @expires_on ||= if content_for_scanner =~ /expire:\s+(.*)\n/
73
+ Time.parse($1)
74
+ end
75
+ end
76
+
77
+
78
+ property_supported :nameservers do
79
+ @nameservers ||= content_for_scanner.scan(/nserver:\s+(.+)\n/).flatten.map(&:strip)
80
+ end
81
+
82
+ end
83
+
84
+ end
85
+ end
86
+ end
@@ -35,7 +35,7 @@ module Whois
35
35
  class WhoisNicLv < Base
36
36
 
37
37
  property_supported :status do
38
- if available?
38
+ @status ||= if available?
39
39
  :available
40
40
  else
41
41
  :registered
@@ -43,11 +43,11 @@ module Whois
43
43
  end
44
44
 
45
45
  property_supported :available? do
46
- @available ||= !!(content_for_scanner =~ /%ERR - Nothing found/)
46
+ @available ||= !!(content_for_scanner =~ /%ERR - Nothing found/)
47
47
  end
48
48
 
49
49
  property_supported :registered? do
50
- !available?
50
+ @registered ||= !available?
51
51
  end
52
52
 
53
53
 
@@ -35,7 +35,7 @@ module Whois
35
35
  class WhoisNicName < Base
36
36
 
37
37
  property_supported :status do
38
- if available?
38
+ @status ||= if available?
39
39
  :available
40
40
  else
41
41
  :registered
@@ -43,11 +43,11 @@ module Whois
43
43
  end
44
44
 
45
45
  property_supported :available? do
46
- @available ||= !!(content_for_scanner =~ /No match/)
46
+ @available ||= !!(content_for_scanner =~ /No match/)
47
47
  end
48
48
 
49
49
  property_supported :registered? do
50
- !available?
50
+ @registered ||= !available?
51
51
  end
52
52
 
53
53
 
@@ -0,0 +1,71 @@
1
+ #
2
+ # = Ruby Whois
3
+ #
4
+ # An intelligent pure Ruby WHOIS client and parser.
5
+ #
6
+ #
7
+ # Category:: Net
8
+ # Package:: Whois
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
+ #
12
+ #--
13
+ #
14
+ #++
15
+
16
+
17
+ require 'whois/answer/parser/base'
18
+
19
+
20
+ module Whois
21
+ class Answer
22
+ class Parser
23
+
24
+ #
25
+ # = whois.nic.priv.at parser
26
+ #
27
+ # Parser for the whois.nic.priv.at server.
28
+ #
29
+ # NOTE: This parser is just a stub and provides only a few basic methods
30
+ # to check for domain availability and get domain status.
31
+ # Please consider to contribute implementing missing methods.
32
+ # See WhoisNicIt parser for an explanation of all available methods
33
+ # and examples.
34
+ #
35
+ class WhoisNicPrivAt < Base
36
+
37
+ property_supported :status do
38
+ @status ||= if available?
39
+ :available
40
+ else
41
+ :registered
42
+ end
43
+ end
44
+
45
+ property_supported :available? do
46
+ @available ||= !!(content_for_scanner =~ /^% No entries found/)
47
+ end
48
+
49
+ property_supported :registered? do
50
+ @registered ||= !available?
51
+ end
52
+
53
+
54
+ property_not_supported :created_on
55
+
56
+ property_supported :updated_on do
57
+ @updated_on ||= if content_for_scanner =~ /changed:\s+(.+)\n/
58
+ Time.parse($1.strip.split(" ").last)
59
+ end
60
+ end
61
+
62
+ property_not_supported :expires_on
63
+
64
+
65
+ property_not_supported :nameservers
66
+
67
+ end
68
+
69
+ end
70
+ end
71
+ end
@@ -77,10 +77,12 @@ module Whois
77
77
  end
78
78
 
79
79
 
80
+ # NEWPROPERTY
80
81
  def valid?
81
82
  !invalid?
82
83
  end
83
84
 
85
+ # NEWPROPERTY
84
86
  def invalid?
85
87
  @invalid ||= !!(content_for_scanner =~ /This domain cannot be registered/)
86
88
  end
@@ -35,7 +35,7 @@ module Whois
35
35
  class WhoisRegistroBr < Base
36
36
 
37
37
  property_supported :status do
38
- if available?
38
+ @status ||= if available?
39
39
  :available
40
40
  else
41
41
  :registered
@@ -43,11 +43,11 @@ module Whois
43
43
  end
44
44
 
45
45
  property_supported :available? do
46
- @available ||= !!(content_for_scanner =~ /No match for domain/)
46
+ @available ||= !!(content_for_scanner =~ /No match for domain/)
47
47
  end
48
48
 
49
49
  property_supported :registered? do
50
- !available?
50
+ @registered ||= !available?
51
51
  end
52
52
 
53
53
 
@@ -89,13 +89,12 @@ Whois::Server.define :tld, ".cd", "whois.nic.cd"
89
89
  Whois::Server.define :tld, ".cf", nil, {:adapter=>Whois::Server::Adapters::None}
90
90
  Whois::Server.define :tld, ".cg", nil, {:web=>"http://www.nic.cg/cgi-bin/whois.pl", :adapter=>Whois::Server::Adapters::Web}
91
91
  Whois::Server.define :tld, ".ch", "whois.nic.ch"
92
- Whois::Server.define :tld, ".ci", "www.nic.ci"
92
+ Whois::Server.define :tld, ".ci", "whois.nic.ci"
93
93
  Whois::Server.define :tld, ".ck", "whois.nic.ck"
94
94
  Whois::Server.define :tld, ".cl", "whois.nic.cl"
95
95
  Whois::Server.define :tld, ".cm", "whois.netcom.cm"
96
96
  Whois::Server.define :tld, ".edu.cn", "whois.edu.cn"
97
97
  Whois::Server.define :tld, ".cn", "whois.cnnic.cn"
98
- Whois::Server.define :tld, ".uk.co", "whois.uk.co"
99
98
  Whois::Server.define :tld, ".co", "whois.nic.co"
100
99
  Whois::Server.define :tld, ".cr", nil, {:web=>"http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do", :adapter=>Whois::Server::Adapters::Web}
101
100
  Whois::Server.define :tld, ".cu", nil, {:adapter=>Whois::Server::Adapters::Web, :web=>"http://www.nic.cu/"}
data/lib/whois/version.rb CHANGED
@@ -19,7 +19,7 @@ module Whois
19
19
  module Version
20
20
  MAJOR = 1
21
21
  MINOR = 3
22
- PATCH = 6
22
+ PATCH = 7
23
23
  BUILD = nil
24
24
 
25
25
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join(".")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whois
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 6
10
- version: 1.3.6
9
+ - 7
10
+ version: 1.3.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Simone Carletti
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-22 00:00:00 +02:00
18
+ date: 2010-09-28 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -75,6 +75,7 @@ files:
75
75
  - lib/whois/answer/parser/whois.cira.ca.rb
76
76
  - lib/whois/answer/parser/whois.cnnic.cn.rb
77
77
  - lib/whois/answer/parser/whois.cnnic.net.cn.rb
78
+ - lib/whois/answer/parser/whois.co.ca.rb
78
79
  - lib/whois/answer/parser/whois.co.ug.rb
79
80
  - lib/whois/answer/parser/whois.crsnic.net.rb
80
81
  - lib/whois/answer/parser/whois.denic.de.rb
@@ -100,6 +101,7 @@ files:
100
101
  - lib/whois/answer/parser/whois.meregistry.net.rb
101
102
  - lib/whois/answer/parser/whois.museum.rb
102
103
  - lib/whois/answer/parser/whois.net.ua.rb
104
+ - lib/whois/answer/parser/whois.netcom.cm.rb
103
105
  - lib/whois/answer/parser/whois.nic-se.se.rb
104
106
  - lib/whois/answer/parser/whois.nic.ac.rb
105
107
  - lib/whois/answer/parser/whois.nic.af.rb
@@ -108,11 +110,16 @@ files:
108
110
  - lib/whois/answer/parser/whois.nic.as.rb
109
111
  - lib/whois/answer/parser/whois.nic.asia.rb
110
112
  - lib/whois/answer/parser/whois.nic.at.rb
113
+ - lib/whois/answer/parser/whois.nic.bo.rb
111
114
  - lib/whois/answer/parser/whois.nic.cc.rb
112
115
  - lib/whois/answer/parser/whois.nic.cd.rb
113
116
  - lib/whois/answer/parser/whois.nic.ch.rb
117
+ - lib/whois/answer/parser/whois.nic.ck.rb
118
+ - lib/whois/answer/parser/whois.nic.cl.rb
114
119
  - lib/whois/answer/parser/whois.nic.co.rb
115
120
  - lib/whois/answer/parser/whois.nic.coop.rb
121
+ - lib/whois/answer/parser/whois.nic.cx.rb
122
+ - lib/whois/answer/parser/whois.nic.cz.rb
116
123
  - lib/whois/answer/parser/whois.nic.ec.rb
117
124
  - lib/whois/answer/parser/whois.nic.fr.rb
118
125
  - lib/whois/answer/parser/whois.nic.gl.rb
@@ -133,6 +140,7 @@ files:
133
140
  - lib/whois/answer/parser/whois.nic.nu.rb
134
141
  - lib/whois/answer/parser/whois.nic.or.kr.rb
135
142
  - lib/whois/answer/parser/whois.nic.org.uy.rb
143
+ - lib/whois/answer/parser/whois.nic.priv.at.rb
136
144
  - lib/whois/answer/parser/whois.nic.sn.rb
137
145
  - lib/whois/answer/parser/whois.nic.st.rb
138
146
  - lib/whois/answer/parser/whois.nic.tel.rb