fluent-plugin-to_s 0.0.2 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2c48dccd2991bef3a2e8daf036ee08cfcda7317
4
- data.tar.gz: ae7c5f970683058b11cd5dbe6939bb8474ba990e
3
+ metadata.gz: 1edff74b8ca5f4537fb608953edbcfca640ddefb
4
+ data.tar.gz: 73ba883176ee10e1cbcdcc8f4fbdef66483bbf2a
5
5
  SHA512:
6
- metadata.gz: 0de5f656ffc28483bbd3b9c904122c053c138f6b2be9253b5243706171dfaf72eb4d3c60ff396efd452bb16e646460cbfb0238c6d25a03605c870feba244058e
7
- data.tar.gz: de8895f80355e642a0670fb81aaeffdaec02aceafbaef54b85dc9d759716542ccd83d50321137a0ef494dd7e46383bf9697641db37b24c6976736b6d525b8d39
6
+ metadata.gz: 0e71f0aff30d3f4af313d033a3505930b12db18cee3bf60c9cdd6a55461764832c4d36eaa101e2740c93fd1214f7c35f72dca6f63efe1fe490e378ec2d310b33
7
+ data.tar.gz: 0a25110397d8bade8f1c3eb8dbb5fd1452fe2a915937b415633966d6cc3a38795dc6faa0082e8330a5f7d7bcfcd6e663396163ad52e4032338cac1be4da8c090
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "fluent-plugin-to_s"
8
- spec.version = "0.0.2"
8
+ spec.version = "0.0.3"
9
9
  spec.authors = ["airtoxin"]
10
10
  spec.email = ["airtoxin@icloud.com"]
11
11
  spec.description = %q{Plugin that adds whole record to to_s field}
@@ -1,21 +1,13 @@
1
1
  class Fluent::ToSOutput < Fluent::Output
2
2
  Fluent::Plugin.register_output('to_s', self)
3
3
 
4
- config_param :tag_prefix, :string, :default => ''
4
+ config_param :tag_prefix, :string, :default => 'to_s'
5
5
  config_param :field_name, :string, :default => 'to_s'
6
6
 
7
7
  def configure(conf)
8
8
  super
9
9
 
10
- @prefix = "#{@tag_prefix}."
11
- @tag_proc =
12
- if !@tag_prefix.empty?
13
- Proc.new {|tag| "#{@prefix}#{tag}"}
14
- else
15
- Proc.new {|tag| tag}
16
- end
17
- @to_s =
18
- Proc.new {|record| record.to_s}
10
+ @tag_proc = Proc.new {|tag| "#{@tag_prefix}.#{tag}"}
19
11
  end
20
12
 
21
13
  def emit(tag, es, chain)
@@ -10,7 +10,7 @@ class ToSOutputTest < Test::Unit::TestCase
10
10
  field_name fname_fuga
11
11
  ]
12
12
 
13
- def create_driver(conf = CONFIG, tag='test')
13
+ def create_driver(conf=CONFIG, tag='test')
14
14
  Fluent::Test::OutputTestDriver.new(Fluent::ToSOutput, tag).configure(conf)
15
15
  end
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-to_s
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - airtoxin