logstash-filter-mutate 3.0.1 → 3.1.1

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
  SHA1:
3
- metadata.gz: bda9ac0482a5c9e72d601b3de0133868ba7e0a0d
4
- data.tar.gz: 45a914645d7f04eb591d8442e8f69960afce626d
3
+ metadata.gz: 48c014f4bea7404736c72a05151230e8793c3122
4
+ data.tar.gz: 7a12aa1cad1926924cc47a8b12353c30454b8e53
5
5
  SHA512:
6
- metadata.gz: f9ba4825b18764cd894c079649e8464975cdf1f6db35f89d5cc7f2e1f4ea48fd660e13fae18c3d4dca3d000edea2ddc66156209ee16b79190b09d5c74c84665e
7
- data.tar.gz: 39d1b560c0df6cb53024f96f610382724b366974c7238f7759c4ff2f0511236e621300a9f2f03111477bbc4193244ab71fdd02c50106ca992a0346e9c4509446
6
+ metadata.gz: f90806f263c7cc45692a956f6935bdc0dee5c160edc39b6cfb0348f91adf76552b053a4e68e780d3647bdc6ea9e79a4f5ed25e80996885d98cf8fcf904b98248
7
+ data.tar.gz: 1f43ab694b35d2b41aa26dbebf8ad64c5b089e2a70ca6f4d7c58d74dbe2078792bed72cd3b5afb222c231f02af010c1e38d4ebc55ad951c6da72af620332dc4d
data/CHANGELOG.md CHANGED
@@ -1,25 +1,36 @@
1
+ ## 3.1.1
2
+ - Relax constraint on logstash-core-plugin-api to >= 1.60 <= 2.99
3
+
4
+ ## 3.1.0
5
+ - breaking,config: Remove deprecated config `remove`. Please use generic `remove_field` instead.
6
+
1
7
  ## 3.0.1
2
- - Republish all the gems under jruby.
8
+ - internal: Republish all the gems under jruby.
9
+
3
10
  ## 3.0.0
4
- - Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141
5
- # 2.0.6
6
- - [Internal] Temp fix for patterns path in tests
7
- # 2.0.5
8
- - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
9
- # 2.0.4
10
- - New dependency requirements for logstash-core for the 5.0 release
11
+ - internal,deps: Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141
12
+
13
+ ## 2.0.6
14
+ - internal,test: Temp fix for patterns path in tests
15
+
16
+ ## 2.0.5
17
+ - internal,deps: Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
18
+
19
+ ## 2.0.4
20
+ - internal,deps: New dependency requirements for logstash-core for the 5.0 release
21
+
11
22
  ## 2.0.3
12
- - Code cleanups and fix field assignments
23
+ - internal,cleanup: Code cleanups and fix field assignments
13
24
 
14
25
  ## 2.0.0
15
- - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
26
+ - internal: Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
16
27
  instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
17
- - Dependency on logstash-core update to 2.0
28
+ - internal,deps: Dependency on logstash-core update to 2.0
18
29
 
19
30
  ## 1.0.2
20
- - Fix for uppercase and lowercase fail when value is already desired case
21
- - Modify tests to prove bug and verify fix.
31
+ - bugfix: Fix for uppercase and lowercase fail when value is already desired case
32
+ - internal,test: Modify tests to prove bug and verify fix.
22
33
 
23
34
  ## 1.0.1
24
- - Fix for uppercase and lowercase malfunction
25
- - Specific test to prove bug and fix.
35
+ - bugfix: Fix for uppercase and lowercase malfunction
36
+ - internal,test: Specific test to prove bug and fix.
@@ -19,20 +19,6 @@ class LogStash::Filters::Mutate < LogStash::Filters::Base
19
19
  # }
20
20
  config :rename, :validate => :hash
21
21
 
22
- # Remove one or more fields.
23
- #
24
- # Example:
25
- # [source,ruby]
26
- # filter {
27
- # mutate {
28
- # remove => [ "client" ] # Removes the 'client' field
29
- # }
30
- # }
31
- #
32
- # This option is deprecated, instead use `remove_field` option available in all
33
- # filters.
34
- config :remove, :validate => :array, :deprecated => true
35
-
36
22
  # Replace a field with a new value. The new value can include `%{foo}` strings
37
23
  # to help you build a new value from other parts of the event.
38
24
  #
@@ -232,13 +218,6 @@ class LogStash::Filters::Mutate < LogStash::Filters::Base
232
218
 
233
219
  private
234
220
 
235
- def remove(event)
236
- @remove.each do |field|
237
- field = event.sprintf(field)
238
- event.remove(field)
239
- end
240
- end
241
-
242
221
  def rename(event)
