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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f59c95d799cca6b37d208c59260beb9b2eaf8a72b0c4f11a41ea21810fcef4c
4
- data.tar.gz: 4a4e3bbc7efc5313a3b6e912b855ab1bd142c78a595ec197139b4d787fc0316f
3
+ metadata.gz: b268e0ecfeb41fb2405ad07036351b95f74ecdd5a43055ed4af7ec64c9b313be
4
+ data.tar.gz: 4be7468cfcf0f45b061a95e4baf55d76d367b761adc88d8859d6a83d72c0ecdd
5
5
  SHA512:
6
- metadata.gz: 4ba4c3de9f48ce1294e40914fbef78fbf69fd44beed5df86f283b8efe2b440fb9e611e391a5bc0799c4c879033153963ed92f29661e883a3f3344fbab8161ebb
7
- data.tar.gz: a6de9790cf7e9e0ed4d0ccca4eb54717b075c8195de6f97e6dededbfe26ef6d13415f8e5ba0e5309a3848526338ddf092a10244a1735e8545b57f09b9b0cf8af
6
+ metadata.gz: 87c72c91fad66d57162d010efba156027372ce30e7557cd80ec3d83c5e102f4367f105a54448df20617d684b2b9c697f4e7cfa5390ad47a7a0f12e6ed4323ef3
7
+ data.tar.gz: 5a7aa586d933eddae775735b2ab36dd99fc0916d5863f8aa6e6829c997903370e269286d0a4d5c70288ec93f9ce0f28ae876da0f00908bcea46881e38000b02b
@@ -0,0 +1,12 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 2
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ end_of_line = lf
9
+ charset = utf-8
10
+
11
+ [{*.rb, Rakefile, exe/irrc}]
12
+ max_line_length = 120
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018 Shintaro Kojima
3
+ Copyright (c) 2019 Shintaro Kojima
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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) 2018 Shintaro Kojima. Code released under the [MIT license](LICENSE).
177
+ Copyright (c) 2019 Shintaro Kojima. Code released under the [MIT license](LICENSE).
@@ -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+$/ }.uniq
39
+ result.gsub(/^#{$1}$/, '').strip.split.reject {|p| p =~ /^A\d+$/}.uniq
40
40
  when error_code
41
41
  raise $1
42
42
  end
@@ -51,7 +51,11 @@ module Irrc
51
51
  return if command.nil? || command == ''
52
52
 
53
53
  logger.debug %(Executing "#{command}")
54
- connection.cmd(command).tap {|result| logger.debug %(Got "#{result}") }
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)
@@ -1,3 +1,3 @@
1
1
  module Irrc
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -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 /\s*,?\s+/ }.flatten
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
- result.scan(Irrc::Irr.route_tag(protocol)).flatten.uniq
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.1
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: 2018-10-09 00:00:00.000000000 Z
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
- rubyforge_project:
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