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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29a01452d65bba4ce51adbba5fea3d14eff88b9b0d14b08f1ffd2d2c61eff16d
4
- data.tar.gz: df9330c9bcb183569b3635c4afa68009f7cb3b5c1f5206e3e1a229d350a318b3
3
+ metadata.gz: fe030f91f29f8ff0430df5dfd10383768f638791b8c0daff31b6c812ee5da2f1
4
+ data.tar.gz: 1f62b67442999091a356fda0475dfa57c1f1b721050e6ecee1fc388f0315084c
5
5
  SHA512:
6
- metadata.gz: a65762e0566040d07fd33e30864b7801b6331021ac2d75ab9cdce9d9f7675067b87ce3b015f350a94151ea96266cfe7481df881f8bb28679e94ed682fbc85163
7
- data.tar.gz: d0fa3d98bcb2f086dd3e1ac10e0b622d91cb7050cdf17ffc2f491091d28df0ab3ff50a82af81e37451a53906f9d397cf093abd7347ac3b026798971a2491ce8f
6
+ metadata.gz: 1ec5139936cada2b3ae96193e74604ff271f5a7bfda523f39d7309e0fce259dbbec70767d0595c75db9efa1e4a4a6e0b52888e3dc264391b35ed32c45a6e5f53
7
+ data.tar.gz: dc6a646310aea30b1ddbf0fda097e648063277e53442e0afb9c5daadecc5f78509bc848cf8ecc9f86bbfb9f23afac473dd1d772141b7cae409455022eec5d375
@@ -1,3 +1,6 @@
1
+ ## 3.1.6
2
+ - Fix crash on arrays with null values
3
+
1
4
  ## 3.1.5
2
5
  - Update gemspec summary
3
6
 
@@ -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.5'
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"
@@ -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.5
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-07 00:00:00.000000000 Z
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.11
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