243
222
  @rename.each do |old, new|
244
223
  old = event.sprintf(old)
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-mutate'
4
- s.version = '3.0.1'
4
+ s.version = '3.1.1'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "The mutate filter allows you to perform general mutations on fields. You can rename, remove, replace, and modify fields in your 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"
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" }
21
21
 
22
22
  # Gem dependencies
23
- s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
23
+ s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
24
24
  s.add_development_dependency "logstash-patterns-core"
25
25
  s.add_development_dependency "logstash-filter-grok"
26
26
  s.add_development_dependency "logstash-devutils"
@@ -160,7 +160,6 @@ describe LogStash::Filters::Mutate do
160
160
  replace => [ "newfield", "newnew" ]
161
161
  update => [ "nosuchfield", "weee" ]
162
162
  update => [ "updateme", "updated" ]
163
- remove => [ "removeme" ]
164
163
  }
165
164
  }
166
165
  CONFIG
@@ -176,8 +175,7 @@ describe LogStash::Filters::Mutate do
176
175
  "floatme" => [ "1234.455" ],
177
176
  "rename1" => [ "hello world" ],
178
177
  "updateme" => [ "who cares" ],
179
- "replaceme" => [ "who cares" ],
180
- "removeme" => [ "something" ]
178
+ "replaceme" => [ "who cares" ]
181
179
  }
182
180
 
183
181
  sample event do
@@ -191,7 +189,6 @@ describe LogStash::Filters::Mutate do
191
189
  expect(subject.get("floatme")).to eq [1234.455]
192
190
  expect(subject).not_to include("rename1")
193
191
  expect(subject.get("rename2")).to eq [ "hello world" ]
194
- expect(subject).not_to include("removeme")
195
192
 
196
193
  expect(subject).to include("newfield")
197
194
  expect(subject.get("newfield")).to eq "newnew"
@@ -222,62 +219,6 @@ describe LogStash::Filters::Mutate do
222
219
  end
223
220
  end
224
221
 
225
- describe "remove multiple fields" do
226
- config '
227
- filter {
228
- mutate {
229
- remove => [ "remove-me", "remove-me2", "diedie", "[one][two]" ]
230
- }
231
- }'
232
-
233
- sample(
234
- "remove-me" => "Goodbye!",
235
- "remove-me2" => 1234,
236
- "diedie" => [1, 2, 3, 4],
237
- "survivor" => "Hello.",
238
- "one" => { "two" => "wee" }
239
- ) do
240
- expect(subject.get("survivor")).to eq "Hello."
241
-
242
- expect(subject).not_to include("remove-me")
243
- expect(subject).not_to include("remove-me2")
244
- expect(subject).not_to include("diedie")
245
- expect(subject.get("one")).not_to include("two")
246
- end
247
- end
248
-
249
- describe "remove on non-existent field" do
250
- config '
251
- filter {
252
- mutate {
253
- remove => "[foo][bar]"
254
- }
255
- }'
256
-
257
- sample(
258
- "abc" => "def"
259
- ) do
260
- insist { subject.get("abc") } == "def"
261
- end
262
- end
263
-
264
-
265
- describe "remove with dynamic fields (%{})" do
266
- config '
267
- filter {
268
- mutate {
269
- remove => [ "field_%{x}" ]
270
- }
271
- }'
272
-
273
- sample(
274
- "x" => "one",
275
- "field_one" => "value"
276
- ) do
277
- reject { subject }.include?("field_one")
278
- end
279
- end
280
-
281
222
  describe "convert one field to string" do
282
223
  config '
283
224
  filter {
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-mutate
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-09 00:00:00.000000000 Z
11
+ date: 2016-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '1.60'
19
+ - - "<="
17
20
  - !ruby/object:Gem::Version
18
- version: '2.0'
21
+ version: '2.99'
19
22
  name: logstash-core-plugin-api
20
23
  prerelease: false
21
24
  type: :runtime
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '1.60'
30
+ - - "<="
25
31
  - !ruby/object:Gem::Version
26
- version: '2.0'
32
+ version: '2.99'
27
33
  - !ruby/object:Gem::Dependency
28
34
  requirement: !ruby/object:Gem::Requirement
29
35
  requirements:
@@ -104,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
110
  version: '0'
105
111
  requirements: []
106
112
  rubyforge_project:
107
- rubygems_version: 2.4.8
113
+ rubygems_version: 2.6.3
108
114
  signing_key:
109
115
  specification_version: 4
110
116
  summary: The mutate filter allows you to perform general mutations on fields. You can rename, remove, replace, and modify fields in your events.