logstash-filter-alter 2.0.1 → 2.0.3

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: 18d4a8ad7e3010623879ce5aa57c7f56750ce5d0
4
- data.tar.gz: f6ea0231857c803f53fd239d08a9fab21e954acd
3
+ metadata.gz: dcabc1f3216126b319854e7a882fca4f0deb7b7a
4
+ data.tar.gz: b454914f6c2d668cbfb3831305018c1d2001fa63
5
5
  SHA512:
6
- metadata.gz: a1afe9fe146908325a84dc40c18ee53eff9713b1e43cda66ecad1359cb8c114213c17839b463c49debd2096f816d0ba511c391d28493e7aefd984328e7dc568a
7
- data.tar.gz: c9e359bd32fa878ff94c7a230949d4e3e0ebd9d244c8a0c87d8ce3883ec54a9c482927323f5bca6426f38802e905e1abc6d962d489a56fb1b5490d8a55a9ff3f
6
+ metadata.gz: 9935b05a303b62dd9e03326a91794204a0bcd9290d6f3d64d0cc7e0e6e15755b0938be19ab506bf5e5264ac0276754da43a4c8d8d5d7d37e0db7a9d753e2fb0f
7
+ data.tar.gz: 4dd545aca02b37ec884a65f2fb55d2af82336d9ea9692510386727a0de6f6e2af267f6fa46569f1368b3f241ef0a6bc2d261063b8a4312f54419d54ca153ef35
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 2.0.2
2
+ - workaround failing test by forcing text out of event.sprintf to be
3
+ always in UTF-8, when this is fix in logstash-core the changes could
4
+ removed.
5
+
1
6
  ## 2.0.0
2
7
  - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
3
8
  instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
@@ -96,8 +96,8 @@ class LogStash::Filters::Alter < LogStash::Filters::Base
96
96
  :subst_array => @coalesce
97
97
  }
98
98
  end
99
-
100
-
99
+
100
+
101
101
  end # def register
102
102
 
103
103
  public
@@ -117,7 +117,6 @@ class LogStash::Filters::Alter < LogStash::Filters::Base
117
117
  field = config[:field]
118
118
  expected = config[:expected]
119
119
  replacement = config[:replacement]
120
-
121
120
  if event[field].is_a?(Array)
122
121
  event[field] = event[field].map do |v|
123
122
  if v == event.sprintf(expected)
@@ -128,7 +127,10 @@ class LogStash::Filters::Alter < LogStash::Filters::Base
128
127
  end
129
128
  else
130
129
  if event[field] == event.sprintf(expected)
131
- event[field] = event.sprintf(replacement)
130
+ # The usage of encode(UTF-8) is a workarround here until the new
131
+ # version of logstash-core is released and include the fix for this
132
+ # after that, this should be removed.
133
+ event[field] = event.sprintf(replacement).encode(Encoding::UTF_8)
132
134
  end
133
135
  end
134
136
  end # @condrewrite_parsed.each
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-alter'
4
- s.version = '2.0.1'
4
+ s.version = '2.0.3'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "The alter filter allows you to do general alterations to fields that are not included in the normal mutate filter"
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/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", ">= 2.0.0.snapshot", "< 3.0.0"
23
+ s.add_runtime_dependency "logstash-core", ">= 2.0.0.beta2", "< 3.0.0"
24
24
 
25
25
  s.add_development_dependency 'logstash-devutils'
26
26
  end
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require "logstash/devutils/rspec/spec_helper"
2
4
  require "logstash/filters/alter"
3
5
 
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-alter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-08 00:00:00.000000000 Z
11
+ date: 2015-10-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
17
  - !ruby/object:Gem::Version
18
- version: 2.0.0.snapshot
18
+ version: 2.0.0.beta2
19
19
  - - <
20
20
  - !ruby/object:Gem::Version
21
21
  version: 3.0.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 2.0.0.snapshot
29
+ version: 2.0.0.beta2
30
30
  - - <
31
31
  - !ruby/object:Gem::Version
32
32
  version: 3.0.0