fluent-plugin-config-expander 0.0.1 → 0.1.0
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.
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "fluent-plugin-config-expander"
|
5
|
-
gem.version = "0.0
|
5
|
+
gem.version = "0.1.0"
|
6
6
|
gem.authors = ["TAGOMORI Satoshi"]
|
7
7
|
gem.email = ["tagomoris@gmail.com"]
|
8
8
|
gem.description = %q{This plugin provides directives for loop extraction}
|
@@ -5,6 +5,11 @@ class Fluent::ConfigExpanderInput < Fluent::Input
|
|
5
5
|
|
6
6
|
attr_accessor :plugin
|
7
7
|
|
8
|
+
def mark_used(conf)
|
9
|
+
conf.used = conf.keys
|
10
|
+
conf.elements.each{|e| mark_used(e)}
|
11
|
+
end
|
12
|
+
|
8
13
|
def expand_config(conf)
|
9
14
|
ex = Fluent::Config::Expander.expand(conf, {})
|
10
15
|
ex.name = ''
|
@@ -22,6 +27,8 @@ class Fluent::ConfigExpanderInput < Fluent::Input
|
|
22
27
|
ex = expand_config(configs.first)
|
23
28
|
@plugin = Fluent::Plugin.new_input(ex['type'])
|
24
29
|
@plugin.configure(ex)
|
30
|
+
|
31
|
+
mark_used(configs.first)
|
25
32
|
end
|
26
33
|
|
27
34
|
def start
|
@@ -5,6 +5,11 @@ class Fluent::ConfigExpanderOutput < Fluent::Output
|
|
5
5
|
|
6
6
|
attr_accessor :plugin
|
7
7
|
|
8
|
+
def mark_used(conf)
|
9
|
+
conf.used = conf.keys
|
10
|
+
conf.elements.each{|e| mark_used(e)}
|
11
|
+
end
|
12
|
+
|
8
13
|
def expand_config(conf)
|
9
14
|
ex = Fluent::Config::Expander.expand(conf, {})
|
10
15
|
ex.name = ''
|
@@ -22,6 +27,8 @@ class Fluent::ConfigExpanderOutput < Fluent::Output
|
|
22
27
|
ex = expand_config(configs.first)
|
23
28
|
@plugin = Fluent::Plugin.new_output(ex['type'])
|
24
29
|
@plugin.configure(ex)
|
30
|
+
|
31
|
+
mark_used(configs.first)
|
25
32
|
end
|
26
33
|
|
27
34
|
def start
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-config-expander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|