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.
@@ -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
@@ -1,7 +0,0 @@
1
- require 'irrc'
2
-
3
- Dir[File.expand_path('../support/**/*.rb', __FILE__)].each {|f| require f }
4
-
5
- RSpec.configure do |config|
6
- config.include QueryHelper
7
- end
@@ -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
-
@@ -1,7 +0,0 @@
1
- module QueryHelper
2
- def send_query(host, object, *options)
3
- client = Irrc::Client.new(1)
4
- client.query(host, object, *options)
5
- client.perform
6
- end
7
- end