logstash-filter-translate 3.3.0 → 3.3.1

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: 1e20474957ecdfeb11d3f64ada5ca4363c80f145d9c39ced2dc5c87be22f0759
4
- data.tar.gz: 485d8d8dcaeccec44a33b67495e56717b317d8de581ed28d0105e12e065a78f3
3
+ metadata.gz: 77bd945dee5e20dbc7eb6837c655e807373ee8923dcbd498c9fcf5b1065c6661
4
+ data.tar.gz: 878df6d8dfcc5fa53bb617163b0ddfe6feeb8e876aed9668b337f66dc8472221
5
5
  SHA512:
6
- metadata.gz: c2f7191f2ba0473849477e6b6fbee92cc48cfae294fa140d5700f4228771b88f0d3afdecaa2e9a668a743ff5df97cf13f915bc264179c0d4fff50588dba29af9
7
- data.tar.gz: cf76f651c156343c0829d8be92d92adf1041ce235355fa005ca3cdcf000841e0aabaa3f39ace9dba31f824067459ec80ccb7c94e12e71b71af19256757be6f71
6
+ metadata.gz: d45ec30865d73884f9564f3680fdc1fb230c9fa71507c86d475e6ec0759d13863080f8c237ab34b38ccad08bca0781ab1d8a8523955841db2d0a0334091a9cf3
7
+ data.tar.gz: 443284f8db270ec6081a2017bd6597733be886643232d97a7630c99e1b194970183e0a7d070ed511bdb1d8069e7f929a991d608798a35d8bd5408878806945d5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 3.3.1
2
+ - Refactor: reading .csv for JRuby 9.3 compatibility [#94](https://github.com/logstash-plugins/logstash-filter-translate/pull/94)
3
+
4
+ NOTE: these changes are essential for the plugin to work properly under Logstash 8.3 and later.
5
+
1
6
  ## 3.3.0
2
7
  - Feat: added ECS compatibility mode [#89](https://github.com/logstash-plugins/logstash-filter-translate/pull/89)
3
8
  - deprecated `destination` option in favor of `target` to better align with other plugins
@@ -6,19 +6,9 @@ module LogStash module Filters module Dictionary
6
6
 
7
7
  protected
8
8
 
9
- def initialize_for_file_type
10
- @io = StringIO.new("")
11
- @csv = ::CSV.new(@io)
12
- end
13
-
14
9
  def read_file_into_dictionary
15
- # low level CSV read that tries to create as
16
- # few intermediate objects as possible
17
- # this overwrites the value at key
18
- IO.foreach(@dictionary_path, :mode => 'r:bom|utf-8') do |line|
19
- @io.string = line
20
- k,v = @csv.shift
21
- @dictionary[k] = v
10
+ ::CSV.open(@dictionary_path, 'r:bom|utf-8') do |csv|
11
+ csv.each { |k,v| @dictionary[k] = v }
22
12
  end
23
13
  end
24
14
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-translate'
4
- s.version = '3.3.0'
4
+ s.version = '3.3.1'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Replaces field contents based on a hash or YAML file"
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"
@@ -58,7 +58,9 @@ describe LogStash::Filters::Translate do
58
58
  end
59
59
  .then_after(1.2, "wait then translate again") do
60
60
  subject.filter(event)
61
- wait(0.1).for{event.get("[translation]")}.to eq("12"), "field [translation] did not eq '12'"
61
+ try(5) do
62
+ wait(0.1).for{event.get("[translation]")}.to eq("12"), "field [translation] did not eq '12'"
63
+ end
62
64
  end
63
65
  .then("stop") do
64
66
  subject.close
@@ -87,7 +89,9 @@ describe LogStash::Filters::Translate do
87
89
  end
88
90
  .then_after(1.2, "wait then translate again") do
89
91
  subject.filter(event)
90
- wait(0.1).for{event.get("[translation]")}.to eq("22"), "field [translation] did not eq '22'"
92
+ try(5) do
93
+ wait(0.1).for{event.get("[translation]")}.to eq("22"), "field [translation] did not eq '22'"
94
+ end
91
95
  end
92
96
  .then("stop") do
93
97
  subject.close
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-translate
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-30 00:00:00.000000000 Z
11
+ date: 2022-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -206,8 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  - !ruby/object:Gem::Version
207
207
  version: '0'
208
208
  requirements: []
209
- rubyforge_project:
210
- rubygems_version: 2.6.13
209
+ rubygems_version: 3.1.6
211
210
  signing_key:
212
211
  specification_version: 4
213
212
  summary: Replaces field contents based on a hash or YAML file