fluent-mixin-type-converter 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -30,7 +30,7 @@ Adding this mixin plugin, it will enabled to use these type conversion in your p
30
30
  ```xml
31
31
  # input plugin example
32
32
  <source>
33
- type foo_bar
33
+ @type foo_bar
34
34
  tag test.message
35
35
 
36
36
  # type conversion with this rule before emit.
@@ -41,7 +41,7 @@ Adding this mixin plugin, it will enabled to use these type conversion in your p
41
41
  ```xml
42
42
  # output plugin example
43
43
  <match test.foo>
44
- type foo_bar
44
+ @type foo_bar
45
45
  tag test.message
46
46
 
47
47
  # type conversion with this rule before emit.
@@ -103,7 +103,7 @@ module Fluent
103
103
  def emit_message(tag, message)
104
104
  emit_tag = tag.dup
105
105
  filter_record(emit_tag, Engine.now, message)
106
- Engine.emit(emit_tag, Engine.now, message)
106
+ router.emit(emit_tag, Engine.now, message)
107
107
  end
108
108
 
109
109
  # ...snip...
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-mixin-type-converter"
7
- spec.version = "0.0.4"
7
+ spec.version = "0.1.0"
8
8
  spec.authors = ["Kentaro Yoshida"]
9
9
  spec.email = ["y.ken.studio@gmail.com"]
10
10
  spec.summary = %q{Fluentd mixin plugin to provides type conversion function as like as in_tail plugin. It acts calling Fluent::TextParser::TypeConverter as mixin. It will let you get easy to implement type conversion for your own plugins.}
@@ -1,3 +1,5 @@
1
+ require 'fluent/parser'
2
+
1
3
  module Fluent
2
4
  module Mixin
3
5
  module TypeConverter
@@ -20,11 +20,16 @@ class Fluent::TypeConverterMixinOutput < Fluent::Output
20
20
  end
21
21
  end
22
22
 
23
+ # Define `router` method of v0.12 to support v0.10 or earlier
24
+ unless method_defined?(:router)
25
+ define_method("router") { Fluent::Engine }
26
+ end
27
+
23
28
  def emit(tag, es, chain)
24
29
  es.each do |time, record|
25
30
  emit_tag = tag.dup
26
31
  filter_record(emit_tag, time, record)
27
- Fluent::Engine.emit(emit_tag, time, record)
32
+ router.emit(emit_tag, time, record)
28
33
  end
29
34
  chain.next
30
35
  end
metadata CHANGED
@@ -1,83 +1,94 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-mixin-type-converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Kentaro Yoshida
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2016-02-29 00:00:00.000000000 Z
12
+ date: 2017-03-30 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - ">="
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '0'
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - ">="
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - ">="
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: '0'
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - ">="
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: test-unit
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - ">="
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: 3.1.0
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - ">="
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: 3.1.0
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: fluent-mixin-rewrite-tag-name
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
- - - ">="
67
+ - - ! '>='
60
68
  - !ruby/object:Gem::Version
61
69
  version: '0'
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
- - - ">="
75
+ - - ! '>='
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0'
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: fluentd
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
- - - ">="
83
+ - - ! '>='
74
84
  - !ruby/object:Gem::Version
75
85
  version: '0'
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
- - - ">="
91
+ - - ! '>='
81
92
  - !ruby/object:Gem::Version
82
93
  version: '0'
83
94
  description:
@@ -87,8 +98,8 @@ executables: []
87
98
  extensions: []
88
99
  extra_rdoc_files: []
89
100
  files:
90
- - ".gitignore"
91
- - ".travis.yml"
101
+ - .gitignore
102
+ - .travis.yml
92
103
  - Gemfile
93
104
  - LICENSE
94
105
  - README.md
@@ -101,26 +112,27 @@ files:
101
112
  homepage: https://github.com/y-ken/fluent-mixin-type-converter
102
113
  licenses:
103
114
  - Apache License, Version 2.0
104
- metadata: {}
105
115
  post_install_message:
106
116
  rdoc_options: []
107
117
  require_paths:
108
118
  - lib
109
119
  required_ruby_version: !ruby/object:Gem::Requirement
120
+ none: false
110
121
  requirements:
111
- - - ">="
122
+ - - ! '>='
112
123
  - !ruby/object:Gem::Version
113
124
  version: '0'
114
125
  required_rubygems_version: !ruby/object:Gem::Requirement
126
+ none: false
115
127
  requirements:
116
- - - ">="
128
+ - - ! '>='
117
129
  - !ruby/object:Gem::Version
118
130
  version: '0'
119
131
  requirements: []
120
132
  rubyforge_project:
121
- rubygems_version: 2.5.2
133
+ rubygems_version: 1.8.23
122
134
  signing_key:
123
- specification_version: 4
135
+ specification_version: 3
124
136
  summary: Fluentd mixin plugin to provides type conversion function as like as in_tail
125
137
  plugin. It acts calling Fluent::TextParser::TypeConverter as mixin. It will let
126
138
  you get easy to implement type conversion for your own plugins.
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: caa96f243ad1bbdcc64308f2252c8174e3369568
4
- data.tar.gz: f918c29bbd8bbaee9384667c7fc01cee4ba5c2a7
5
- SHA512:
6
- metadata.gz: 069b9aa8f6f1e12c38ff1b2b9ac1d42b15f5968c1e9682c072948e1cfb4db35473c444977444021914cfcd97cf4c1363f2539782562c0c72f031919a1a3309dd
7
- data.tar.gz: 4fbec76c7e4de0a354ba1c9ed5116b776bf8360c998d03ffe95c4029c9d88d27b9b6f62cd7aeaae114a0953988298b4acd2dcb518c33859d4db59385d9f5f0ab