irrc 0.1.0 → 0.2.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +12 -4
- data/Gemfile +2 -5
- data/LICENSE +1 -1
- data/README.md +10 -32
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/irrc +89 -0
- data/irrc.gemspec +11 -6
- data/lib/irrc/client.rb +20 -8
- data/lib/irrc/connecting.rb +3 -10
- data/lib/irrc/irr.rb +30 -36
- data/lib/irrc/irrd/client.rb +45 -28
- data/lib/irrc/logging.rb +6 -0
- data/lib/irrc/parameter.rb +7 -7
- data/lib/irrc/prefix.rb +1 -1
- data/lib/irrc/query.rb +5 -1
- data/lib/irrc/query_status.rb +1 -1
- data/lib/irrc/runner.rb +35 -9
- data/lib/irrc/subquery.rb +48 -5
- data/lib/irrc/version.rb +1 -1
- data/lib/irrc/whoisd/client.rb +39 -41
- metadata +39 -27
- data/bin/irrc +0 -5
- data/lib/irrc/cli.rb +0 -1
- data/lib/irrc/cli/client.rb +0 -108
- data/lib/irrc/cli/yaml_printer.rb +0 -13
- data/spec/features/irr_as_set_resolution_spec.rb +0 -193
- data/spec/features/irr_invalid_object_resolution_spec.rb +0 -32
- data/spec/features/whois_as_set_resolution_spec.rb +0 -193
- data/spec/features/whois_invalid_object_resolution_spec.rb +0 -32
- data/spec/spec_helper.rb +0 -7
- data/spec/support/contexts.rb +0 -12
- data/spec/support/query.rb +0 -7
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe 'Whois Invalid object resolution' do
|
4
|
-
include_context 'whois queries'
|
5
|
-
|
6
|
-
describe 'Try as-jpnic with JPIRR' do
|
7
|
-
context 'When invalid object specified' do
|
8
|
-
subject { send_query(whois, 'INVALID') }
|
9
|
-
|
10
|
-
it "doesn't report an error" do
|
11
|
-
expect(subject['INVALID']).to eq({})
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
context 'When a blank String given for IRR object to resolve' do
|
16
|
-
subject { send_query(whois, '') }
|
17
|
-
|
18
|
-
it "doesn't report an error" do
|
19
|
-
expect(subject['']).to eq({})
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
context 'When nil given for IRR object to resolve' do
|
24
|
-
subject { send_query(whois, nil) }
|
25
|
-
|
26
|
-
it 'does nothing even reporting the error' do
|
27
|
-
expect_any_instance_of(Irrc::Whoisd::Client).not_to receive(:connect)
|
28
|
-
expect(subject).to eq({})
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
data/spec/spec_helper.rb
DELETED
data/spec/support/contexts.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
shared_context 'irr queries' do
|
2
|
-
let(:irr) { :jpirr }
|
3
|
-
let(:irr_fqdn) { 'jpirr.nic.ad.jp' }
|
4
|
-
let(:as_set) { 'AS-JPNIC' }
|
5
|
-
end
|
6
|
-
|
7
|
-
shared_context 'whois queries' do
|
8
|
-
let(:whois) { :apnic }
|
9
|
-
let(:whois_fqdn) { 'whois.apnic.net' }
|
10
|
-
let(:as_set) { 'AS-JPNIC' }
|
11
|
-
end
|
12
|
-
|