logstash-filter-alter 2.0.1 → 2.0.3
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/logstash/filters/alter.rb +6 -4
- data/logstash-filter-alter.gemspec +2 -2
- data/spec/filters/alter_spec.rb +2 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcabc1f3216126b319854e7a882fca4f0deb7b7a
|
4
|
+
data.tar.gz: b454914f6c2d668cbfb3831305018c1d2001fa63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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.
|
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.
|
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
|
data/spec/filters/alter_spec.rb
CHANGED
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.
|
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-
|
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.
|
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.
|
29
|
+
version: 2.0.0.beta2
|
30
30
|
- - <
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 3.0.0
|