fluent-plugin-record-reformer 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +6 -0
- data/fluent-plugin-record-reformer.gemspec +1 -1
- data/lib/fluent/plugin/out_record_reformer.rb +6 -1
- data/test/test_out_record_reformer.rb +6 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 905ddbf4748a2a0609648bde025f49bc1959a475
|
4
|
+
data.tar.gz: ee4120d718f07dde5793555fd48f9b67bbb89282
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7a72c9c560f8aaf604d2840b53c8d931ee0f79fe57ecb4252f24b09e8d6c909ba6a36f11b2b3b717cefa0141e1187bb752930b17d07ffcb4fb4217207dcaf3a
|
7
|
+
data.tar.gz: d8c2436af87363743160312d9e830548306343f5ef39bddeca89637efb03306e381ef13be082659a3ad60b3a00e6aa48979a0b5dc8bd27145ea118050c8d69a9
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.name = "fluent-plugin-record-reformer"
|
6
|
-
gem.version = "0.6.
|
6
|
+
gem.version = "0.6.1"
|
7
7
|
gem.authors = ["Naotoshi Seo"]
|
8
8
|
gem.email = "sonots@gmail.com"
|
9
9
|
gem.homepage = "https://github.com/sonots/fluent-plugin-record-reformer"
|
@@ -23,6 +23,11 @@ module Fluent
|
|
23
23
|
define_method("log") { $log }
|
24
24
|
end
|
25
25
|
|
26
|
+
# Define `router` method of v0.12 to support v0.10 or earlier
|
27
|
+
unless method_defined?(:router)
|
28
|
+
define_method("router") { Fluent::Engine }
|
29
|
+
end
|
30
|
+
|
26
31
|
def configure(conf)
|
27
32
|
super
|
28
33
|
|
@@ -87,7 +92,7 @@ module Fluent
|
|
87
92
|
es.each {|time, record|
|
88
93
|
last_record = record # for debug log
|
89
94
|
new_tag, new_record = reform(@tag, time, record, placeholders)
|
90
|
-
|
95
|
+
router.emit(new_tag, time, new_record) if new_tag
|
91
96
|
}
|
92
97
|
chain.next
|
93
98
|
rescue => e
|
@@ -397,8 +397,9 @@ class RecordReformerOutputTest < Test::Unit::TestCase
|
|
397
397
|
d = create_driver(config, use_v1)
|
398
398
|
message = {"@timestamp" => "foo"}
|
399
399
|
d.run { d.emit(message, @time) }
|
400
|
-
|
401
|
-
|
400
|
+
d.emits.each do |(tag, time, record)|
|
401
|
+
assert_equal message["@timestamp"], record["foo"]
|
402
|
+
end
|
402
403
|
end
|
403
404
|
|
404
405
|
test 'expand fields starting with @ (enable_ruby yes)' do
|
@@ -412,8 +413,9 @@ class RecordReformerOutputTest < Test::Unit::TestCase
|
|
412
413
|
d = create_driver(config, use_v1)
|
413
414
|
message = {"@timestamp" => "foo"}
|
414
415
|
d.run { d.emit(message, @time) }
|
415
|
-
|
416
|
-
|
416
|
+
d.emits.each do |(tag, time, record)|
|
417
|
+
assert_equal message["@timestamp"], record["foo"]
|
418
|
+
end
|
417
419
|
end
|
418
420
|
end
|
419
421
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-record-reformer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|