irrc 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +12 -0
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/irrc/irrd/api.rb +1 -1
- data/lib/irrc/runner.rb +5 -1
- data/lib/irrc/version.rb +1 -1
- data/lib/irrc/whoisd/api.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b268e0ecfeb41fb2405ad07036351b95f74ecdd5a43055ed4af7ec64c9b313be
|
4
|
+
data.tar.gz: 4be7468cfcf0f45b061a95e4baf55d76d367b761adc88d8859d6a83d72c0ecdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87c72c91fad66d57162d010efba156027372ce30e7557cd80ec3d83c5e102f4367f105a54448df20617d684b2b9c697f4e7cfa5390ad47a7a0f12e6ed4323ef3
|
7
|
+
data.tar.gz: 5a7aa586d933eddae775735b2ab36dd99fc0916d5863f8aa6e6829c997903370e269286d0a4d5c70288ec93f9ce0f28ae876da0f00908bcea46881e38000b02b
|
data/.editorconfig
ADDED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -174,4 +174,4 @@ For questions or feedbacks write to my twitter @codeout.
|
|
174
174
|
|
175
175
|
## Copyright and License
|
176
176
|
|
177
|
-
Copyright (c)
|
177
|
+
Copyright (c) 2019 Shintaro Kojima. Code released under the [MIT license](LICENSE).
|
data/lib/irrc/irrd/api.rb
CHANGED
@@ -36,7 +36,7 @@ module Irrc
|
|
36
36
|
def parse_prefixes_from_route_set(result)
|
37
37
|
case result
|
38
38
|
when success_code
|
39
|
-
result.gsub(/^#{$1}$/, '').strip.split.reject {|p| p =~ /^A\d+$/
|
39
|
+
result.gsub(/^#{$1}$/, '').strip.split.reject {|p| p =~ /^A\d+$/}.uniq
|
40
40
|
when error_code
|
41
41
|
raise $1
|
42
42
|
end
|
data/lib/irrc/runner.rb
CHANGED
@@ -51,7 +51,11 @@ module Irrc
|
|
51
51
|
return if command.nil? || command == ''
|
52
52
|
|
53
53
|
logger.debug %(Executing "#{command}")
|
54
|
-
|
54
|
+
|
55
|
+
result = connection.cmd(command)
|
56
|
+
logger.debug %(Got "#{result}")
|
57
|
+
|
58
|
+
result.gsub(/#.*$/, '') # Trim comments
|
55
59
|
end
|
56
60
|
|
57
61
|
def last_thread_of?(num_threads)
|
data/lib/irrc/version.rb
CHANGED
data/lib/irrc/whoisd/api.rb
CHANGED
@@ -14,7 +14,7 @@ module Irrc
|
|
14
14
|
raise $1
|
15
15
|
end
|
16
16
|
|
17
|
-
result.scan(Irrc::Irr.members_tag).flatten.map {|i| i.split
|
17
|
+
result.scan(Irrc::Irr.members_tag).flatten.map {|i| i.split(/\s*,?\s+/)}.flatten
|
18
18
|
end
|
19
19
|
|
20
20
|
def expand_route_set_command(route_set, sources)
|
@@ -30,7 +30,7 @@ module Irrc
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def parse_prefixes_from_aut_num(result, protocol)
|
33
|
-
|
33
|
+
result.scan(Irrc::Irr.route_tag(protocol)).flatten.uniq
|
34
34
|
end
|
35
35
|
|
36
36
|
# See http://www.ripe.net/data-tools/support/documentation/ripe-database-query-reference-manual#a1--ripe-database-query-server-response-codes-and-messages for the error code
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: irrc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shintaro Kojima
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-telnet
|
@@ -77,6 +77,7 @@ executables:
|
|
77
77
|
extensions: []
|
78
78
|
extra_rdoc_files: []
|
79
79
|
files:
|
80
|
+
- ".editorconfig"
|
80
81
|
- ".gitignore"
|
81
82
|
- ".rspec"
|
82
83
|
- ".travis.yml"
|
@@ -126,8 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
127
|
- !ruby/object:Gem::Version
|
127
128
|
version: '0'
|
128
129
|
requirements: []
|
129
|
-
|
130
|
-
rubygems_version: 2.7.6
|
130
|
+
rubygems_version: 3.0.3
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: IRR / Whois client to expand as-set and route-set into a list of origin ASs
|