fluent-plugin-unique-counter 0.1.2 → 0.1.3

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: ffc57f020649e2466e37815ecb47c95e3d3173d6
4
- data.tar.gz: 42b38592ec47a52660017ff37dbb153ab194cb86
3
+ metadata.gz: fc9b2ffc5cbb49bd469c7a15e2db1a8f2046d3a6
4
+ data.tar.gz: ce098bb2f6a3481cd7d7f2b06db4bee20cdb16fc
5
5
  SHA512:
6
- metadata.gz: 7d28fa21c965fc6a68cae98dba359f1c1b0a8243ca95eccf74b627ace0cd4c70ed24500c70fd75c5c7dbe319c04c5fc43da2344fcb763fae78a00846de0a2284
7
- data.tar.gz: 98ef442d428a814560d8b9828d9ca5565956d9b1a0a4a0685671d4123082e6498bd9d5df5cfaa5aae785e6e07f915418545d83b0fd3e556216943b171b21d757
6
+ metadata.gz: fc19e4fa6ff43a6b7115c8f5858cc73552f739fd69c40a5267221050de1ea1d0c62410657ee3116459f665b0a94f409b7b470f62f6661230211bf4cc5bcae04f
7
+ data.tar.gz: 86853e327f8cbbb57dc8459adcd6c1bbcaef3cb22434ffac50b47f3f90d48068ff6bd2e528cdf3382ba944ebe9b2776ff56d9ed551416a1ce1852480402d7ee9
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
- # Fluent unique counter plugin [![Build Status](https://travis-ci.org/aiming/fluent-plugin-unique-counter.png?branch=master)](https://travis-ci.org/aiming/fluent-plugin-unique-counter)
1
+ # Fluent unique counter plugin
2
+
3
+ [![Build Status](https://travis-ci.org/aiming/fluent-plugin-unique-counter.png?branch=master)](https://travis-ci.org/aiming/fluent-plugin-unique-counter)
4
+ [![Gem Version](https://badge.fury.io/rb/fluent-plugin-unique-counter.png)](http://badge.fury.io/rb/fluent-plugin-unique-counter)
2
5
 
3
6
  This plugin purpose is simple monitoring (countup only).
4
7
  This was referred from [fluent-plugin-numeric-counter](https://github.com/tagomoris/fluent-plugin-numeric-counter). Thanks! :)
@@ -63,7 +66,7 @@ echo '{"user_id": 1003}' | fluent-cat test.api.uga
63
66
  2013-10-21T22:07:08+09:00 count.up {"unique_count":3}
64
67
  ```
65
68
 
66
- ## confing params
69
+ ## config params
67
70
 
68
71
  - count_interval
69
72
 
@@ -85,9 +88,9 @@ echo '{"user_id": 1003}' | fluent-cat test.api.uga
85
88
 
86
89
  Apache License v2.0.
87
90
 
88
- ## Copylight
91
+ ## Copyright
89
92
 
90
- Copylight (c) 2013 Aiming Inc.
93
+ Copyright (c) 2013 Aiming Inc.
91
94
 
92
95
 
93
96
  [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/aiming/fluent-plugin-unique-counter/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
@@ -4,8 +4,8 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-unique-counter"
7
- spec.version = "0.1.2"
8
- spec.authors = ["Keiji Matsuzaki"]
7
+ spec.version = "0.1.3"
8
+ spec.authors = ["Keiji Matsuzaki", "Takesato"]
9
9
  spec.email = ["futoase@gmail.com"]
10
10
  spec.summary = %q{fluentd unique counter plugin.}
11
11
  spec.description = %q{This plugin is use of count up to unique attribute.}
@@ -1,6 +1,6 @@
1
1
  # coding: utf-8
2
2
  #
3
- class Fluent::UniqCounterOutput < Fluent::Output
3
+ class Fluent::UniqueCounterOutput < Fluent::Output
4
4
  Fluent::Plugin.register_output('unique_counter', self)
5
5
 
6
6
  config_param :count_interval, :time, :default => 60
@@ -10,6 +10,12 @@ class OutUniqueCounterTest < Test::Unit::TestCase
10
10
  Timecop.return
11
11
  end
12
12
 
13
+ CONFIG_ERROR = %[
14
+ tag api.production.login
15
+ unique_key user_id
16
+ unit years
17
+ ]
18
+
13
19
  CONFIG_INTERVAL_10 = %[
14
20
  tag api.production.login
15
21
  unique_key user_id
@@ -41,7 +47,13 @@ class OutUniqueCounterTest < Test::Unit::TestCase
41
47
  ]
42
48
 
43
49
  def create_driver(conf = CONFIG, tag = 'test')
44
- Fluent::Test::OutputTestDriver.new(Fluent::UniqCounterOutput, tag).configure(conf)
50
+ Fluent::Test::OutputTestDriver.new(Fluent::UniqueCounterOutput, tag).configure(conf)
51
+ end
52
+
53
+ def test_config_error
54
+ assert_raise Fluent::ConfigError do
55
+ d1 = create_driver(CONFIG_ERROR, 'uniq.countup')
56
+ end
45
57
  end
46
58
 
47
59
  def test_unique_count_interval_10
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-unique-counter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keiji Matsuzaki
8
+ - Takesato
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-10-25 00:00:00.000000000 Z
12
+ date: 2013-12-16 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler