logstash-filter-de_dot 1.0.3 → 1.0.4

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: 0cf3cf1e8afcb7d2c7576c2ae37bfb2b4d7023f44abb343e74665662a9c03d06
4
- data.tar.gz: c506771dbdf8c88e83e6bcf4dd281512faebf37d79c9fc92dbea6e8f32e3a569
3
+ metadata.gz: da8dc5cdc289c3fb6e88aef34dba9ceec4ffbd853257ca49af4b8f783608fdaa
4
+ data.tar.gz: 5a7ecfed1986fc3e662ee945d1d436d5b55264f4f8f6455d0fe8619e81e2deaf
5
5
  SHA512:
6
- metadata.gz: 7c6b8d0446ed1bdcc02498054bff807e95faa7658cb58d79f82c1b37fb28c073de0a9092b2e79c808176c7b365477490fd52a295c561194cdeff3f49985b8b87
7
- data.tar.gz: fdbf76bf8f5205eb47e0c173c5ee5c35ebfc4a9e4a3da286e924facdeb8b11967258ce9ed95b60b3dc7c0704ba2de6ebea97e8c18c0ace264e87fe33451f7e3a
6
+ metadata.gz: e6e70ccc63003f741bc9c0200c5c9d081af6efb2fea0b22a4af5b45b65d8113994be9934759d731973a574271602152d26008272377c31ad7df5d6264cc64bec
7
+ data.tar.gz: 11a0dfa9a0972742ce4afc2461be92757f60149407d96e2888c977017ec3984e117139949c1ad0a260a2b74317660469f0b62e6e2c1752e93978930be8990615
@@ -1,3 +1,6 @@
1
+ ## 1.0.4
2
+ - fix failure of fieldnames with boolean value "false" #9
3
+
1
4
  ## 1.0.3
2
5
  - Update gemspec summary
3
6
 
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012–2016 Elasticsearch <http://www.elastic.co>
1
+ Copyright (c) 2012-2018 Elasticsearch <http://www.elastic.co>
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
@@ -88,7 +88,7 @@ class LogStash::Filters::De_dot < LogStash::Filters::Base
88
88
  end
89
89
  @logger.debug? && @logger.debug("de_dot: Act on these fields", :fields => fields)
90
90
  fields.each do |ref|
91
- if event.get(ref)
91
+ if event.include?(ref)
92
92
  rename_field(event, ref) if has_dot?(ref)
93
93
  end
94
94
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-de_dot'
3
- s.version = '1.0.3'
3
+ s.version = '1.0.4'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Computationally expensive filter that removes dots from a field name"
6
6
  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"
@@ -178,7 +178,7 @@ describe LogStash::Filters::De_dot do
178
178
  it "should replace all dots with underscores" do
179
179
  subject.filter(event)
180
180
  expect(event.get('acme')).not_to include('super.roller_skates')
181
- expect(event.get('[acme][super_roller_skates')).to eq('coyote')
181
+ expect(event.get('[acme][super_roller_skates]')).to eq('coyote')
182
182
  end
183
183
 
184
184
  it "should not change a field without dots" do
@@ -205,7 +205,7 @@ describe LogStash::Filters::De_dot do
205
205
  it "should replace all dots with underscores" do
206
206
  subject.filter(event)
207
207
  expect(event.get('acme')).not_to include('super.roller_skates')
208
- expect(event.get('[acme][super][roller_skates')).to eq('coyote')
208
+ expect(event.get('[acme][super][roller_skates]')).to eq('coyote')
209
209
  end
210
210
 
211
211
  it "should not change a field without dots" do
@@ -215,4 +215,23 @@ describe LogStash::Filters::De_dot do
215
215
  end
216
216
  end
217
217
 
218
+ describe "Field values containing false" do
219
+ let(:config) {
220
+ {
221
+ "nested" => true,
222
+ }
223
+ }
224
+ let(:attrs) {
225
+ {
226
+ "coyote.won" => false
227
+ }
228
+ }
229
+
230
+ it "should not be ignored" do
231
+ subject.filter(event)
232
+ expect(event).not_to include('coyote.won')
233
+ expect(event.get('[coyote][won]')).to be false
234
+ end
235
+ end
236
+
218
237
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-de_dot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
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: 2019-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 2.6.11
89
+ rubygems_version: 2.6.13
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Computationally expensive filter that removes dots from a field name