whois 0.5.3 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +55 -0
- data/Manifest +43 -8
- data/README.rdoc +53 -20
- data/lib/whois.rb +69 -1
- data/lib/whois/answer.rb +126 -0
- data/lib/whois/answer/contact.rb +55 -0
- data/lib/whois/answer/parser.rb +110 -0
- data/lib/whois/answer/parser/README.rdoc +21 -0
- data/lib/whois/answer/parser/base.rb +144 -0
- data/lib/whois/answer/parser/blank.rb +45 -0
- data/lib/whois/answer/parser/whois.crsnic.net.rb +209 -0
- data/lib/whois/answer/parser/whois.denic.de.rb +202 -0
- data/lib/whois/answer/parser/whois.nic.it.rb +330 -0
- data/lib/whois/answer/parser/whois.publicinterestregistry.net.rb +232 -0
- data/lib/whois/answer/part.rb +35 -0
- data/lib/whois/answer/registrar.rb +42 -0
- data/lib/whois/answer/super_struct.rb +57 -0
- data/lib/whois/client.rb +6 -0
- data/lib/whois/definitions/tlds.rb +2 -2
- data/lib/whois/errors.rb +25 -8
- data/lib/whois/server.rb +0 -1
- data/lib/whois/server/adapters/afilias.rb +5 -5
- data/lib/whois/server/adapters/base.rb +31 -4
- data/lib/whois/server/adapters/formatted.rb +3 -1
- data/lib/whois/server/adapters/none.rb +20 -1
- data/lib/whois/server/adapters/pir.rb +5 -5
- data/lib/whois/server/adapters/standard.rb +13 -2
- data/lib/whois/server/adapters/verisign.rb +5 -5
- data/lib/whois/server/adapters/web.rb +15 -0
- data/lib/whois/version.rb +2 -2
- data/lib/whois/whois.rb +2 -2
- data/test/answer/parser/base_test.rb +27 -0
- data/test/answer/parser/blank_test.rb +19 -0
- data/test/answer/parser/whois_crsnic_net_test.rb +175 -0
- data/test/answer/parser/whois_denic_de_test.rb +209 -0
- data/test/answer/parser/whois_nic_it_test.rb +255 -0
- data/test/answer/parser/whois_publicinterestregistry_net_test.rb +210 -0
- data/test/answer/parser_test.rb +77 -0
- data/test/answer_test.rb +99 -0
- data/test/client_test.rb +3 -3
- data/test/integration_test.rb +31 -0
- data/test/{adapters → server/adapters}/afilias_test.rb +10 -5
- data/test/server/adapters/base_test.rb +15 -0
- data/test/server/adapters/formatted_test.rb +26 -0
- data/test/{adapters → server/adapters}/none_test.rb +0 -0
- data/test/{adapters → server/adapters}/not_implemented_test.rb +0 -0
- data/test/{adapters → server/adapters}/pir_test.rb +10 -5
- data/test/server/adapters/standard_test.rb +29 -0
- data/test/{adapters → server/adapters}/verisign_test.rb +10 -5
- data/test/{adapters → server/adapters}/web_test.rb +0 -0
- data/test/server_test.rb +5 -1
- data/test/testcases/responses/super_struct_test.rb +25 -0
- data/test/testcases/responses/whois.crsnic.net/available.txt +43 -0
- data/test/testcases/responses/whois.crsnic.net/registered.txt +57 -0
- data/test/testcases/responses/whois.denic.de/available.txt +30 -0
- data/test/testcases/responses/whois.denic.de/registered.txt +77 -0
- data/test/testcases/responses/whois.nic.it/available.txt +2 -0
- data/test/testcases/responses/{it.txt → whois.nic.it/registered.txt} +1 -0
- data/test/testcases/responses/whois.nic.it/status_active.txt +53 -0
- data/test/testcases/responses/whois.nic.it/status_available.txt +2 -0
- data/test/testcases/responses/whois.publicinterestregistry.net/available.txt +1 -0
- data/test/testcases/responses/whois.publicinterestregistry.net/registered.txt +85 -0
- data/test/whois_test.rb +23 -1
- data/utils/bm_delegation_vs_inheritance.rb +150 -0
- data/whois.gemspec +6 -6
- metadata +78 -18
- data/test/adapters/standard_test.rb +0 -23
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class ServerAdaptersStandardTest < Test::Unit::TestCase
|
4
|
-
include Whois
|
5
|
-
|
6
|
-
def setup
|
7
|
-
@definition = [:tld, ".foo", "whois.foo", {}]
|
8
|
-
@klass = Server::Adapters::Standard
|
9
|
-
@server = @klass.new(*@definition)
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_query
|
13
|
-
@server.expects(:ask_the_socket).with("domain.foo", "whois.foo", 43)
|
14
|
-
@server.query("domain.foo")
|
15
|
-
end
|
16
|
-
|
17
|
-
def test_query_with_port
|
18
|
-
@server = @klass.new(:tld, ".foo", "whois.foo", { :port => 20 })
|
19
|
-
@server.expects(:ask_the_socket).with("domain.foo", "whois.foo", 20)
|
20
|
-
@server.query("domain.foo")
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|