fluent-plugin-eventcounter 0.0.5.1 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fa5f7f1418a4fc315cfcbf1dec17f2a081f52df2
4
+ data.tar.gz: 72835e87e9ecb5a2fd4e99a51ae958c3d42d4aee
5
+ SHA512:
6
+ metadata.gz: 99dabf094666caec3d4008f1e9aaa4693c2d76c8da6a3f3598b76bb780edbb6c1713fbcf9576e350bcf66a750013697a0aaf1e4245f48a5544d29e023fa48c36
7
+ data.tar.gz: 83a374379adf2c2f7038eeceb59d846bfcd333fb768ea24186919dfe1bc28479b14e6ce0ffc1fc40a17b2007c90f745e794c5e048da505f1ab9c381d711f28b2
@@ -0,0 +1,14 @@
1
+ language: ruby
2
+ services:
3
+ - redis-server
4
+ rvm:
5
+ - 2.1
6
+ - 2.2
7
+ - 2.3.3
8
+ gemfile:
9
+ - gemfiles/fluentd.v0.10.gemfile
10
+ - gemfiles/fluentd.v0.12.gemfile
11
+ - gemfiles/fluentd.v0.14.gemfile
12
+ - Gemfile
13
+ before_install:
14
+ - gem update bundler
@@ -0,0 +1,11 @@
1
+ appraise "fluentd.v0.10" do
2
+ gem "fluentd", "~> 0.10.0"
3
+ end
4
+
5
+ appraise "fluentd.v0.12" do
6
+ gem "fluentd", "~> 0.12.0"
7
+ end
8
+
9
+ appraise "fluentd.v0.14" do
10
+ gem "fluentd", "~> 0.14.0"
11
+ end
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- fluent-plugin-eventcounter
1
+ fluent-plugin-eventcounter [![Build Status](https://travis-ci.org/change/fluent-plugin-eventcounter.svg?branch=master)](https://travis-ci.org/change/fluent-plugin-eventcounter)
2
2
  ==========================
3
3
 
4
4
  This plugin is designed to count occurrences of unique values in a specified key and pass them through as counts either as a re-emit or by directly incrementing a specified redis hash. As it's a buffered plugin it will write or re-emit at a (tunable) sane pace.
@@ -0,0 +1,9 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new do |t|
6
+ t.rspec_opts = %w(--format documentation --color)
7
+ end
8
+
9
+ task :default => :spec
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = "fluent-plugin-eventcounter"
4
- gem.version = "0.0.5.1"
5
- gem.authors = ["Sean Dick", "Change.org"]
6
- gem.email = ["sean@change.org"]
4
+ gem.version = "0.0.6"
5
+ gem.authors = ["Sean Dick", "Vijay Ramesh"]
6
+ gem.email = ["sean@seandick.net", "vijay@change.org"]
7
7
  gem.homepage = "https://github.com/change/fluent-plugin-eventcounter"
8
8
  gem.summary = %q{Fluentd plugin to count occurences of values in a field and emit them or write them to redis}
9
9
  gem.description = %q{Fluentd plugin to count occurences of values in a field and emit them or write them to redis}
@@ -19,4 +19,6 @@ Gem::Specification.new do |gem|
19
19
  gem.add_development_dependency "bundler"
20
20
  gem.add_development_dependency "rake"
21
21
  gem.add_development_dependency "rspec"
22
+ gem.add_development_dependency "test-unit", "~> 3.1.0"
23
+ gem.add_development_dependency "appraisal", "~> 2.1.0"
22
24
  end
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "fluentd", "~> 0.10.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "fluentd", "~> 0.12.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "fluentd", "~> 0.14.0"
6
+
7
+ gemspec :path => "../"
@@ -1,5 +1,11 @@
1
1
  class Fluent::EventCounterOutput < Fluent::BufferedOutput
2
2
  Fluent::Plugin.register_output('eventcounter', self)
3
+
4
+ # Define `router` method of v0.12 to support v0.10.57 or earlier
5
+ unless method_defined?(:router)
6
+ define_method("router") { Engine }
7
+ end
8
+
3
9
  def initialize
4
10
  super
5
11
  require 'redis'
@@ -10,7 +16,7 @@ class Fluent::EventCounterOutput < Fluent::BufferedOutput
10
16
 
11
17
  config_param :redis_host, :string, :default => 'localhost'
12
18
  config_param :redis_port, :integer, :default => 6379
13
- config_param :redis_password, :string, :default => nil
19
+ config_param :redis_password, :string, :default => nil, :secret => true
14
20
  config_param :redis_db_number, :integer, :default => 0
15
21
  config_param :redis_sentinels, :array, :default => []
16
22
  config_param :redis_master_group_name, :string, :default => 'mymaster'
@@ -88,7 +94,7 @@ class Fluent::EventCounterOutput < Fluent::BufferedOutput
88
94
 
89
95
  if @emit_only || @debug_emit
90
96
  counts.each do |tag, events|
91
- Fluent::Engine.emit(@emit_to, Time.now, tag => events)
97
+ router.emit(@emit_to, Time.now, tag => events)
92
98
  end
93
99
  end
94
100
 
@@ -7,5 +7,7 @@ Bundler.require(:default, :test)
7
7
  require 'fluent/test'
8
8
  require 'rspec'
9
9
 
10
+ Test::Unit::AutoRunner.need_auto_run = false if defined?(Test::Unit::AutoRunner)
11
+
10
12
  $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
11
- require 'fluent/plugin/out_eventcounter'
13
+ require 'fluent/plugin/out_eventcounter'
metadata CHANGED
@@ -1,137 +1,160 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-eventcounter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.1
5
- prerelease:
4
+ version: 0.0.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Sean Dick
9
- - Change.org
8
+ - Vijay Ramesh
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2016-02-12 00:00:00.000000000 Z
12
+ date: 2016-12-07 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: fluentd
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - ">="
21
19
  - !ruby/object:Gem::Version
22
20
  version: '0'
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - ">="
29
26
  - !ruby/object:Gem::Version
30
27
  version: '0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: redis
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - ">="
37
33
  - !ruby/object:Gem::Version
38
34
  version: '0'
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - ">="
45
40
  - !ruby/object:Gem::Version
46
41
  version: '0'
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: bundler
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - ">="
53
47
  - !ruby/object:Gem::Version
54
48
  version: '0'
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - ">="
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: rake
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ! '>='
60
+ - - ">="
69
61
  - !ruby/object:Gem::Version
70
62
  version: '0'
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ! '>='
67
+ - - ">="
77
68
  - !ruby/object:Gem::Version
78
69
  version: '0'
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: rspec
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ! '>='
74
+ - - ">="
85
75
  - !ruby/object:Gem::Version
86
76
  version: '0'
87
77
  type: :development
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ! '>='
81
+ - - ">="
93
82
  - !ruby/object:Gem::Version
94
83
  version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: test-unit
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: 3.1.0
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: 3.1.0
98
+ - !ruby/object:Gem::Dependency
99
+ name: appraisal
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: 2.1.0
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: 2.1.0
95
112
  description: Fluentd plugin to count occurences of values in a field and emit them
96
113
  or write them to redis
97
114
  email:
98
- - sean@change.org
115
+ - sean@seandick.net
116
+ - vijay@change.org
99
117
  executables: []
100
118
  extensions: []
101
119
  extra_rdoc_files: []
102
120
  files:
103
- - .gitignore
121
+ - ".gitignore"
122
+ - ".travis.yml"
123
+ - Appraisals
104
124
  - Gemfile
105
125
  - LICENSE
106
126
  - README.md
127
+ - Rakefile
107
128
  - fluent-plugin-eventcounter.gemspec
129
+ - gemfiles/fluentd.v0.10.gemfile
130
+ - gemfiles/fluentd.v0.12.gemfile
131
+ - gemfiles/fluentd.v0.14.gemfile
108
132
  - lib/fluent/plugin/out_eventcounter.rb
109
133
  - spec/out_eventcounter_spec.rb
110
134
  - spec/spec_helper.rb
111
135
  homepage: https://github.com/change/fluent-plugin-eventcounter
112
136
  licenses:
113
137
  - MIT
138
+ metadata: {}
114
139
  post_install_message:
115
140
  rdoc_options: []
116
141
  require_paths:
117
142
  - lib
118
143
  required_ruby_version: !ruby/object:Gem::Requirement
119
- none: false
120
144
  requirements:
121
- - - ! '>='
145
+ - - ">="
122
146
  - !ruby/object:Gem::Version
123
147
  version: '0'
124
148
  required_rubygems_version: !ruby/object:Gem::Requirement
125
- none: false
126
149
  requirements:
127
- - - ! '>='
150
+ - - ">="
128
151
  - !ruby/object:Gem::Version
129
152
  version: '0'
130
153
  requirements: []
131
154
  rubyforge_project:
132
- rubygems_version: 1.8.23
155
+ rubygems_version: 2.4.5.1
133
156
  signing_key:
134
- specification_version: 3
157
+ specification_version: 4
135
158
  summary: Fluentd plugin to count occurences of values in a field and emit them or
136
159
  write them to redis
137
160
  test_files: