fluent-plugin-flowcounter 0.2.1 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f3a187663108ac48205ef0c348c117dde5ad739
4
- data.tar.gz: 268e1015ac4e5fbb422362360862a818a835a5f5
3
+ metadata.gz: daa9d057b7561ba523c9fe27cc4fd24868abe118
4
+ data.tar.gz: 7299e8f4524e59065628e266849b96f6bbd2fbd6
5
5
  SHA512:
6
- metadata.gz: dbf45735750eb5218d57c677eefec7fb9fd5903d685a765a03d5e36a37ca73f8bad8c094ed55d4e59e3b05891d22be6641d4a99edd17c85ace6cf497cd7892ff
7
- data.tar.gz: 032a9f50686aa26f35960a89c871d7348cd5cfa40ae44b6b12dd2e30d5dc1293c66fc3ab20fad90abd1a49d015c695afaca75139e998031313f3759b7c4ffbe1
6
+ metadata.gz: 6c546c6447fc8d690e443c72acda96ce6d68c5766463bd55e4996e19657989a8ebc019b608da5f3ecf78d208a5fc582816ffe1a65782e5a3fa78ef9c1edcdf91
7
+ data.tar.gz: c13511380a7ffe143b06ed6b69be97208065d420cc10c6bae83b18a133fe96b9220b08c181bafd6d530b279d1569c4d14200fb13c09ad66616e434c7048cc1a5
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = "fluent-plugin-flowcounter"
4
- gem.version = "0.2.1"
4
+ gem.version = "0.3.0"
5
5
  gem.authors = ["TAGOMORI Satoshi"]
6
6
  gem.email = ["tagomoris@gmail.com"]
7
7
  gem.summary = %q{Fluent plugin to count message flow}
@@ -8,6 +8,11 @@ class Fluent::FlowCounterOutput < Fluent::Output
8
8
  define_method("log") { $log }
9
9
  end
10
10
 
11
+ # Define `router` method of v0.12 to support v0.10 or earlier
12
+ unless method_defined?(:router)
13
+ define_method("router") { ::Fluent::Engine }
14
+ end
15
+
11
16
  config_param :unit, :string, :default => 'minute'
12
17
  config_param :aggregate, :string, :default => 'tag'
13
18
  config_param :output_style, :string, :default => 'joined'
@@ -132,10 +137,10 @@ class Fluent::FlowCounterOutput < Fluent::Output
132
137
  def flush_emit(step)
133
138
  if @output_style == :tagged
134
139
  tagged_flush(step).each do |data|
135
- Fluent::Engine.emit(@tag, Fluent::Engine.now, data)
140
+ router.emit(@tag, Fluent::Engine.now, data)
136
141
  end
137
142
  else
138
- Fluent::Engine.emit(@tag, Fluent::Engine.now, flush(step))
143
+ router.emit(@tag, Fluent::Engine.now, flush(step))
139
144
  end
140
145
  end
141
146
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-flowcounter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-18 00:00:00.000000000 Z
11
+ date: 2015-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -91,11 +91,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.2.2
94
+ rubygems_version: 2.4.5
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Fluent plugin to count message flow
98
98
  test_files:
99
99
  - test/helper.rb
100
100
  - test/plugin/test_out_flowcounter.rb
101
- has_rdoc: