fluent-plugin-record-modifier 2.1.0 → 2.1.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 +4 -4
- data/.github/workflows/linux.yml +26 -0
- data/ChangeLog +5 -0
- data/README.md +2 -2
- data/VERSION +1 -1
- data/fluent-plugin-record-modifier.gemspec +1 -1
- data/lib/fluent/plugin/filter_record_modifier.rb +2 -2
- data/lib/fluent/plugin/out_record_modifier.rb +2 -2
- data/test/test_filter_record_modifier.rb +7 -7
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5223ce121e04b41b661a2d575a7067f69295ea5d665656cb37a23acbd71d3624
|
4
|
+
data.tar.gz: 00e6c78cf07e354ab0a0d77d42a5bc00f782a1bcb9ca56899440ac75dbd6f4b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79597158486f6da9646479758d981afc494da860653006d93428abf9d5c211008f60339ca39d238a04b77f2aadd38f459f70b4dccb46c23618614cbc75795894
|
7
|
+
data.tar.gz: 8912416c324b79f0d4e4e6d29f8625105e1c983492e509a56484a81d5cb0c72b6270a915f087b4946d5d522b1817133a99341b9a91c241de01c4f7c501f3310b
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: linux
|
2
|
+
on:
|
3
|
+
- push
|
4
|
+
- pull_request
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ${{ matrix.os }}
|
8
|
+
strategy:
|
9
|
+
fail-fast: false
|
10
|
+
matrix:
|
11
|
+
ruby: ['2.6', '2.7', '3.0', '3.1']
|
12
|
+
os:
|
13
|
+
- ubuntu-latest
|
14
|
+
name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
20
|
+
- name: unit testing
|
21
|
+
env:
|
22
|
+
CI: true
|
23
|
+
run: |
|
24
|
+
gem install bundler rake
|
25
|
+
bundle install --jobs 4 --retry 3
|
26
|
+
bundle exec rake test
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -164,7 +164,7 @@ If you want to replace specific value for keys you can use `replace` section.
|
|
164
164
|
# your regexp
|
165
165
|
expression /^(?<start>.+).{2}(?<end>.+)$/
|
166
166
|
# replace string
|
167
|
-
replace
|
167
|
+
replace \k<start>ors\k<end>
|
168
168
|
</replace>
|
169
169
|
# replace key key2
|
170
170
|
<replace>
|
@@ -173,7 +173,7 @@ If you want to replace specific value for keys you can use `replace` section.
|
|
173
173
|
# your regexp
|
174
174
|
expression /^(.{1}).{2}(.{1})$/
|
175
175
|
# replace string
|
176
|
-
replace
|
176
|
+
replace \1ors\2
|
177
177
|
</replace>
|
178
178
|
</filter>
|
179
179
|
```
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.1
|
@@ -103,8 +103,8 @@ DESC
|
|
103
103
|
}
|
104
104
|
elsif @whitelist_keys
|
105
105
|
modified = {}
|
106
|
-
|
107
|
-
modified[
|
106
|
+
@whitelist_keys.each do |key|
|
107
|
+
modified[key] = record[key] if record.has_key?(key)
|
108
108
|
end
|
109
109
|
record = modified
|
110
110
|
end
|
@@ -138,8 +138,8 @@ DESC
|
|
138
138
|
}
|
139
139
|
elsif @whitelist_keys
|
140
140
|
modified = {}
|
141
|
-
|
142
|
-
modified[
|
141
|
+
@whitelist_keys.each do |key|
|
142
|
+
modified[key] = record[key] if record.has_key?(key)
|
143
143
|
end
|
144
144
|
record = modified
|
145
145
|
end
|
@@ -145,18 +145,18 @@ class RecordModifierFilterTest < Test::Unit::TestCase
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def test_replace_values
|
148
|
-
d = create_driver
|
148
|
+
d = create_driver <<'CONFIG'
|
149
149
|
<replace>
|
150
150
|
key k1
|
151
151
|
expression /^(?<start>.+).{2}(?<end>.+)$/
|
152
|
-
replace
|
152
|
+
replace \k<start>ors\k<end>
|
153
153
|
</replace>
|
154
154
|
<replace>
|
155
155
|
key k2
|
156
156
|
expression /^(.{1}).{2}(.{1})$/
|
157
|
-
replace
|
157
|
+
replace \1ors\2
|
158
158
|
</replace>
|
159
|
-
|
159
|
+
CONFIG
|
160
160
|
|
161
161
|
d.run(default_tag: @tag) do
|
162
162
|
d.feed("k1" => 'hoge', "k2" => 'hoge', "k3" => 'bar')
|
@@ -166,13 +166,13 @@ class RecordModifierFilterTest < Test::Unit::TestCase
|
|
166
166
|
end
|
167
167
|
|
168
168
|
def test_does_not_replace
|
169
|
-
d = create_driver
|
169
|
+
d = create_driver <<'CONFIG'
|
170
170
|
<replace>
|
171
171
|
key k1
|
172
172
|
expression /^(?<start>.+).{2}(?<end>.+)$/
|
173
|
-
replace
|
173
|
+
replace \k<start>ors\k<end>
|
174
174
|
</replace>
|
175
|
-
|
175
|
+
CONFIG
|
176
176
|
|
177
177
|
d.run(default_tag: @tag) do
|
178
178
|
d.feed("k1" => 'hog')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-record-modifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Nakagawa
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -50,20 +50,21 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 3.
|
53
|
+
version: '3.3'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 3.
|
60
|
+
version: '3.3'
|
61
61
|
description: Filter plugin for modifying event record
|
62
62
|
email: repeatedly@gmail.com
|
63
63
|
executables: []
|
64
64
|
extensions: []
|
65
65
|
extra_rdoc_files: []
|
66
66
|
files:
|
67
|
+
- ".github/workflows/linux.yml"
|
67
68
|
- ".travis.yml"
|
68
69
|
- ChangeLog
|
69
70
|
- Gemfile
|
@@ -79,7 +80,7 @@ homepage: https://github.com/repeatedly/fluent-plugin-record-modifier
|
|
79
80
|
licenses:
|
80
81
|
- MIT
|
81
82
|
metadata: {}
|
82
|
-
post_install_message:
|
83
|
+
post_install_message:
|
83
84
|
rdoc_options: []
|
84
85
|
require_paths:
|
85
86
|
- lib
|
@@ -94,8 +95,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
95
|
- !ruby/object:Gem::Version
|
95
96
|
version: '0'
|
96
97
|
requirements: []
|
97
|
-
rubygems_version: 3.
|
98
|
-
signing_key:
|
98
|
+
rubygems_version: 3.3.7
|
99
|
+
signing_key:
|
99
100
|
specification_version: 4
|
100
101
|
summary: Filter plugin for modifying event record
|
101
102
|
test_files:
|