fluent-plugin-redis-multi-type-counter 0.1.0 → 0.1.2

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: f1e9b2d54944b6575cabdad55ce1250d61c3163a
4
- data.tar.gz: 692d3df513e0f23ccc6019f7547092f8a38e2e69
3
+ metadata.gz: 936238a72c8d962c1069ee120d0ef01f18f284c8
4
+ data.tar.gz: f3ef9d5150a711d790b3cf995f5fdfd03384c82f
5
5
  SHA512:
6
- metadata.gz: c750a05f9e29ce9b9a925f055039c35e4e1e010dff5db0fb7f6195974e4a025427257b43eb970501d3b60a2570312aff3315eb42cd534000fa6908be3601c77a
7
- data.tar.gz: 6d71cc09fce6a3d3c91c1f92174bd36469602c650d1aaf397e007083b7640f95f2c5df2fee87d63f3d0758f389db860bbdcf69159f5d07303a874ac68c6230f5
6
+ metadata.gz: ef17b10d2221df4eb2937473969fe941b707c41d29bd964474a7977e52445e66a44a301e6ba09805580f5d3763bd32e180b53f38dce7192ba7f3dcf67a2e04ac
7
+ data.tar.gz: 3bccb55ec9a19268492153a7978c75af64c44c85df74a5266e2937108fbc0b96de4e0e5e02e2b37b33d8d3c2cef27c46f163c7b8d7bad7df01338a72d580b9cf
@@ -7,7 +7,7 @@ rvm:
7
7
  services:
8
8
  - redis-server
9
9
 
10
- script: bundle exec ruby -S -Itest test/plugin/out_redis_counter.rb
10
+ script: bundle exec ruby -S -Itest test/plugin/out_redis_multi_type_counter.rb
11
11
 
12
12
  branches:
13
13
  only:
@@ -1,3 +1,6 @@
1
+ ## 0.1.2
2
+ * bug fix (rename files to fit plugin name)
3
+
1
4
  ## 0.1.0
2
5
  * support hash, sorted set type
