fluent-plugin-config-expander 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f027aae70a497c28fe302e764006f38d4a63b9c9
4
- data.tar.gz: a921f29a8cf2689cd975d69bbb728112dac7b97b
3
+ metadata.gz: fc15b514417365a2c266ae6d9a68fd1230eb9ebf
4
+ data.tar.gz: 572dcd67b74ad9fd0849cfa91f14b6b51107f235
5
5
  SHA512:
6
- metadata.gz: 84b3bd584a5378fbaa9a48e2364d6a1b280d93ad248c68c127fd4b9151781526d5a2bfebd8121e87333d0cc80a1e32fbaf09c74f9e213d81b722beaa631b0174
7
- data.tar.gz: 7d5adde5590ab2c3b18c6221390cb281585d29434daf8b06ca899151f0825268700d8df4e6b58a96ef09bd5ab1f65a8dc4f0dfc1f259e3661921ed9f2dc9d821
6
+ metadata.gz: fbdd8c9de434f924943e781ec51aad1d00e3d796ccf695693452dc261adbd982338f81d9783fcdfb8c5d12d482fbb3b0cf3ed17856b4b51367ba856885cdc172
7
+ data.tar.gz: 6807998f3d95eea1f7951733f871f3b4575948cb87c0739a79f5eca91837ade83cd00762a7bb9100db3a5ef9417fef765752d0acc4a0b43ecd20abde3ea2881b
data/README.md CHANGED
@@ -5,14 +5,14 @@ This is a plugin for [Fluentd](http://fluentd.org).
5
5
  ## ConfigExpanderInput, ConfigExpanderOutput
6
6
 
7
7
  ConfigExpanderInput, ConfigExpanderFilter and ConfigExpanderOutput plugins provide simple configuration template to write items repeatedly.
8
- In <config> section, you can write actual configuration for actual input/filter/output plugin, with special directives for loop controls.
8
+ In `<config>` section, you can write actual configuration for actual input/filter/output plugin, with special directives for loop controls.
9
9
 
10
10
  And also supports built-in placeholders below:
11
11
  * hostname (ex: \_\_HOSTNAME\_\_, \_\_hostname\_\_, ${hostname}, ${HOSTNAME})
12
12
 
13
13
  ## Configuration
14
14
 
15
- For all of input, filter and output (for <source>, <filter> and <match>), you can use 'config_expander' and its 'for' directive like below:
15
+ For all of input, filter and output (for `<source>`, `<filter>` and `<match>`), you can use 'config_expander' and its 'for' directive like below:
16
16
 
17
17
  <match example.**>
18
18
  @type config_expander
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "fluent-plugin-config-expander"
5
- gem.version = "1.0.0"
5
+ gem.version = "1.0.1"
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}
@@ -38,13 +38,19 @@ class Fluent::Plugin::ConfigExpanderFilter < Fluent::Plugin::Filter
38
38
  @plugin.configure(ex)
39
39
  mark_used(@config_config.corresponding_config_element)
40
40
 
41
- self.extend SingleForwardable
42
- override_methods = self.methods + @plugin.methods - SingleForwardable.instance_methods - Object.instance_methods
43
- override_methods.uniq!
44
- def_delegators(:@plugin, *override_methods)
45
- end
41
+ # hack for https://bugs.ruby-lang.org/issues/12478 in ruby 2.3 or earlier
42
+ mojule = Module.new do
43
+ def method_defined?(accessor)
44
+ methods.include?(accessor.to_sym)
45
+ end
46
+ def private_method_defined?(accessor)
47
+ private_methods.include?(accessor.to_sym)
48
+ end
49
+ end
50
+ self.extend(mojule) unless self.class === Module
46
51
 
47
- def method_missing(name, *args, &block)
48
- @plugin.__send__(name, *args, &block)
52
+ self.extend SingleForwardable
53
+ override_methods = @plugin.methods - SingleForwardable.instance_methods - Object.instance_methods
54
+ def_single_delegators(:@plugin, *override_methods)
49
55
  end
50
56
  end
@@ -38,13 +38,19 @@ class Fluent::Plugin::ConfigExpanderInput < Fluent::Plugin::Input
38
38
  @plugin.configure(ex)
39
39
  mark_used(@config_config.corresponding_config_element)
40
40
 
41
+ # hack for https://bugs.ruby-lang.org/issues/12478 in ruby 2.3 or earlier
42
+ mojule = Module.new do
43
+ def method_defined?(accessor)
44
+ methods.include?(accessor.to_sym)
45
+ end
46
+ def private_method_defined?(accessor)
47
+ private_methods.include?(accessor.to_sym)
48
+ end
49
+ end
50
+ self.extend(mojule) unless self.class === Module
51
+
41
52
  self.extend SingleForwardable
42
- override_methods = self.methods + @plugin.methods - SingleForwardable.instance_methods - Object.instance_methods
43
- override_methods.uniq!
53
+ override_methods = @plugin.methods - SingleForwardable.instance_methods - Object.instance_methods
44
54
  def_delegators(:@plugin, *override_methods)
45
55
  end
46
-
47
- def method_missing(name, *args, &block)
48
- @plugin.__send__(name, *args, &block)
49
- end
50
56
  end
@@ -40,13 +40,19 @@ class Fluent::Plugin::ConfigExpanderOutput < Fluent::Plugin::BareOutput
40
40
  @plugin.configure(ex)
41
41
  mark_used(@config_config.corresponding_config_element)
42
42
 
43
+ # hack for https://bugs.ruby-lang.org/issues/12478 in ruby 2.3 or earlier
44
+ mojule = Module.new do
45
+ def method_defined?(accessor)
46
+ methods.include?(accessor.to_sym)
47
+ end
48
+ def private_method_defined?(accessor)
49
+ private_methods.include?(accessor.to_sym)
50
+ end
51
+ end
52
+ self.extend(mojule) unless self.class === Module
53
+
43
54
  self.extend SingleForwardable
44
- override_methods = self.methods + @plugin.methods - SingleForwardable.instance_methods - Object.instance_methods
45
- override_methods.uniq!
55
+ override_methods = @plugin.methods - SingleForwardable.instance_methods - Object.instance_methods
46
56
  def_delegators(:@plugin, *override_methods)
47
57
  end
48
-
49
- def method_missing(name, *args, &block)
50
- @plugin.__send__(name, *args, &block)
51
- end
52
58
  end
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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi