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
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'whois/answer/parser/whois.nic.gl.rb'
|
3
|
+
|
4
|
+
class AnswerParserWhoisNicGlTest < Whois::Answer::Parser::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@klass = Whois::Answer::Parser::WhoisNicGl
|
8
|
+
@host = "whois.nic.gl"
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
def test_status
|
13
|
+
assert_equal :registered,
|
14
|
+
@klass.new(load_part('/registered.txt')).status
|
15
|
+
assert_equal :available,
|
16
|
+
@klass.new(load_part('/available.txt')).status
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_available?
|
20
|
+
assert !@klass.new(load_part('/registered.txt')).available?
|
21
|
+
assert @klass.new(load_part('/available.txt')).available?
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_registered?
|
25
|
+
assert !@klass.new(load_part('/available.txt')).registered?
|
26
|
+
assert @klass.new(load_part('/registered.txt')).registered?
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
def test_created_on
|
31
|
+
assert_equal Time.parse("2003-03-11"),
|
32
|
+
@klass.new(load_part('/registered.txt')).created_on
|
33
|
+
assert_equal nil,
|
34
|
+
@klass.new(load_part('/available.txt')).created_on
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_updated_on
|
38
|
+
assert_equal Time.parse("2009-11-08"),
|
39
|
+
@klass.new(load_part('/registered.txt')).updated_on
|
40
|
+
assert_equal nil,
|
41
|
+
@klass.new(load_part('/available.txt')).updated_on
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_expires_on
|
45
|
+
assert_equal Time.parse("2010-01-01"),
|
46
|
+
@klass.new(load_part('/registered.txt')).expires_on
|
47
|
+
assert_equal nil,
|
48
|
+
@klass.new(load_part('/available.txt')).expires_on
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -28,24 +28,18 @@ class AnswerParserWhoisNicGovTest < Whois::Answer::Parser::TestCase
|
|
28
28
|
|
29
29
|
|
30
30
|
def test_created_on
|
31
|
-
|
32
|
-
|
33
|
-
assert_equal nil,
|
34
|
-
@klass.new(load_part('/available.txt')).created_on
|
31
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).created_on }
|
32
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).created_on }
|
35
33
|
end
|
36
34
|
|
37
35
|
def test_updated_on
|
38
|
-
|
39
|
-
|
40
|
-
assert_equal nil,
|
41
|
-
@klass.new(load_part('/available.txt')).updated_on
|
36
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).updated_on }
|
37
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).updated_on }
|
42
38
|
end
|
43
39
|
|
44
40
|
def test_expires_on
|
45
|
-
|
46
|
-
|
47
|
-
assert_equal nil,
|
48
|
-
@klass.new(load_part('/available.txt')).expires_on
|
41
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).expires_on }
|
42
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).expires_on }
|
49
43
|
end
|
50
44
|
|
51
45
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
1
3
|
require 'test_helper'
|
2
4
|
require 'whois/answer/parser/whois.nic.hu.rb'
|
3
5
|
|
@@ -11,15 +13,15 @@ class AnswerParserWhoisNicHuTest < Test::Unit::TestCase
|
|
11
13
|
end
|
12
14
|
|
13
15
|
def test_disclaimer
|
14
|
-
expected =
|
15
|
-
Rights restricted by copyright.
|
16
|
+
expected = <<-EOS.strip
|
17
|
+
Rights restricted by copyright. Szerzõi jog fenntartva.
|
16
18
|
-Legal usage of this service requires that you agree to
|
17
19
|
abide by the rules and conditions set forth at
|
18
20
|
http://www.domain.hu/domain/English/domainsearch/feltetelek.html
|
19
21
|
-A szolgaltatas csak a
|
20
|
-
http://www.domain.hu/domain/domainsearch/feltetelek.html
|
21
|
-
|
22
|
-
|
22
|
+
http://www.domain.hu/domain/domainsearch/feltetelek.html címen
|
23
|
+
elérhetõ feltételek elfogadása és betartása mellett
|
24
|
+
használható legálisan.
|
23
25
|
EOS
|
24
26
|
assert_equal expected,
|
25
27
|
@klass.new(load_part('/available.txt')).disclaimer
|
@@ -120,7 +122,7 @@ EOS
|
|
120
122
|
assert_instance_of Whois::Answer::Contact, admin
|
121
123
|
assert_equal '2000466366', admin.id
|
122
124
|
assert_equal '3C Kft. (Registrar)', admin.name
|
123
|
-
assert_equal 'Konkoly Thege
|
125
|
+
assert_equal 'Konkoly Thege út 29-33.', admin.address
|
124
126
|
assert_equal 'H-1121', admin.zip
|
125
127
|
assert_equal 'Budapest', admin.city
|
126
128
|
assert_equal 'HU', admin.country_code
|
@@ -183,7 +185,7 @@ EOS
|
|
183
185
|
assert_equal '1960108002', registrar_contact.id
|
184
186
|
assert_equal '3C Kft. (Registrar)', registrar_contact.name
|
185
187
|
assert_equal '3C Ltd.', registrar_contact.organization
|
186
|
-
assert_equal 'Konkoly Thege
|
188
|
+
assert_equal 'Konkoly Thege út 29-33.', registrar_contact.address
|
187
189
|
assert_equal 'H-1121', registrar_contact.zip
|
188
190
|
assert_equal 'Budapest', registrar_contact.city
|
189
191
|
assert_equal 'HU', registrar_contact.country_code
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'whois/answer/parser/whois.nic.im.rb'
|
3
|
+
|
4
|
+
class AnswerParserWhoisNicImTest < Whois::Answer::Parser::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@klass = Whois::Answer::Parser::WhoisNicIm
|
8
|
+
@host = "whois.nic.im"
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
def test_status
|
13
|
+
assert_equal :registered,
|
14
|
+
@klass.new(load_part('/registered.txt')).status
|
15
|
+
assert_equal :available,
|
16
|
+
@klass.new(load_part('/available.txt')).status
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_available?
|
20
|
+
assert !@klass.new(load_part('/registered.txt')).available?
|
21
|
+
assert @klass.new(load_part('/available.txt')).available?
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_registered?
|
25
|
+
assert @klass.new(load_part('/registered.txt')).registered?
|
26
|
+
assert !@klass.new(load_part('/available.txt')).registered?
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
def test_created_on
|
31
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).created_on }
|
32
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).created_on }
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_updated_on
|
36
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).updated_on }
|
37
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).updated_on }
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_expires_on
|
41
|
+
assert_equal Time.parse("2010-07-30 23:59:56"),
|
42
|
+
@klass.new(load_part('/registered.txt')).expires_on
|
43
|
+
assert_equal nil,
|
44
|
+
@klass.new(load_part('/available.txt')).expires_on
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'whois/answer/parser/whois.nic.io.rb'
|
3
|
+
|
4
|
+
class AnswerParserWhoisNicIoTest < Whois::Answer::Parser::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@klass = Whois::Answer::Parser::WhoisNicIo
|
8
|
+
@host = "whois.nic.io"
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
def test_status
|
13
|
+
assert_equal :registered,
|
14
|
+
@klass.new(load_part('/registered.txt')).status
|
15
|
+
assert_equal :available,
|
16
|
+
@klass.new(load_part('/available.txt')).status
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_available?
|
20
|
+
assert !@klass.new(load_part('/registered.txt')).available?
|
21
|
+
assert @klass.new(load_part('/available.txt')).available?
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_registered?
|
25
|
+
assert @klass.new(load_part('/registered.txt')).registered?
|
26
|
+
assert !@klass.new(load_part('/available.txt')).registered?
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
def test_created_on
|
31
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).created_on }
|
32
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).created_on }
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_updated_on
|
36
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).updated_on }
|
37
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).updated_on }
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_expires_on
|
41
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).expires_on }
|
42
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).expires_on }
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
@@ -53,22 +53,25 @@ class AnswerParserWhoisNicItTest < Whois::Answer::Parser::TestCase
|
|
53
53
|
end
|
54
54
|
|
55
55
|
|
56
|
+
# NOTE: Unfortunately, the whois.nic.it response doesn't include TimeZone
|
56
57
|
def test_created_on
|
57
|
-
assert_equal Time.parse("1999-12-10 00:00:00
|
58
|
+
assert_equal Time.parse("1999-12-10 00:00:00"),
|
58
59
|
@klass.new(load_part('/registered.txt')).created_on
|
59
60
|
assert_equal nil,
|
60
61
|
@klass.new(load_part('/available.txt')).created_on
|
61
62
|
end
|
62
63
|
|
64
|
+
# NOTE: Unfortunately, the whois.nic.it response doesn't include TimeZone
|
63
65
|
def test_updated_on
|
64
|
-
assert_equal Time.parse("2008-11-27 16:47:22
|
66
|
+
assert_equal Time.parse("2008-11-27 16:47:22"),
|
65
67
|
@klass.new(load_part('/registered.txt')).updated_on
|
66
68
|
assert_equal nil,
|
67
69
|
@klass.new(load_part('/available.txt')).updated_on
|
68
70
|
end
|
69
71
|
|
72
|
+
# NOTE: Unfortunately, the whois.nic.it response doesn't include TimeZone
|
70
73
|
def test_expires_on
|
71
|
-
assert_equal Time.parse("2009-11-27"),
|
74
|
+
assert_equal Time.parse("2009-11-27 00:00:00"),
|
72
75
|
@klass.new(load_part('/registered.txt')).expires_on
|
73
76
|
assert_equal nil,
|
74
77
|
@klass.new(load_part('/available.txt')).expires_on
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'whois/answer/parser/whois.nic.ly.rb'
|
3
|
+
|
4
|
+
class AnswerParserWhoisNicLyTest < Whois::Answer::Parser::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@klass = Whois::Answer::Parser::WhoisNicLy
|
8
|
+
@host = "whois.nic.ly"
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
def test_status
|
13
|
+
assert_equal :available,
|
14
|
+
@klass.new(load_part('/available.txt')).status
|
15
|
+
assert_equal :registered,
|
16
|
+
@klass.new(load_part('/registered.txt')).status
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_available?
|
20
|
+
assert !@klass.new(load_part('/registered.txt')).available?
|
21
|
+
assert @klass.new(load_part('/available.txt')).available?
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_registered?
|
25
|
+
assert !@klass.new(load_part('/available.txt')).registered?
|
26
|
+
assert @klass.new(load_part('/registered.txt')).registered?
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
def test_created_on
|
31
|
+
assert_equal Time.parse("2007-10-03 13:36:48"),
|
32
|
+
@klass.new(load_part('/registered.txt')).created_on
|
33
|
+
assert_equal nil,
|
34
|
+
@klass.new(load_part('/available.txt')).created_on
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_updated_on
|
38
|
+
assert_equal Time.parse("2009-08-07 22:52:02"),
|
39
|
+
@klass.new(load_part('/registered.txt')).updated_on
|
40
|
+
assert_equal nil,
|
41
|
+
@klass.new(load_part('/available.txt')).updated_on
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_expires_on
|
45
|
+
assert_equal Time.parse("2010-10-03 13:36:48"),
|
46
|
+
@klass.new(load_part('/registered.txt')).expires_on
|
47
|
+
assert_equal nil,
|
48
|
+
@klass.new(load_part('/available.txt')).expires_on
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'whois/answer/parser/whois.nic.mu.rb'
|
3
|
+
|
4
|
+
class AnswerParserWhoisNicMuTest < Whois::Answer::Parser::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@klass = Whois::Answer::Parser::WhoisNicMu
|
8
|
+
@host = "whois.nic.mu"
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
class AnswerParserWhoisNicMuKiTest < AnswerParserWhoisNicMuTest
|
14
|
+
|
15
|
+
def test_status
|
16
|
+
assert_equal :registered,
|
17
|
+
@klass.new(load_part('/ki/registered.txt')).status
|
18
|
+
assert_equal :available,
|
19
|
+
@klass.new(load_part('/ki/available.txt')).status
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_available?
|
23
|
+
assert !@klass.new(load_part('/ki/registered.txt')).available?
|
24
|
+
assert @klass.new(load_part('/ki/available.txt')).available?
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_registered?
|
28
|
+
assert !@klass.new(load_part('/ki/available.txt')).registered?
|
29
|
+
assert @klass.new(load_part('/ki/registered.txt')).registered?
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
def test_created_on
|
34
|
+
assert_equal Time.parse("2006-05-15"),
|
35
|
+
@klass.new(load_part('/ki/registered.txt')).created_on
|
36
|
+
assert_equal nil,
|
37
|
+
@klass.new(load_part('/ki/available.txt')).created_on
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_updated_on
|
41
|
+
assert_equal Time.parse("2009-09-30"),
|
42
|
+
@klass.new(load_part('/ki/registered.txt')).updated_on
|
43
|
+
assert_equal nil,
|
44
|
+
@klass.new(load_part('/ki/available.txt')).updated_on
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_expires_on
|
48
|
+
assert_equal Time.parse("2010-11-27"),
|
49
|
+
@klass.new(load_part('/ki/registered.txt')).expires_on
|
50
|
+
assert_equal nil,
|
51
|
+
@klass.new(load_part('/ki/available.txt')).expires_on
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
class AnswerParserWhoisNicMuMuTest < AnswerParserWhoisNicMuTest
|
57
|
+
|
58
|
+
def test_status
|
59
|
+
assert_equal :registered,
|
60
|
+
@klass.new(load_part('/mu/registered.txt')).status
|
61
|
+
assert_equal :available,
|
62
|
+
@klass.new(load_part('/mu/available.txt')).status
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_available?
|
66
|
+
assert !@klass.new(load_part('/mu/registered.txt')).available?
|
67
|
+
assert @klass.new(load_part('/mu/available.txt')).available?
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_registered?
|
71
|
+
assert !@klass.new(load_part('/mu/available.txt')).registered?
|
72
|
+
assert @klass.new(load_part('/mu/registered.txt')).registered?
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
def test_created_on
|
77
|
+
assert_equal Time.parse("2000-12-21"),
|
78
|
+
@klass.new(load_part('/mu/registered.txt')).created_on
|
79
|
+
assert_equal nil,
|
80
|
+
@klass.new(load_part('/mu/available.txt')).created_on
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_updated_on
|
84
|
+
assert_equal Time.parse("2009-12-04"),
|
85
|
+
@klass.new(load_part('/mu/registered.txt')).updated_on
|
86
|
+
assert_equal nil,
|
87
|
+
@klass.new(load_part('/mu/available.txt')).updated_on
|
88
|
+
end
|
89
|
+
|
90
|
+
def test_expires_on
|
91
|
+
assert_equal Time.parse("2010-12-20"),
|
92
|
+
@klass.new(load_part('/mu/registered.txt')).expires_on
|
93
|
+
assert_equal nil,
|
94
|
+
@klass.new(load_part('/mu/available.txt')).expires_on
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
@@ -28,24 +28,18 @@ class AnswerParserWhoisNicNameTest < Whois::Answer::Parser::TestCase
|
|
28
28
|
|
29
29
|
|
30
30
|
def test_created_on
|
31
|
-
|
32
|
-
|
33
|
-
assert_equal nil,
|
34
|
-
@klass.new(load_part('/available.txt')).created_on
|
31
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).created_on }
|
32
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).created_on }
|
35
33
|
end
|
36
34
|
|
37
35
|
def test_updated_on
|
38
|
-
|
39
|
-
|
40
|
-
assert_equal nil,
|
41
|
-
@klass.new(load_part('/available.txt')).updated_on
|
36
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).updated_on }
|
37
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).updated_on }
|
42
38
|
end
|
43
39
|
|
44
40
|
def test_expires_on
|
45
|
-
|
46
|
-
|
47
|
-
assert_equal nil,
|
48
|
-
@klass.new(load_part('/available.txt')).expires_on
|
41
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).expires_on }
|
42
|
+
assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).expires_on }
|
49
43
|
end
|
50
44
|
|
51
45
|
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'whois/answer/parser/whois.nic.nu.rb'
|
3
|
+
|
4
|
+
class AnswerParserWhoisNicNuTest < Whois::Answer::Parser::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@klass = Whois::Answer::Parser::WhoisNicNu
|
8
|
+
@host = "whois.nic.nu"
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
def test_status
|
13
|
+
assert_equal :active,
|
14
|
+
@klass.new(load_part('/registered.txt')).status
|
15
|
+
assert_equal nil,
|
16
|
+
@klass.new(load_part('/available.txt')).status
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_available?
|
20
|
+
assert !@klass.new(load_part('/registered.txt')).available?
|
21
|
+
assert @klass.new(load_part('/available.txt')).available?
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_registered?
|
25
|
+
assert @klass.new(load_part('/registered.txt')).registered?
|
26
|
+
assert !@klass.new(load_part('/available.txt')).registered?
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
def test_created_on
|
31
|
+
assert_equal Time.parse("1999-06-07"),
|
32
|
+
@klass.new(load_part('/registered.txt')).created_on
|
33
|
+
assert_equal nil,
|
34
|
+
@klass.new(load_part('/available.txt')).created_on
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_updated_on
|
38
|
+
assert_equal Time.parse("2009-05-11"),
|
39
|
+
@klass.new(load_part('/registered.txt')).updated_on
|
40
|
+
assert_equal nil,
|
41
|
+
@klass.new(load_part('/available.txt')).updated_on
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_expires_on
|
45
|
+
assert_equal Time.parse("2010-06-07"),
|
46
|
+
@klass.new(load_part('/registered.txt')).expires_on
|
47
|
+
assert_equal nil,
|
48
|
+
@klass.new(load_part('/available.txt')).expires_on
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
def test_nameservers
|
53
|
+
assert_equal %w(ns1.google.com ns2.google.com ns3.google.com ns4.google.com),
|
54
|
+
@klass.new(load_part('/registered.txt')).nameservers
|
55
|
+
assert_equal %w(),
|
56
|
+
@klass.new(load_part('/available.txt')).nameservers
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|