whois 0.9.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +161 -21
- data/LICENSE.rdoc +1 -1
- data/Manifest +184 -13
- data/README.rdoc +24 -31
- data/Rakefile +7 -7
- data/bin/ruby-whois +9 -3
- data/data/ip_del_list +2 -0
- data/data/make_servers_charset.pl +21 -0
- data/data/make_tld_serv.pl +8 -7
- data/data/servers_charset_list +37 -0
- data/data/tld_serv_list +32 -30
- data/lib/whois.rb +0 -1
- data/lib/whois/answer.rb +24 -13
- data/lib/whois/answer/parser.rb +27 -16
- data/lib/whois/answer/parser/NOTES.txt +3 -0
- data/lib/whois/answer/parser/base.rb +140 -101
- data/lib/whois/answer/parser/jobswhois.verisign-grs.com.rb +99 -0
- data/lib/whois/answer/parser/whois.adamsnames.tc.rb +64 -0
- data/lib/whois/answer/parser/whois.aeda.net.ae.rb +65 -0
- data/lib/whois/answer/parser/whois.aero.rb +6 -6
- data/lib/whois/answer/parser/whois.afilias-grs.info.rb +6 -6
- data/lib/whois/answer/parser/whois.afilias.info.rb +12 -12
- data/lib/whois/answer/parser/whois.biz.rb +72 -0
- data/lib/whois/answer/parser/whois.cat.rb +74 -0
- data/lib/whois/answer/parser/whois.cira.ca.rb +77 -0
- data/lib/whois/answer/parser/whois.crsnic.net.rb +16 -13
- data/lib/whois/answer/parser/whois.denic.de.rb +14 -18
- data/lib/whois/answer/parser/whois.dk-hostmaster.dk.rb +75 -0
- data/lib/whois/answer/parser/whois.domain-registry.nl.rb +72 -0
- data/lib/whois/answer/parser/whois.domainregistry.ie.rb +7 -13
- data/lib/whois/answer/parser/whois.dotmobiregistry.net.rb +72 -0
- data/lib/whois/answer/parser/whois.educause.edu.rb +8 -8
- data/lib/whois/answer/parser/whois.eu.org.rb +8 -17
- data/lib/whois/answer/parser/whois.eu.rb +64 -0
- data/lib/whois/answer/parser/whois.iana.org.rb +6 -9
- data/lib/whois/answer/parser/whois.isnic.is.rb +72 -0
- data/lib/whois/answer/parser/whois.meregistry.net.rb +72 -0
- data/lib/whois/answer/parser/whois.museum.rb +76 -0
- data/lib/whois/answer/parser/whois.nic-se.se.rb +77 -0
- data/lib/whois/answer/parser/whois.nic.ac.rb +92 -0
- data/lib/whois/answer/parser/whois.nic.asia.rb +12 -12
- data/lib/whois/answer/parser/whois.nic.cc.rb +99 -0
- data/lib/whois/answer/parser/whois.nic.cd.rb +68 -0
- data/lib/whois/answer/parser/whois.nic.ch.rb +64 -0
- data/lib/whois/answer/parser/whois.nic.coop.rb +74 -0
- data/lib/whois/answer/parser/whois.nic.fr.rb +8 -11
- data/lib/whois/answer/parser/whois.nic.gl.rb +77 -0
- data/lib/whois/answer/parser/whois.nic.gov.rb +8 -17
- data/lib/whois/answer/parser/whois.nic.hu.rb +21 -19
- data/lib/whois/answer/parser/whois.nic.im.rb +68 -0
- data/lib/whois/answer/parser/whois.nic.io.rb +64 -0
- data/lib/whois/answer/parser/whois.nic.it.rb +16 -16
- data/lib/whois/answer/parser/whois.nic.ly.rb +76 -0
- data/lib/whois/answer/parser/whois.nic.mu.rb +77 -0
- data/lib/whois/answer/parser/whois.nic.name.rb +8 -17
- data/lib/whois/answer/parser/whois.nic.nu.rb +84 -0
- data/lib/whois/answer/parser/whois.nic.tel.rb +76 -0
- data/lib/whois/answer/parser/whois.nic.tl.rb +76 -0
- data/lib/whois/answer/parser/whois.nic.travel.rb +72 -0
- data/lib/whois/answer/parser/whois.nic.tv.rb +16 -13
- data/lib/whois/answer/parser/whois.nic.uk.rb +82 -0
- data/lib/whois/answer/parser/whois.nic.us.rb +72 -0
- data/lib/whois/answer/parser/whois.norid.no.rb +72 -0
- data/lib/whois/answer/parser/whois.publicinterestregistry.net.rb +16 -16
- data/lib/whois/answer/parser/whois.register.bg.rb +74 -0
- data/lib/whois/answer/parser/whois.registro.br.rb +64 -0
- data/lib/whois/answer/parser/whois.registrypro.pro.rb +77 -0
- data/lib/whois/answer/parser/whois.ripe.net.rb +64 -0
- data/lib/whois/answer/parser/whois.ripn.net.rb +72 -0
- data/lib/whois/answer/parser/whois.rotld.ro.rb +64 -0
- data/lib/whois/answer/parser/whois.samoanic.ws.rb +76 -0
- data/lib/whois/answer/parser/whois.za.net.rb +8 -11
- data/lib/whois/answer/parser/whois.za.org.rb +7 -10
- data/lib/whois/answer/super_struct.rb +1 -1
- data/lib/whois/client.rb +4 -4
- data/lib/whois/definitions/NOTES.txt +12 -0
- data/lib/whois/definitions/ipv4.rb +2 -0
- data/lib/whois/definitions/tlds.rb +27 -27
- data/lib/whois/errors.rb +11 -1
- data/lib/whois/server.rb +1 -0
- data/lib/whois/server/adapters/web.rb +1 -2
- data/lib/whois/version.rb +4 -4
- data/test/answer/parser/base_test.rb +16 -29
- data/test/answer/parser/jobswhois.verisign-grs.com_test.rb +122 -0
- data/test/answer/parser/whois.adamsnames.tc_test.rb +122 -0
- data/test/answer/parser/whois.aeda.net.ae_test.rb +63 -0
- data/test/answer/parser/whois.afilias-grs.info_test.rb +274 -13
- data/test/answer/parser/whois.afilias.info_test.rb +1 -1
- data/test/answer/parser/whois.biz_test.rb +51 -0
- data/test/answer/parser/whois.cat_test.rb +51 -0
- data/test/answer/parser/whois.cira.ca_test.rb +51 -0
- data/test/answer/parser/whois.crsnic.net_test.rb +8 -3
- data/test/answer/parser/whois.denic.de_test.rb +11 -18
- data/test/answer/parser/whois.dk-hostmaster.dk_test.rb +57 -0
- data/test/answer/parser/whois.domain-registry.nl_test.rb +49 -0
- data/test/answer/parser/whois.domainregistry.ie_test.rb +7 -11
- data/test/answer/parser/whois.dotmobiregistry.net_test.rb +51 -0
- data/test/answer/parser/whois.educause.edu_test.rb +3 -3
- data/test/answer/parser/whois.eu.org_test.rb +6 -12
- data/test/answer/parser/whois.eu_test.rb +45 -0
- data/test/answer/parser/whois.iana.org_test.rb +2 -4
- data/test/answer/parser/whois.isnic.is_test.rb +49 -0
- data/test/answer/parser/whois.meregistry.net_test.rb +51 -0
- data/test/answer/parser/whois.museum_test.rb +51 -0
- data/test/answer/parser/whois.nic-se.se_test.rb +58 -0
- data/test/answer/parser/whois.nic.ac_test.rb +126 -0
- data/test/answer/parser/whois.nic.asia_test.rb +1 -1
- data/test/answer/parser/whois.nic.cc_test.rb +122 -0
- data/test/answer/parser/whois.nic.cd_test.rb +49 -0
- data/test/answer/parser/whois.nic.ch_test.rb +45 -0
- data/test/answer/parser/whois.nic.coop_test.rb +51 -0
- data/test/answer/parser/whois.nic.fr_test.rb +178 -13
- data/test/answer/parser/whois.nic.gl_test.rb +51 -0
- data/test/answer/parser/whois.nic.gov_test.rb +6 -12
- data/test/answer/parser/whois.nic.hu_test.rb +9 -7
- data/test/answer/parser/whois.nic.im_test.rb +47 -0
- data/test/answer/parser/whois.nic.io_test.rb +45 -0
- data/test/answer/parser/whois.nic.it_test.rb +6 -3
- data/test/answer/parser/whois.nic.ly_test.rb +51 -0
- data/test/answer/parser/whois.nic.mu_test.rb +97 -0
- data/test/answer/parser/whois.nic.name_test.rb +6 -12
- data/test/answer/parser/whois.nic.nu_test.rb +59 -0
- data/test/answer/parser/whois.nic.tel_test.rb +51 -0
- data/test/answer/parser/whois.nic.tl_test.rb +51 -0
- data/test/answer/parser/whois.nic.travel_test.rb +51 -0
- data/test/answer/parser/whois.nic.tv_test.rb +9 -5
- data/test/answer/parser/whois.nic.uk_test.rb +63 -0
- data/test/answer/parser/whois.nic.us_test.rb +51 -0
- data/test/answer/parser/whois.norid.no_test.rb +49 -0
- data/test/answer/parser/whois.register.bg_test.rb +49 -0
- data/test/answer/parser/whois.registro.br_test.rb +45 -0
- data/test/answer/parser/whois.registrypro.pro_test.rb +84 -0
- data/test/answer/parser/whois.ripe.net_test.rb +203 -0
- data/test/answer/parser/whois.ripn.net_test.rb +94 -0
- data/test/answer/parser/whois.rotld.ro_test.rb +45 -0
- data/test/answer/parser/whois.samoanic.ws_test.rb +51 -0
- data/test/answer/parser/whois.za.net_test.rb +2 -4
- data/test/answer/parser/whois.za.org_test.rb +2 -4
- data/test/answer/parser_test.rb +71 -48
- data/test/answer_test.rb +57 -21
- data/test/client_test.rb +5 -2
- data/test/errors_test.rb +23 -0
- data/test/list_tld +74 -76
- data/test/testcases/responses/jobswhois.verisign-grs.com/available.txt +44 -0
- data/test/testcases/responses/jobswhois.verisign-grs.com/registered.txt +54 -0
- data/test/testcases/responses/super_struct_test.rb +3 -4
- data/test/testcases/responses/whois.adamsnames.tc/gd/available.txt +2 -0
- data/test/testcases/responses/whois.adamsnames.tc/gd/registered.txt +26 -0
- data/test/testcases/responses/whois.adamsnames.tc/tc/available.txt +2 -0
- data/test/testcases/responses/whois.adamsnames.tc/tc/registered.txt +28 -0
- data/test/testcases/responses/whois.adamsnames.tc/vg/available.txt +2 -0
- data/test/testcases/responses/whois.adamsnames.tc/vg/registered.txt +28 -0
- data/test/testcases/responses/whois.aeda.net.ae/available.txt +1 -0
- data/test/testcases/responses/whois.aeda.net.ae/registered.txt +15 -0
- data/test/testcases/responses/whois.biz/available.txt +25 -0
- data/test/testcases/responses/whois.biz/registered.txt +89 -0
- data/test/testcases/responses/whois.cat/available.txt +18 -0
- data/test/testcases/responses/whois.cat/registered.txt +83 -0
- data/test/testcases/responses/whois.cira.ca/available.txt +9 -0
- data/test/testcases/responses/whois.cira.ca/registered.txt +47 -0
- data/test/testcases/responses/whois.dk-hostmaster.dk/available.txt +15 -0
- data/test/testcases/responses/whois.dk-hostmaster.dk/registered.txt +47 -0
- data/test/testcases/responses/whois.domain-registry.nl/available.txt +21 -0
- data/test/testcases/responses/whois.domain-registry.nl/registered.txt +67 -0
- data/test/testcases/responses/whois.dotmobiregistry.net/available.txt +25 -0
- data/test/testcases/responses/whois.dotmobiregistry.net/registered.txt +81 -0
- data/test/testcases/responses/whois.eu/available.txt +47 -0
- data/test/testcases/responses/whois.eu/registered.txt +63 -0
- data/test/testcases/responses/whois.isnic.is/available.txt +7 -0
- data/test/testcases/responses/whois.isnic.is/registered.txt +57 -0
- data/test/testcases/responses/{whois.afilias-grs.info → whois.meregistry.net}/available.txt +0 -0
- data/test/testcases/responses/whois.meregistry.net/registered.txt +94 -0
- data/test/testcases/responses/whois.museum/available.txt +18 -0
- data/test/testcases/responses/whois.museum/registered.txt +92 -0
- data/test/testcases/responses/whois.nic-se.se/available.txt +21 -0
- data/test/testcases/responses/whois.nic-se.se/registered.txt +37 -0
- data/test/testcases/responses/whois.nic.ac/available.txt +2 -0
- data/test/testcases/responses/whois.nic.ac/registered.txt +2 -0
- data/test/testcases/responses/whois.nic.cc/available.txt +44 -0
- data/test/testcases/responses/whois.nic.cc/registered.txt +58 -0
- data/test/testcases/responses/whois.nic.cd/available.txt +1 -0
- data/test/testcases/responses/whois.nic.cd/registered.txt +85 -0
- data/test/testcases/responses/whois.nic.ch/available.txt +2 -0
- data/test/testcases/responses/whois.nic.ch/registered.txt +28 -0
- data/test/testcases/responses/whois.nic.coop/available.txt +33 -0
- data/test/testcases/responses/whois.nic.coop/registered.txt +123 -0
- data/test/testcases/responses/whois.nic.fr/{available.txt → fr/available.txt} +0 -0
- data/test/testcases/responses/whois.nic.fr/{registered.txt → fr/registered.txt} +0 -0
- data/test/testcases/responses/whois.nic.fr/pm/available.txt +19 -0
- data/test/testcases/responses/whois.nic.fr/pm/registered.txt +88 -0
- data/test/testcases/responses/whois.nic.fr/re/available.txt +19 -0
- data/test/testcases/responses/whois.nic.fr/re/registered.txt +83 -0
- data/test/testcases/responses/whois.nic.fr/wf/available.txt +19 -0
- data/test/testcases/responses/whois.nic.fr/wf/registered.txt +88 -0
- data/test/testcases/responses/whois.nic.fr/yt/available.txt +19 -0
- data/test/testcases/responses/whois.nic.fr/yt/registered.txt +88 -0
- data/test/testcases/responses/whois.nic.gl/available.txt +23 -0
- data/test/testcases/responses/whois.nic.gl/registered.txt +40 -0
- data/test/testcases/responses/whois.nic.hu/available.txt +5 -5
- data/test/testcases/responses/whois.nic.hu/in_progress.txt +5 -5
- data/test/testcases/responses/whois.nic.hu/registered.txt +6 -6
- data/test/testcases/responses/whois.nic.im/available.txt +2 -0
- data/test/testcases/responses/whois.nic.im/registered.txt +45 -0
- data/test/testcases/responses/whois.nic.io/available.txt +2 -0
- data/test/testcases/responses/whois.nic.io/registered.txt +2 -0
- data/test/testcases/responses/whois.nic.ly/available.txt +1 -0
- data/test/testcases/responses/whois.nic.ly/registered.txt +65 -0
- data/test/testcases/responses/whois.nic.mu/ki/available.txt +20 -0
- data/test/testcases/responses/whois.nic.mu/ki/registered.txt +30 -0
- data/test/testcases/responses/whois.nic.mu/mu/available.txt +9 -0
- data/test/testcases/responses/whois.nic.mu/mu/registered.txt +22 -0
- data/test/testcases/responses/whois.nic.nu/available.txt +19 -0
- data/test/testcases/responses/whois.nic.nu/registered.txt +35 -0
- data/test/testcases/responses/whois.nic.tel/available.txt +59 -0
- data/test/testcases/responses/whois.nic.tel/registered.txt +111 -0
- data/test/testcases/responses/whois.nic.tl/available.txt +21 -0
- data/test/testcases/responses/whois.nic.tl/registered.txt +29 -0
- data/test/testcases/responses/whois.nic.travel/available.txt +25 -0
- data/test/testcases/responses/whois.nic.travel/registered.txt +75 -0
- data/test/testcases/responses/whois.nic.uk/available.txt +20 -0
- data/test/testcases/responses/whois.nic.uk/invalid.txt +22 -0
- data/test/testcases/responses/whois.nic.uk/registered.txt +50 -0
- data/test/testcases/responses/whois.nic.us/available.txt +29 -0
- data/test/testcases/responses/whois.nic.us/registered.txt +99 -0
- data/test/testcases/responses/whois.norid.no/available.txt +5 -0
- data/test/testcases/responses/whois.norid.no/registered.txt +34 -0
- data/test/testcases/responses/whois.register.bg/available.txt +1 -0
- data/test/testcases/responses/whois.register.bg/registered.txt +44 -0
- data/test/testcases/responses/whois.registro.br/available.txt +22 -0
- data/test/testcases/responses/whois.registro.br/registered.txt +23 -0
- data/test/testcases/responses/whois.registrypro.pro/available.txt +20 -0
- data/test/testcases/responses/whois.registrypro.pro/registered.txt +62 -0
- data/test/testcases/responses/whois.ripe.net/fo/available.txt +11 -0
- data/test/testcases/responses/whois.ripe.net/fo/registered.txt +45 -0
- data/test/testcases/responses/whois.ripe.net/gm/available.txt +11 -0
- data/test/testcases/responses/whois.ripe.net/gm/registered.txt +37 -0
- data/test/testcases/responses/whois.ripe.net/mc/available.txt +11 -0
- data/test/testcases/responses/whois.ripe.net/mc/registered.txt +36 -0
- data/test/testcases/responses/whois.ripe.net/sm/available.txt +11 -0
- data/test/testcases/responses/whois.ripe.net/sm/registered.txt +60 -0
- data/test/testcases/responses/whois.ripe.net/va/available.txt +11 -0
- data/test/testcases/responses/whois.ripe.net/va/registered.txt +48 -0
- data/test/testcases/responses/whois.ripn.net/ru/available.txt +9 -0
- data/test/testcases/responses/whois.ripn.net/ru/registered.txt +24 -0
- data/test/testcases/responses/whois.ripn.net/su/available.txt +9 -0
- data/test/testcases/responses/whois.ripn.net/su/registered.txt +20 -0
- data/test/testcases/responses/whois.rotld.ro/available.txt +16 -0
- data/test/testcases/responses/whois.rotld.ro/registered.txt +27 -0
- data/test/testcases/responses/whois.samoanic.ws/available.txt +12 -0
- data/test/testcases/responses/whois.samoanic.ws/registered.txt +34 -0
- data/whois.gemspec +19 -19
- metadata +274 -31
- data/lib/whois/answer/parser/README.rdoc +0 -21
- data/lib/whois/definitions/ipv4.txt +0 -214
- data/lib/whois/definitions/ipv6.txt +0 -32
- data/lib/whois/definitions/tld.notes.txt +0 -1
- data/lib/whois/definitions/tlds.txt +0 -354
- data/lib/whois/whois.rb +0 -185
- data/test/testcases/responses/whois.afilias-grs.info/registered.txt +0 -122
- data/test/testcases/responses/whois.nic.fr/MULTIPLE.txt +0 -4
- data/test/whois_test.rb +0 -32
- data/utils/tlds.txt +0 -318
@@ -34,7 +34,7 @@ module Whois
|
|
34
34
|
#
|
35
35
|
class WhoisZaOrg < Base
|
36
36
|
|
37
|
-
|
37
|
+
property_supported :status do
|
38
38
|
if available?
|
39
39
|
:available
|
40
40
|
else
|
@@ -42,31 +42,28 @@ module Whois
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
|
45
|
+
property_supported :available? do
|
46
46
|
@available ||= !!(content.to_s =~ /No such domain:/)
|
47
47
|
end
|
48
48
|
|
49
|
-
|
49
|
+
property_supported :registered? do
|
50
50
|
!available?
|
51
51
|
end
|
52
52
|
|
53
53
|
|
54
|
-
|
54
|
+
property_supported :created_on do
|
55
55
|
@created_on ||= if content.to_s =~ /Record Created\s+:\s+(.*)\n/
|
56
56
|
Time.parse($1)
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
|
60
|
+
property_supported :updated_on do
|
61
61
|
@updated_on ||= if content.to_s =~ /Record Last Updated\s+:\s+(.*)\n/
|
62
62
|
Time.parse($1)
|
63
63
|
end
|
64
64
|
end
|
65
|
-
|
66
|
-
|
67
|
-
register_method :expires_on do
|
68
|
-
nil
|
69
|
-
end
|
65
|
+
|
66
|
+
property_not_supported :expires_on
|
70
67
|
|
71
68
|
end
|
72
69
|
|
@@ -24,7 +24,7 @@ require 'ostruct'
|
|
24
24
|
#
|
25
25
|
# Compared with the original version, it provides the following additional features:
|
26
26
|
# * ability to initialize an instance from Hash
|
27
|
-
# * ability to pass a block on creation
|
27
|
+
# * ability to pass a block on creation
|
28
28
|
#
|
29
29
|
class SuperStruct < Struct
|
30
30
|
|
data/lib/whois/client.rb
CHANGED
@@ -23,7 +23,7 @@ module Whois
|
|
23
23
|
class Client
|
24
24
|
|
25
25
|
# The maximum time to run a whois query expressed in seconds
|
26
|
-
DEFAULT_TIMEOUT =
|
26
|
+
DEFAULT_TIMEOUT = 10
|
27
27
|
|
28
28
|
attr_accessor :timeout
|
29
29
|
|
@@ -67,10 +67,10 @@ module Whois
|
|
67
67
|
# # => #<Whois::Answer>
|
68
68
|
#
|
69
69
|
def query(qstring)
|
70
|
-
|
70
|
+
string = qstring.to_s
|
71
71
|
Timeout::timeout(timeout) do
|
72
|
-
@server = Server.guess(
|
73
|
-
@server.query(
|
72
|
+
@server = Server.guess(string)
|
73
|
+
@server.query(string)
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
ec # debian: "whois.nic.ec is restricted", however it provides enough details - including creation, expiration - to use it
|
2
|
+
ki # http://www.iana.org/domains/root/db/ki.html whois.nic.ki timeouts
|
3
|
+
md # debian: "whois.nic.md is restricted", however it provides enough details - including creation, expiration - to use it
|
4
|
+
mn # http://www.iana.org/domains/root/db/mn.html whois.nic.mn tested and not working. maintenance page
|
5
|
+
mp # http://www.iana.org/domains/root/db/mp.html whois.nic.mp doesn't work
|
6
|
+
so # http://www.iana.org/domains/root/db/so.html whois.nic.so doesn't work
|
7
|
+
fo # http://www.iana.org/domains/root/db/fo.html empty, but whois.ripe.net works
|
8
|
+
gm # http://www.iana.org/domains/root/db/gm.html empty, but whois.ripe.net works
|
9
|
+
mc # http://www.iana.org/domains/root/db/mc.html empty, but whois.ripe.net works
|
10
|
+
va # http://www.iana.org/domains/root/db/va.html empty, but whois.ripe.net works
|
11
|
+
wf # http://www.iana.org/domains/root/db/wf.html provides whois.nic.wf, but using whois.nic.fr for compatibility with debian whois and to reuse parser
|
12
|
+
yt # http://www.iana.org/domains/root/db/wf.html provides whois.nic.yt, but using whois.nic.fr for compatibility with debian whois and to reuse parser
|
@@ -1,6 +1,8 @@
|
|
1
|
+
Whois::Server.define :ipv4, "2.0.0.0/8", "whois.ripe.net"
|
1
2
|
Whois::Server.define :ipv4, "24.132.0.0/14", "whois.ripe.net"
|
2
3
|
Whois::Server.define :ipv4, "41.0.0.0/8", "whois.afrinic.net"
|
3
4
|
Whois::Server.define :ipv4, "43.0.0.0/8", "whois.v6nic.net"
|
5
|
+
Whois::Server.define :ipv4, "46.0.0.0/8", "whois.v6nic.net"
|
4
6
|
Whois::Server.define :ipv4, "51.0.0.0/8", "whois.ripe.net"
|
5
7
|
Whois::Server.define :ipv4, "59.0.0.0/11", "whois.nic.or.kr"
|
6
8
|
Whois::Server.define :ipv4, "58.0.0.0/7", "whois.apnic.net"
|
@@ -23,17 +23,17 @@ Whois::Server.define :tld, ".za.net", "whois.za.net"
|
|
23
23
|
Whois::Server.define :tld, ".net", "whois.crsnic.net", {:adapter=>Whois::Server::Adapters::Verisign}
|
24
24
|
Whois::Server.define :tld, ".eu.org", "whois.eu.org"
|
25
25
|
Whois::Server.define :tld, ".za.org", "whois.za.org"
|
26
|
-
Whois::Server.define :tld, ".org", "whois.publicinterestregistry.net"
|
26
|
+
Whois::Server.define :tld, ".org", "whois.publicinterestregistry.net", {:adapter=>Whois::Server::Adapters::Pir}
|
27
27
|
Whois::Server.define :tld, ".edu", "whois.educause.edu"
|
28
28
|
Whois::Server.define :tld, ".gov", "whois.nic.gov"
|
29
29
|
Whois::Server.define :tld, ".int", "whois.iana.org"
|
30
30
|
Whois::Server.define :tld, ".mil", nil, {:adapter=>Whois::Server::Adapters::None}
|
31
31
|
Whois::Server.define :tld, ".e164.arpa", "whois.ripe.net"
|
32
|
-
Whois::Server.define :tld, ".in-addr.arpa", nil
|
32
|
+
Whois::Server.define :tld, ".in-addr.arpa", nil, {:adapter=>Whois::Server::Adapters::Arpa}
|
33
33
|
Whois::Server.define :tld, ".arpa", "whois.iana.org"
|
34
34
|
Whois::Server.define :tld, ".aero", "whois.aero"
|
35
35
|
Whois::Server.define :tld, ".asia", "whois.nic.asia"
|
36
|
-
Whois::Server.define :tld, ".biz", "whois.
|
36
|
+
Whois::Server.define :tld, ".biz", "whois.biz"
|
37
37
|
Whois::Server.define :tld, ".cat", "whois.cat", {:adapter=>Whois::Server::Adapters::Formatted, :format => "-C US-ASCII ace %s"}
|
38
38
|
Whois::Server.define :tld, ".coop", "whois.nic.coop"
|
39
39
|
Whois::Server.define :tld, ".info", "whois.afilias.info"
|
@@ -64,17 +64,17 @@ Whois::Server.define :tld, ".ax", nil, {:adapter=>Whois::Server::Adapters::None}
|
|
64
64
|
Whois::Server.define :tld, ".az", nil, {:web=>"http://www.nic.az/AzCheck.htm", :adapter=>Whois::Server::Adapters::Web}
|
65
65
|
Whois::Server.define :tld, ".ba", nil, {:web=>"http://www.nic.ba/stream/whois/", :adapter=>Whois::Server::Adapters::Web}
|
66
66
|
Whois::Server.define :tld, ".bb", nil, {:web=>"http://www.barbadosdomains.net/search_domain.php", :adapter=>Whois::Server::Adapters::Web}
|
67
|
-
Whois::Server.define :tld, ".bd", "www.whois.com.bd"
|
67
|
+
Whois::Server.define :tld, ".bd", nil, {:web=>"http://www.whois.com.bd/", :adapter=>Whois::Server::Adapters::Web}
|
68
68
|
Whois::Server.define :tld, ".be", "whois.dns.be"
|
69
69
|
Whois::Server.define :tld, ".bf", nil, {:adapter=>Whois::Server::Adapters::None}
|
70
70
|
Whois::Server.define :tld, ".bg", "whois.register.bg"
|
71
71
|
Whois::Server.define :tld, ".bh", nil, {:adapter=>Whois::Server::Adapters::None}
|
72
|
-
Whois::Server.define :tld, ".bi", nil, {:web=>"http://
|
72
|
+
Whois::Server.define :tld, ".bi", nil, {:web=>"http://whois.nic.bi/register/whois.hei", :adapter=>Whois::Server::Adapters::Web}
|
73
73
|
Whois::Server.define :tld, ".bj", "whois.nic.bj"
|
74
74
|
Whois::Server.define :tld, ".bm", nil, {:web=>"http://207.228.133.14/cgi-bin/lansaweb?procfun+BMWHO+BMWHO2+WHO", :adapter=>Whois::Server::Adapters::Web}
|
75
75
|
Whois::Server.define :tld, ".bn", nil, {:adapter=>Whois::Server::Adapters::None}
|
76
76
|
Whois::Server.define :tld, ".bo", nil, {:web=>"http://www.nic.bo/", :adapter=>Whois::Server::Adapters::Web}
|
77
|
-
Whois::Server.define :tld, ".br", "whois.
|
77
|
+
Whois::Server.define :tld, ".br", "whois.registro.br"
|
78
78
|
Whois::Server.define :tld, ".bs", nil, {:web=>"http://www.nic.bs/cgi-bin/search.pl", :adapter=>Whois::Server::Adapters::Web}
|
79
79
|
Whois::Server.define :tld, ".bt", nil, {:web=>"http://www.nic.bt/", :adapter=>Whois::Server::Adapters::Web}
|
80
80
|
Whois::Server.define :tld, ".bv", nil, {:adapter=>Whois::Server::Adapters::None}
|
@@ -91,7 +91,7 @@ Whois::Server.define :tld, ".ch", "whois.nic.ch"
|
|
91
91
|
Whois::Server.define :tld, ".ci", "www.nic.ci"
|
92
92
|
Whois::Server.define :tld, ".ck", "whois.nic.ck"
|
93
93
|
Whois::Server.define :tld, ".cl", "whois.nic.cl"
|
94
|
-
Whois::Server.define :tld, ".cm", nil, {:adapter=>Whois::Server::Adapters::
|
94
|
+
Whois::Server.define :tld, ".cm", nil, {:web=>"http://netcom.cm/whois.php", :adapter=>Whois::Server::Adapters::Web}
|
95
95
|
Whois::Server.define :tld, ".edu.cn", "whois.edu.cn"
|
96
96
|
Whois::Server.define :tld, ".cn", "whois.cnnic.net.cn"
|
97
97
|
Whois::Server.define :tld, ".uk.co", "whois.uk.co"
|
@@ -104,7 +104,7 @@ Whois::Server.define :tld, ".cy", nil, {:web=>"http://www.nic.cy/nslookup/online
|
|
104
104
|
Whois::Server.define :tld, ".cz", "whois.nic.cz"
|
105
105
|
Whois::Server.define :tld, ".de", "whois.denic.de", {:adapter=>Whois::Server::Adapters::Formatted, :format => "-T dn,ace -C US-ASCII %s"}
|
106
106
|
Whois::Server.define :tld, ".dj", "whois.domain.dj"
|
107
|
-
Whois::Server.define :tld, ".dk", "whois.dk-hostmaster.dk"
|
107
|
+
Whois::Server.define :tld, ".dk", "whois.dk-hostmaster.dk", {:adapter=>Whois::Server::Adapters::Formatted, :format => "--show-handles %s"}
|
108
108
|
Whois::Server.define :tld, ".dm", "whois.nic.dm"
|
109
109
|
Whois::Server.define :tld, ".do", nil, {:web=>"http://www.nic.do/whois-h.php3", :adapter=>Whois::Server::Adapters::Web}
|
110
110
|
Whois::Server.define :tld, ".dz", nil, {:web=>"https://www.nic.dz/", :adapter=>Whois::Server::Adapters::Web}
|
@@ -124,8 +124,8 @@ Whois::Server.define :tld, ".fr", "whois.nic.fr"
|
|
124
124
|
Whois::Server.define :tld, ".ga", nil, {:adapter=>Whois::Server::Adapters::None}
|
125
125
|
Whois::Server.define :tld, ".gb", nil, {:adapter=>Whois::Server::Adapters::None}
|
126
126
|
Whois::Server.define :tld, ".gd", "whois.adamsnames.tc"
|
127
|
-
Whois::Server.define :tld, ".ge", nil, {:web=>"http://
|
128
|
-
Whois::Server.define :tld, ".gf", "
|
127
|
+
Whois::Server.define :tld, ".ge", nil, {:web=>"http://www.registration.ge/", :adapter=>Whois::Server::Adapters::Web}
|
128
|
+
Whois::Server.define :tld, ".gf", nil, {:web=>"http://www.nic.gf/?id=whois", :adapter=>Whois::Server::Adapters::Web}
|
129
129
|
Whois::Server.define :tld, ".gg", "whois.gg"
|
130
130
|
Whois::Server.define :tld, ".gh", nil, {:web=>"http://www.nic.gh/customer/search_c.htm", :adapter=>Whois::Server::Adapters::Web}
|
131
131
|
Whois::Server.define :tld, ".gi", "whois.afilias-grs.info", {:adapter=>Whois::Server::Adapters::Afilias}
|
@@ -146,7 +146,7 @@ Whois::Server.define :tld, ".hn", "whois.afilias-grs.info", {:adapter=>Whois::Se
|
|
146
146
|
Whois::Server.define :tld, ".hr", nil, {:web=>"http://www.dns.hr/pretrazivanje.html", :adapter=>Whois::Server::Adapters::Web}
|
147
147
|
Whois::Server.define :tld, ".ht", "whois.nic.ht"
|
148
148
|
Whois::Server.define :tld, ".hu", "whois.nic.hu"
|
149
|
-
Whois::Server.define :tld, ".id", "whois.
|
149
|
+
Whois::Server.define :tld, ".id", "whois.pandi.or.id"
|
150
150
|
Whois::Server.define :tld, ".ie", "whois.domainregistry.ie"
|
151
151
|
Whois::Server.define :tld, ".il", "whois.isoc.org.il"
|
152
152
|
Whois::Server.define :tld, ".im", "whois.nic.im"
|
@@ -154,7 +154,7 @@ Whois::Server.define :tld, ".in", "whois.registry.in"
|
|
154
154
|
Whois::Server.define :tld, ".io", "whois.nic.io"
|
155
155
|
Whois::Server.define :tld, ".iq", nil, {:adapter=>Whois::Server::Adapters::None}
|
156
156
|
Whois::Server.define :tld, ".ir", "whois.nic.ir"
|
157
|
-
Whois::Server.define :tld, ".is", "whois.
|
157
|
+
Whois::Server.define :tld, ".is", "whois.isnic.is"
|
158
158
|
Whois::Server.define :tld, ".it", "whois.nic.it"
|
159
159
|
Whois::Server.define :tld, ".je", "whois.je"
|
160
160
|
Whois::Server.define :tld, ".jm", nil, {:adapter=>Whois::Server::Adapters::None}
|
@@ -163,9 +163,9 @@ Whois::Server.define :tld, ".jp", "whois.jprs.jp"
|
|
163
163
|
Whois::Server.define :tld, ".ke", "whois.kenic.or.ke"
|
164
164
|
Whois::Server.define :tld, ".kg", "whois.domain.kg"
|
165
165
|
Whois::Server.define :tld, ".kh", nil, {:adapter=>Whois::Server::Adapters::None}
|
166
|
-
Whois::Server.define :tld, ".ki",
|
166
|
+
Whois::Server.define :tld, ".ki", "whois.nic.mu"
|
167
167
|
Whois::Server.define :tld, ".km", nil, {:adapter=>Whois::Server::Adapters::None}
|
168
|
-
Whois::Server.define :tld, ".kn", nil, {:adapter=>Whois::Server::Adapters::
|
168
|
+
Whois::Server.define :tld, ".kn", nil, {:web=>"http://www.nic.kn/", :adapter=>Whois::Server::Adapters::Web}
|
169
169
|
Whois::Server.define :tld, ".kp", "whois.kcce.kp"
|
170
170
|
Whois::Server.define :tld, ".kr", "whois.nic.or.kr"
|
171
171
|
Whois::Server.define :tld, ".kw", nil, {:web=>"http://www.kw/", :adapter=>Whois::Server::Adapters::Web}
|
@@ -177,7 +177,7 @@ Whois::Server.define :tld, ".lc", "whois.afilias-grs.info", {:adapter=>Whois::Se
|
|
177
177
|
Whois::Server.define :tld, ".li", "whois.nic.li"
|
178
178
|
Whois::Server.define :tld, ".lk", "whois.nic.lk"
|
179
179
|
Whois::Server.define :tld, ".lr", nil, {:adapter=>Whois::Server::Adapters::None}
|
180
|
-
Whois::Server.define :tld, ".ls", nil, {:web=>"http://www.co.ls/data/
|
180
|
+
Whois::Server.define :tld, ".ls", nil, {:web=>"http://www.co.ls/data/co.asp", :adapter=>Whois::Server::Adapters::Web}
|
181
181
|
Whois::Server.define :tld, ".lt", "whois.domreg.lt"
|
182
182
|
Whois::Server.define :tld, ".lu", "whois.dns.lu"
|
183
183
|
Whois::Server.define :tld, ".lv", "whois.nic.lv"
|
@@ -190,11 +190,11 @@ Whois::Server.define :tld, ".mg", "whois.nic.mg"
|
|
190
190
|
Whois::Server.define :tld, ".mh", nil, {:adapter=>Whois::Server::Adapters::None}
|
191
191
|
Whois::Server.define :tld, ".mk", nil, {:web=>"http://dns.marnet.net.mk/registar.php", :adapter=>Whois::Server::Adapters::Web}
|
192
192
|
Whois::Server.define :tld, ".ml", nil, {:adapter=>Whois::Server::Adapters::None}
|
193
|
-
Whois::Server.define :tld, ".mm",
|
193
|
+
Whois::Server.define :tld, ".mm", nil, {:adapter=>Whois::Server::Adapters::None}
|
194
194
|
Whois::Server.define :tld, ".mn", "whois.afilias-grs.info", {:adapter=>Whois::Server::Adapters::Afilias}
|
195
195
|
Whois::Server.define :tld, ".mo", nil, {:web=>"http://www.monic.net.mo/", :adapter=>Whois::Server::Adapters::Web}
|
196
196
|
Whois::Server.define :tld, ".mp", nil, {:adapter=>Whois::Server::Adapters::None}
|
197
|
-
Whois::Server.define :tld, ".mq",
|
197
|
+
Whois::Server.define :tld, ".mq", nil, {:adapter=>Whois::Server::Adapters::None}
|
198
198
|
Whois::Server.define :tld, ".mr", nil, {:adapter=>Whois::Server::Adapters::None}
|
199
199
|
Whois::Server.define :tld, ".ms", "whois.nic.ms"
|
200
200
|
Whois::Server.define :tld, ".mt", nil, {:web=>"https://www.nic.org.mt/dotmt/", :adapter=>Whois::Server::Adapters::Web}
|
@@ -202,7 +202,7 @@ Whois::Server.define :tld, ".mu", "whois.nic.mu"
|
|
202
202
|
Whois::Server.define :tld, ".mv", nil, {:adapter=>Whois::Server::Adapters::None}
|
203
203
|
Whois::Server.define :tld, ".mw", nil, {:web=>"http://www.registrar.mw/", :adapter=>Whois::Server::Adapters::Web}
|
204
204
|
Whois::Server.define :tld, ".mx", "whois.nic.mx"
|
205
|
-
Whois::Server.define :tld, ".my", "whois.
|
205
|
+
Whois::Server.define :tld, ".my", "whois.domainregistry.my"
|
206
206
|
Whois::Server.define :tld, ".mz", nil, {:adapter=>Whois::Server::Adapters::None}
|
207
207
|
Whois::Server.define :tld, ".na", "whois.na-nic.com.na"
|
208
208
|
Whois::Server.define :tld, ".nc", "whois.cctld.nc"
|
@@ -212,7 +212,7 @@ Whois::Server.define :tld, ".ng", "whois.register.net.ng"
|
|
212
212
|
Whois::Server.define :tld, ".ni", nil, {:web=>"http://www.nic.ni/consulta.htm", :adapter=>Whois::Server::Adapters::Web}
|
213
213
|
Whois::Server.define :tld, ".nl", "whois.domain-registry.nl"
|
214
214
|
Whois::Server.define :tld, ".no", "whois.norid.no"
|
215
|
-
Whois::Server.define :tld, ".np", nil, {:web=>"http://
|
215
|
+
Whois::Server.define :tld, ".np", nil, {:web=>"http://register.mos.com.np/userSearchInc.asp", :adapter=>Whois::Server::Adapters::Web}
|
216
216
|
Whois::Server.define :tld, ".nr", nil, {:web=>"http://www.cenpac.net.nr/dns/whois.html", :adapter=>Whois::Server::Adapters::Web}
|
217
217
|
Whois::Server.define :tld, ".nu", "whois.nic.nu"
|
218
218
|
Whois::Server.define :tld, ".nz", "whois.srs.net.nz"
|
@@ -230,7 +230,7 @@ Whois::Server.define :tld, ".pn", nil, {:web=>"http://www.pitcairn.pn/PnRegistry
|
|
230
230
|
Whois::Server.define :tld, ".pr", "whois.nic.pr"
|
231
231
|
Whois::Server.define :tld, ".ps", nil, {:web=>"http://www.nic.ps/whois/whois.html", :adapter=>Whois::Server::Adapters::Web}
|
232
232
|
Whois::Server.define :tld, ".pt", "whois.dns.pt"
|
233
|
-
Whois::Server.define :tld, ".pw",
|
233
|
+
Whois::Server.define :tld, ".pw", nil, {:adapter=>Whois::Server::Adapters::None}
|
234
234
|
Whois::Server.define :tld, ".py", nil, {:web=>"http://www.nic.py/consultas.html", :adapter=>Whois::Server::Adapters::Web}
|
235
235
|
Whois::Server.define :tld, ".qa", nil, {:adapter=>Whois::Server::Adapters::None}
|
236
236
|
Whois::Server.define :tld, ".re", "whois.nic.fr"
|
@@ -240,7 +240,7 @@ Whois::Server.define :tld, ".edu.ru", "whois.informika.ru"
|
|
240
240
|
Whois::Server.define :tld, ".ru", "whois.ripn.net"
|
241
241
|
Whois::Server.define :tld, ".rw", nil, {:web=>"http://www.nic.rw/cgi-bin/whoisrw.pl", :adapter=>Whois::Server::Adapters::Web}
|
242
242
|
Whois::Server.define :tld, ".sa", "saudinic.net.sa"
|
243
|
-
Whois::Server.define :tld, ".sb", "whois.
|
243
|
+
Whois::Server.define :tld, ".sb", "whois.coccaregistry.net"
|
244
244
|
Whois::Server.define :tld, ".sc", "whois.afilias-grs.info", {:adapter=>Whois::Server::Adapters::Afilias}
|
245
245
|
Whois::Server.define :tld, ".sd", nil, {:adapter=>Whois::Server::Adapters::None}
|
246
246
|
Whois::Server.define :tld, ".se", "whois.nic-se.se"
|
@@ -253,7 +253,7 @@ Whois::Server.define :tld, ".sl", "whois.nic.sl"
|
|
253
253
|
Whois::Server.define :tld, ".sm", "whois.ripe.net"
|
254
254
|
Whois::Server.define :tld, ".sn", "whois.nic.sn"
|
255
255
|
Whois::Server.define :tld, ".so", nil, {:adapter=>Whois::Server::Adapters::None}
|
256
|
-
Whois::Server.define :tld, ".sr",
|
256
|
+
Whois::Server.define :tld, ".sr", nil, {:adapter=>Whois::Server::Adapters::None}
|
257
257
|
Whois::Server.define :tld, ".st", "whois.nic.st"
|
258
258
|
Whois::Server.define :tld, ".su", "whois.ripn.net"
|
259
259
|
Whois::Server.define :tld, ".sv", nil, {:web=>"http://www.uca.edu.sv/dns/", :adapter=>Whois::Server::Adapters::Web}
|
@@ -264,14 +264,14 @@ Whois::Server.define :tld, ".td", nil, {:adapter=>Whois::Server::Adapters::None}
|
|
264
264
|
Whois::Server.define :tld, ".tf", "whois.nic.tf"
|
265
265
|
Whois::Server.define :tld, ".tg", nil, {:web=>"http://www.nic.tg/", :adapter=>Whois::Server::Adapters::Web}
|
266
266
|
Whois::Server.define :tld, ".th", "whois.thnic.net"
|
267
|
-
Whois::Server.define :tld, ".tj", "
|
267
|
+
Whois::Server.define :tld, ".tj", nil, {:web=>"http://www.nic.tj/whois.html", :adapter=>Whois::Server::Adapters::Web}
|
268
268
|
Whois::Server.define :tld, ".tk", "whois.dot.tk"
|
269
269
|
Whois::Server.define :tld, ".tl", "whois.nic.tl"
|
270
270
|
Whois::Server.define :tld, ".tm", "whois.nic.tm"
|
271
271
|
Whois::Server.define :tld, ".tn", nil, {:web=>"http://whois.ati.tn/", :adapter=>Whois::Server::Adapters::Web}
|
272
272
|
Whois::Server.define :tld, ".to", "whois.tonic.to"
|
273
|
-
Whois::Server.define :tld, ".tp",
|
274
|
-
Whois::Server.define :tld, ".tr", "whois.
|
273
|
+
Whois::Server.define :tld, ".tp", nil, {:adapter=>Whois::Server::Adapters::None}
|
274
|
+
Whois::Server.define :tld, ".tr", "whois.nic.tr"
|
275
275
|
Whois::Server.define :tld, ".tt", nil, {:web=>"http://www.nic.tt/cgi-bin/search.pl", :adapter=>Whois::Server::Adapters::Web}
|
276
276
|
Whois::Server.define :tld, ".tv", "whois.nic.tv", {:adapter=>Whois::Server::Adapters::Verisign}
|
277
277
|
Whois::Server.define :tld, ".tw", "whois.twnic.net"
|
@@ -302,10 +302,10 @@ Whois::Server.define :tld, ".vg", "whois.adamsnames.tc"
|
|
302
302
|
Whois::Server.define :tld, ".vi", nil, {:web=>"http://www.nic.vi/whoisform.htm", :adapter=>Whois::Server::Adapters::Web}
|
303
303
|
Whois::Server.define :tld, ".vn", nil, {:web=>"http://www.vnnic.vn/english/", :adapter=>Whois::Server::Adapters::Web}
|
304
304
|
Whois::Server.define :tld, ".vu", nil, {:web=>"http://www.vunic.vu/whois.html", :adapter=>Whois::Server::Adapters::Web}
|
305
|
-
Whois::Server.define :tld, ".wf", "whois.nic.
|
305
|
+
Whois::Server.define :tld, ".wf", "whois.nic.fr"
|
306
306
|
Whois::Server.define :tld, ".ws", "whois.samoanic.ws"
|
307
307
|
Whois::Server.define :tld, ".ye", nil, {:adapter=>Whois::Server::Adapters::None}
|
308
|
-
Whois::Server.define :tld, ".yt", "whois.nic.
|
308
|
+
Whois::Server.define :tld, ".yt", "whois.nic.fr"
|
309
309
|
Whois::Server.define :tld, ".yu", nil, {:adapter=>Whois::Server::Adapters::None}
|
310
310
|
Whois::Server.define :tld, ".ac.za", "whois.ac.za"
|
311
311
|
Whois::Server.define :tld, ".co.za", "whois.coza.net.za"
|
data/lib/whois/errors.rb
CHANGED
@@ -46,6 +46,11 @@ module Whois
|
|
46
46
|
# standard whois interface via port 43. This is the case of some
|
47
47
|
# specific domains that only provide a web–based WHOIS interface. (\x01)
|
48
48
|
class WebInterfaceError < InterfaceNotSupported
|
49
|
+
attr_reader :url
|
50
|
+
def initialize(url)
|
51
|
+
@url = url
|
52
|
+
super("This TLD has no whois server, but you can access the whois database at `#{@url}'")
|
53
|
+
end
|
49
54
|
end
|
50
55
|
|
51
56
|
# Server Known object, Definition unavailable
|
@@ -80,8 +85,13 @@ module Whois
|
|
80
85
|
end
|
81
86
|
|
82
87
|
# Raised when you are trying to access a property that is not supported
|
83
|
-
#
|
88
|
+
# for the current WHOIS answer.
|
84
89
|
class PropertyNotSupported < ParserError
|
85
90
|
end
|
86
91
|
|
92
|
+
# Raised when you are trying to access a property that is not supported
|
93
|
+
# by any of the parsers available for current WHOIS answer.
|
94
|
+
class PropertyNotAvailable < ParserError
|
95
|
+
end
|
96
|
+
|
87
97
|
end
|
data/lib/whois/server.rb
CHANGED
@@ -36,8 +36,7 @@ module Whois
|
|
36
36
|
# WebInterfaceError:: for every request
|
37
37
|
#
|
38
38
|
def request(qstring)
|
39
|
-
raise WebInterfaceError,
|
40
|
-
"but you can access the whois database at `#{options[:web]}'"
|
39
|
+
raise WebInterfaceError, options[:web]
|
41
40
|
end
|
42
41
|
|
43
42
|
end
|
data/lib/whois/version.rb
CHANGED
@@ -17,12 +17,12 @@
|
|
17
17
|
module Whois
|
18
18
|
|
19
19
|
module Version
|
20
|
-
MAJOR =
|
21
|
-
MINOR =
|
22
|
-
|
20
|
+
MAJOR = 1
|
21
|
+
MINOR = 0
|
22
|
+
TINY = 0
|
23
23
|
ALPHA = nil
|
24
24
|
|
25
|
-
STRING = [MAJOR, MINOR,
|
25
|
+
STRING = [MAJOR, MINOR, TINY, ALPHA].compact.join('.')
|
26
26
|
end
|
27
27
|
|
28
28
|
VERSION = Version::STRING
|
@@ -19,50 +19,37 @@ class AnswerParserBaseTest < Test::Unit::TestCase
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
|
23
|
-
def test_supported?
|
24
|
-
klass = Class.new(@klass) do
|
25
|
-
register_method(:disclaimer) {}
|
26
|
-
end
|
27
|
-
assert klass.new(@part).supported?(:disclaimer)
|
28
|
-
assert klass.new(@part).respond_to?(:disclaimer)
|
29
|
-
|
30
|
-
klass = Class.new(@klass) do
|
31
|
-
end
|
32
|
-
assert !klass.new(@part).supported?(:disclaimer)
|
33
|
-
assert klass.new(@part).respond_to?(:disclaimer)
|
34
|
-
end
|
35
|
-
|
36
|
-
# DEPRECATED
|
37
|
-
def test_supported_should_return_false_unless_registrable_method
|
22
|
+
def test_content
|
38
23
|
parser = @klass.new(@part)
|
39
|
-
|
40
|
-
assert parser.respond_to?(:content)
|
24
|
+
assert_equal @part.response, parser.content
|
41
25
|
end
|
42
26
|
|
27
|
+
|
43
28
|
def test_property_supported?
|
44
29
|
klass = Class.new(@klass) do
|
45
|
-
register_method(:disclaimer) {}
|
46
30
|
end
|
47
|
-
assert
|
31
|
+
assert !klass.new(@part).property_supported?(:disclaimer)
|
48
32
|
assert klass.new(@part).respond_to?(:disclaimer)
|
49
33
|
|
50
34
|
klass = Class.new(@klass) do
|
35
|
+
register_property(:disclaimer, :supported) {}
|
51
36
|
end
|
52
|
-
assert
|
37
|
+
assert klass.new(@part).property_supported?(:disclaimer)
|
53
38
|
assert klass.new(@part).respond_to?(:disclaimer)
|
54
39
|
end
|
55
40
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
assert parser.respond_to?(:content)
|
41
|
+
|
42
|
+
def test_self_property_registry
|
43
|
+
assert_instance_of Hash, @klass.property_registry
|
60
44
|
end
|
61
45
|
|
46
|
+
def test_self_property_registry_with_klass
|
47
|
+
assert_instance_of Hash, @klass.property_registry(Whois::Answer::Parser::WhoisNicIt)
|
48
|
+
end
|
62
49
|
|
63
|
-
def
|
64
|
-
parser =
|
65
|
-
assert_equal
|
50
|
+
def test_self_property_registry_with_klass_should_initialize_to_empty_hash
|
51
|
+
parser = Class.new
|
52
|
+
assert_equal Hash.new, @klass.property_registry(parser)
|
66
53
|
end
|
67
|
-
|
54
|
+
|
68
55
|
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'whois/answer/parser/jobswhois.verisign-grs.com.rb'
|
3
|
+
|
4
|
+
class AnswerParserJobswhoisVerisignGrsComTest < Whois::Answer::Parser::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@klass = Whois::Answer::Parser::JobswhoisVerisignGrsCom
|
8
|
+
@host = "jobswhois.verisign-grs.com"
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
def test_disclaimer
|
13
|
+
expected = <<-EOS.strip
|
14
|
+
TERMS OF USE: You are not authorized to access or query our Whois \
|
15
|
+
database through the use of electronic processes that are high-volume and \
|
16
|
+
automated except as reasonably necessary to register domain names or \
|
17
|
+
modify existing registrations; the Data in VeriSign's ("VeriSign") Whois \
|
18
|
+
database is provided by VeriSign for information purposes only, and to \
|
19
|
+
assist persons in obtaining information about or related to a domain name \
|
20
|
+
registration record. VeriSign does not guarantee its accuracy. \
|
21
|
+
By submitting a Whois query, you agree to abide by the following terms of \
|
22
|
+
use: You agree that you may use this Data only for lawful purposes and that \
|
23
|
+
under no circumstances will you use this Data to: (1) allow, enable, or \
|
24
|
+
otherwise support the transmission of mass unsolicited, commercial \
|
25
|
+
advertising or solicitations via e-mail, telephone, or facsimile; or \
|
26
|
+
(2) enable high volume, automated, electronic processes that apply to \
|
27
|
+
VeriSign (or its computer systems). The compilation, repackaging, \
|
28
|
+
dissemination or other use of this Data is expressly prohibited without \
|
29
|
+
the prior written consent of VeriSign. You agree not to use electronic \
|
30
|
+
processes that are automated and high-volume to access or query the \
|
31
|
+
Whois database except as reasonably necessary to register domain names \
|
32
|
+
or modify existing registrations. VeriSign reserves the right to restrict \
|
33
|
+
your access to the Whois database in its sole discretion to ensure \
|
34
|
+
operational stability. VeriSign may restrict or terminate your access to the \
|
35
|
+
Whois database for failure to abide by these terms of use. VeriSign \
|
36
|
+
reserves the right to modify these terms at any time.
|
37
|
+
EOS
|
38
|
+
assert_equal expected,
|
39
|
+
@klass.new(load_part('/registered.txt')).disclaimer
|
40
|
+
assert_equal expected,
|
41
|
+
@klass.new(load_part('/available.txt')).disclaimer
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
def test_domain
|
46
|
+
assert_equal "goto.jobs",
|
47
|
+
@klass.new(load_part('/registered.txt')).domain
|
48
|
+
assert_equal "u34jedzcq.jobs",
|
49
|
+
@klass.new(load_part('/available.txt')).domain
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_domain_id
|
53
|
+
assert_equal nil,
|
54
|
+
@klass.new(load_part('/registered.txt')).domain_id
|
55
|
+
assert_equal nil,
|
56
|
+
@klass.new(load_part('/available.txt')).domain_id
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
def test_referral_whois
|
61
|
+
assert_equal "whois.encirca.com",
|
62
|
+
@klass.new(load_part('/registered.txt')).referral_whois
|
63
|
+
assert_equal nil,
|
64
|
+
@klass.new(load_part('/available.txt')).referral_whois
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_referral_url
|
68
|
+
assert_equal "http://www.encirca.com",
|
69
|
+
@klass.new(load_part('/registered.txt')).referral_url
|
70
|
+
assert_equal nil,
|
71
|
+
@klass.new(load_part('/available.txt')).referral_url
|
72
|
+
end
|
73
|
+
|
74
|
+
|
75
|
+
def test_status
|
76
|
+
assert_equal "ACTIVE",
|
77
|
+
@klass.new(load_part('/registered.txt')).status
|
78
|
+
assert_equal nil,
|
79
|
+
@klass.new(load_part('/available.txt')).status
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_available?
|
83
|
+
assert !@klass.new(load_part('/registered.txt')).available?
|
84
|
+
assert @klass.new(load_part('/available.txt')).available?
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_registered?
|
88
|
+
assert @klass.new(load_part('/registered.txt')).registered?
|
89
|
+
assert !@klass.new(load_part('/available.txt')).registered?
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
def test_created_on
|
94
|
+
assert_equal Time.parse("2006-02-21"),
|
95
|
+
@klass.new(load_part('/registered.txt')).created_on
|
96
|
+
assert_equal nil,
|
97
|
+
@klass.new(load_part('/available.txt')).created_on
|
98
|
+
end
|
99
|
+
|
100
|
+
def test_updated_on
|
101
|
+
assert_equal Time.parse("2009-02-20"),
|
102
|
+
@klass.new(load_part('/registered.txt')).updated_on
|
103
|
+
assert_equal nil,
|
104
|
+
@klass.new(load_part('/available.txt')).updated_on
|
105
|
+
end
|
106
|
+
|
107
|
+
def test_expires_on
|
108
|
+
assert_equal Time.parse("2010-02-21"),
|
109
|
+
@klass.new(load_part('/registered.txt')).expires_on
|
110
|
+
assert_equal nil,
|
111
|
+
@klass.new(load_part('/available.txt')).expires_on
|
112
|
+
end
|
113
|
+
|
114
|
+
|
115
|
+
def test_registrar
|
116
|
+
assert_equal nil,
|
117
|
+
@klass.new(load_part('/registered.txt')).registrar
|
118
|
+
assert_equal nil,
|
119
|
+
@klass.new(load_part('/available.txt')).registrar
|
120
|
+
end
|
121
|
+
|
122
|
+
end
|