logstash-filter-split 3.1.5 → 3.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/filters/split.rb +1 -1
- data/logstash-filter-split.gemspec +1 -1
- data/spec/filters/split_spec.rb +17 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe030f91f29f8ff0430df5dfd10383768f638791b8c0daff31b6c812ee5da2f1
|
4
|
+
data.tar.gz: 1f62b67442999091a356fda0475dfa57c1f1b721050e6ecee1fc388f0315084c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ec5139936cada2b3ae96193e74604ff271f5a7bfda523f39d7309e0fce259dbbec70767d0595c75db9efa1e4a4a6e0b52888e3dc264391b35ed32c45a6e5f53
|
7
|
+
data.tar.gz: dc6a646310aea30b1ddbf0fda097e648063277e53442e0afb9c5daadecc5f78509bc848cf8ecc9f86bbfb9f23afac473dd1d772141b7cae409455022eec5d375
|
data/CHANGELOG.md
CHANGED
@@ -86,7 +86,7 @@ class LogStash::Filters::Split < LogStash::Filters::Base
|
|
86
86
|
#or splits[1].empty?
|
87
87
|
|
88
88
|
splits.each do |value|
|
89
|
-
next if value.empty?
|
89
|
+
next if value.nil? || value.empty?
|
90
90
|
|
91
91
|
event_split = event.clone
|
92
92
|
@logger.debug("Split event", :value => value, :field => @field)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-split'
|
4
|
-
s.version = '3.1.
|
4
|
+
s.version = '3.1.6'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Splits multi-line messages into distinct events"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
data/spec/filters/split_spec.rb
CHANGED
@@ -87,6 +87,23 @@ describe LogStash::Filters::Split do
|
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
|
+
describe "split array with nil" do
|
91
|
+
config <<-CONFIG
|
92
|
+
filter {
|
93
|
+
split {
|
94
|
+
field => "array"
|
95
|
+
}
|
96
|
+
}
|
97
|
+
CONFIG
|
98
|
+
|
99
|
+
sample("array" => ["big", nil, "bird", nil, "sesame street"]) do
|
100
|
+
insist { subject.length } == 3
|
101
|
+
insist { subject[0].get("array") } == "big"
|
102
|
+
insist { subject[1].get("array") } == "bird"
|
103
|
+
insist { subject[2].get("array") } == "sesame street"
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
90
107
|
describe "split array into new field" do
|
91
108
|
config <<-CONFIG
|
92
109
|
filter {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-split
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11
|
11
|
+
date: 2017-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|
86
86
|
rubyforge_project:
|
87
|
-
rubygems_version: 2.6.
|
87
|
+
rubygems_version: 2.6.13
|
88
88
|
signing_key:
|
89
89
|
specification_version: 4
|
90
90
|
summary: Splits multi-line messages into distinct events
|