3
6
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Redis multi-type counter plugin for fluent [![Build Status](https://secure.travis-ci.org/heartsavior/fluent-plugin-redis-multi-type-counter.png)](http://travis-ci.org/heartsavior/fluent-plugin-redis-multi-type-counter)
1
+ # Redis multi-type counter plugin for fluent [![Build Status](https://travis-ci.org/HeartSaVioR/fluent-plugin-redis-multi-type-counter.png)](https://travis-ci.org/HeartSaVioR/fluent-plugin-redis-multi-type-counter)
2
2
 
3
3
  fluent-plugin-redis-multi-type-counter is a fluent plugin to count-up/down redis keys, hash, sorted set.
4
4
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.2
@@ -6,7 +6,7 @@ require 'ruby-prof'
6
6
  end
7
7
 
8
8
  $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
9
- require 'fluent/plugin/out_redis_counter'
9
+ require 'fluent/plugin/out_redis_multi_type_counter'
10
10
 
11
11
  module PerformanceTestApp
12
12
  class Benchmarker
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-redis-multi-type-counter"
6
- s.version = "0.1.0"
6
+ s.version = "0.1.2"
7
7
  s.description = "fluent-plugin-redis-multi-type-counter is a fluent plugin to count-up/down redis keys, hash keys, zset keys"
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Jungtaek Lim"]
@@ -1,6 +1,6 @@
1
1
  module Fluent
2
- class RedisCounterOutput < BufferedOutput
3
- Fluent::Plugin.register_output('redis_counter', self)
2
+ class RedisMultiTypeCounterOutput < BufferedOutput
3
+ Fluent::Plugin.register_output('redis_multi_type_counter', self)
4
4
  attr_reader :host, :port, :db_number, :password, :redis, :patterns
5
5
 
6
6
  config_param :max_pipelining, :integer, :default => 1000
@@ -23,7 +23,7 @@ module Fluent
23
23
  }.each { |element|
24
24
  begin
25
25
  @patterns << Pattern.new(element)
26
- rescue RedisCounterException => e
26
+ rescue RedisMultiTypeCounterException => e
27
27
  raise Fluent::ConfigError, e.message
28
28
  end
29
29
  }
@@ -114,7 +114,7 @@ module Fluent
114
114
  end
115
115
  end
116
116
 
117
- class RedisCounterException < Exception
117
+ class RedisMultiTypeCounterException < Exception
118
118
  end
119
119
 
120
120
  class RecordValueFormatter
@@ -137,17 +137,17 @@ module Fluent
137
137
 
138
138
  def initialize(conf_element)
139
139
  if !conf_element.has_key?('count_key') && !conf_element.has_key?('count_key_format')
140
- raise RedisCounterException, '"count_key" or "count_key_format" is required.'
140
+ raise RedisMultiTypeCounterException, '"count_key" or "count_key_format" is required.'
141
141
  end
142
142
  if conf_element.has_key?('count_key') && conf_element.has_key?('count_key_format')
143
- raise RedisCounterException, 'both "count_key" and "count_key_format" are specified.'
143
+ raise RedisMultiTypeCounterException, 'both "count_key" and "count_key_format" are specified.'
144
144
  end
145
145
 
146
146
  if conf_element.has_key?('count_key')
147
147
  @count_key = conf_element['count_key']
148
148
  else
149
149
  if conf_element.has_key?('localtime') && conf_element.has_key?('utc')
150
- raise RedisCounterException, 'both "localtime" and "utc" are specified.'
150
+ raise RedisMultiTypeCounterException, 'both "localtime" and "utc" are specified.'
151
151
  end
152
152
  is_localtime = true
153
153
  if conf_element.has_key?('utc')
@@ -158,7 +158,7 @@ module Fluent
158
158
  end
159
159
 
160
160
  if conf_element.has_key?('count_hash_key_format') && conf_element.has_key?('count_zset_key_format')
161
- raise RedisCounterException, 'both "count_hash_key_format" "count_zset_key_format" are specified.'
161
+ raise RedisMultiTypeCounterException, 'both "count_hash_key_format" "count_zset_key_format" are specified.'
162
162
  end
163
163
 
164
164
  if conf_element.has_key?('count_hash_key_format')
@@ -183,7 +183,7 @@ module Fluent
183
183
  begin
184
184
  @count_value = Integer(conf_element['count_value'])
185
185
  rescue
186
- raise RedisCounterException, 'invalid "count_value", integer required.'
186
+ raise RedisMultiTypeCounterException, 'invalid "count_value", integer required.'
187
187
  end
188
188
  end
189
189
  end
@@ -1,9 +1,9 @@
1
1
  require 'fluent/test'
2
2
 
3
- class RedisCounterTest < Test::Unit::TestCase
3
+ class RedisMultiTypeCounterTest < Test::Unit::TestCase
4
4
  def setup
5
5
  Fluent::Test.setup
6
- require 'fluent/plugin/out_redis_counter'
6
+ require 'fluent/plugin/out_redis_multi_type_counter'
7
7
 
8
8
  @d = create_driver %[
9
9
  host localhost
@@ -24,7 +24,7 @@ class RedisCounterTest < Test::Unit::TestCase
24
24
  end
25
25
 
26
26
  def create_driver(conf = CONFIG)
27
- Fluent::Test::BufferedOutputTestDriver.new(Fluent::RedisCounterOutput).configure(conf)
27
+ Fluent::Test::BufferedOutputTestDriver.new(Fluent::RedisMultiTypeCounterOutput).configure(conf)
28
28
  end
29
29
 
30
30
  def test_configure
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-redis-multi-type-counter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jungtaek Lim
@@ -54,8 +54,8 @@ files:
54
54
  - VERSION
55
55
  - benchmark/performance_test.rb
56
56
  - fluent-plugin-redis-multi-type-counter.gemspec
57
- - lib/fluent/plugin/out_redis_counter.rb
58
- - test/plugin/out_redis_counter.rb
57
+ - lib/fluent/plugin/out_redis_multi_type_counter.rb
58
+ - test/plugin/out_redis_multi_type_counter.rb
59
59
  homepage: https://github.com/heartsavior/fluent-plugin-redis-multi-type-counter
60
60
  licenses:
61
61
  - APACHE2
@@ -81,4 +81,4 @@ signing_key:
81
81
  specification_version: 4
82
82
  summary: Redis multi type counter plugin for fluent
83
83
  test_files:
84
- - test/plugin/out_redis_counter.rb
84
+ - test/plugin/out_redis_multi_type_counter.rb