logstash-filter-ros2_node_info 0.1.2 → 0.1.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ea20c52f9a375c84d47e58323f81bc283129341a42b235afbe153412edbc09b
|
4
|
+
data.tar.gz: 7ae09d6051fd426e1596322231bd9789ca749bf2c4b5f8c5ca1f6e6004d2f42a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38785923b147a5d2ad5c8b92da8dc4c19384883477113d47d5392ec6e14c762ca825fc16d106b48f9436b99c6b4c3d248402773b0c2132da88f81d36c734688e
|
7
|
+
data.tar.gz: ebe3a20a49d0c77e3adf97ef177d96d0f89f20037ba2695c6e02668fddc56d69891e1dbabd222b8e33e5088a332d8e4e447d1dfc26cc37e4d02eff98cff292f9
|
@@ -49,7 +49,10 @@ class LogStash::Filters::Ros2NodeInfo < LogStash::Filters::Base
|
|
49
49
|
running_array << { "topic" => split_line[0], "type" => split_line[1] }
|
50
50
|
end
|
51
51
|
end
|
52
|
-
|
52
|
+
# If we have a running array and we're done parsing, dump it
|
53
|
+
unless last_cat.nil?
|
54
|
+
event.set(last_cat, running_array)
|
55
|
+
end
|
53
56
|
end
|
54
57
|
|
55
58
|
# filter_matched should go in the last line of our successful code
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-filter-ros2_node_info'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.3'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = 'A plugin to parse the output of `ros2 node info` into a useful format.'
|
6
6
|
s.homepage = 'https://github.com/soartech/logstash-filter-ros2_node_info'
|
@@ -27,6 +27,7 @@ describe LogStash::Filters::Ros2NodeInfo do
|
|
27
27
|
"type"=>"std_msgs/String"}])
|
28
28
|
expect(subject.get("subscribers")).to eq([{"topic"=>"/parameter_events",
|
29
29
|
"type"=>"rcl_interfaces/ParameterEvent"}])
|
30
|
+
expect(subject.get("tags")).to eq(nil)
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|
@@ -50,4 +51,19 @@ describe LogStash::Filters::Ros2NodeInfo do
|
|
50
51
|
expect(subject.get("tags")).to include("_ros2_node_info_parse_failure")
|
51
52
|
end
|
52
53
|
end
|
54
|
+
describe "Parse when there are no categories" do
|
55
|
+
let(:config) do <<-CONFIG
|
56
|
+
filter {
|
57
|
+
ros2_node_info {
|
58
|
+
source => "message"
|
59
|
+
}
|
60
|
+
}
|
61
|
+
CONFIG
|
62
|
+
end
|
63
|
+
|
64
|
+
sample("message" => "/talker") do
|
65
|
+
expect(subject.get("node")).to eq("/talker")
|
66
|
+
expect(subject.get("tags")).to eq(nil)
|
67
|
+
end
|
68
|
+
end
|
53
69
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-ros2_node_info
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Reffett
|
@@ -51,7 +51,7 @@ files:
|
|
51
51
|
- LICENSE
|
52
52
|
- README.md
|
53
53
|
- lib/logstash/filters/ros2_node_info.rb
|
54
|
-
- logstash-
|
54
|
+
- logstash-filter-ros2_node_info.gemspec
|
55
55
|
- spec/filters/ros2_node_info_spec.rb
|
56
56
|
- spec/spec_helper.rb
|
57
57
|
homepage: https://github.com/soartech/logstash-filter-ros2_node_info
|