fluent-plugin-hipchat 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.rdoc +2 -0
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_hipchat.rb +9 -4
- data/test/plugin/out_hipchat.rb +1 -15
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05583b44258b849316908fb2876939ac01ec29b3
|
4
|
+
data.tar.gz: 77b650a614878b2abdfdf3bb27ccc37876c935eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bee6c20e5389de9d77134d07f402d0f57a58eb7930369b820155b30b766f5b09fcd01cb77588894c0b6dfcff9def758489a13c44a63dbe8df77924415f113e66
|
7
|
+
data.tar.gz: e26c011ea2707f9c401e4f99ef1f775fcf9e07854e4363bf8c1275f415933cdbb121a444b381a4642f7bd88a07b43b23a8e38562f9a8cea404d559dcd439112d
|
data/.travis.yml
CHANGED
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
module Fluent
|
3
|
-
class HipchatOutput <
|
3
|
+
class HipchatOutput < BufferedOutput
|
4
4
|
COLORS = %w(yellow red green purple gray random)
|
5
5
|
FORMAT = %w(html text)
|
6
6
|
Fluent::Plugin.register_output('hipchat', self)
|
@@ -15,6 +15,7 @@ module Fluent
|
|
15
15
|
config_param :http_proxy_port, :integer, :default => nil
|
16
16
|
config_param :http_proxy_user, :string, :default => nil
|
17
17
|
config_param :http_proxy_pass, :string, :default => nil
|
18
|
+
config_param :flush_interval, :time, :default => 1
|
18
19
|
|
19
20
|
attr_reader :hipchat
|
20
21
|
|
@@ -41,15 +42,19 @@ module Fluent
|
|
41
42
|
end
|
42
43
|
end
|
43
44
|
|
44
|
-
def
|
45
|
-
|
45
|
+
def format(tag, time, record)
|
46
|
+
[tag, time, record].to_msgpack
|
47
|
+
end
|
48
|
+
|
49
|
+
def write(chunk)
|
50
|
+
chunk.msgpack_each do |(tag,time,record)|
|
46
51
|
begin
|
47
52
|
send_message(record) if record['message']
|
48
53
|
set_topic(record) if record['topic']
|
49
54
|
rescue => e
|
50
55
|
$log.error("HipChat Error: #{e} / #{e.message}")
|
51
56
|
end
|
52
|
-
|
57
|
+
end
|
53
58
|
end
|
54
59
|
|
55
60
|
def send_message(record)
|
data/test/plugin/out_hipchat.rb
CHANGED
@@ -2,20 +2,6 @@ require 'test_helper'
|
|
2
2
|
require 'fluent/plugin/out_hipchat'
|
3
3
|
|
4
4
|
class HipchatOutputTest < Test::Unit::TestCase
|
5
|
-
class OutputTestDriver < Fluent::Test::InputTestDriver
|
6
|
-
def initialize(klass, tag='test', &block)
|
7
|
-
super(klass, &block)
|
8
|
-
@tag = tag
|
9
|
-
end
|
10
|
-
|
11
|
-
attr_accessor :tag
|
12
|
-
|
13
|
-
def emit(record, time=Time.now)
|
14
|
-
es = Fluent::OneEventStream.new(time.to_i, record)
|
15
|
-
@instance.emit(@tag, es, nil)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
5
|
def setup
|
20
6
|
super
|
21
7
|
Fluent::Test.setup
|
@@ -37,7 +23,7 @@ class HipchatOutputTest < Test::Unit::TestCase
|
|
37
23
|
]
|
38
24
|
|
39
25
|
def create_driver(conf = CONFIG)
|
40
|
-
|
26
|
+
Fluent::Test::BufferedOutputTestDriver.new(Fluent::HipchatOutput) {
|
41
27
|
}.configure(conf)
|
42
28
|
end
|
43
29
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-hipchat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuichi Tateno
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.0.
|
133
|
+
rubygems_version: 2.0.3
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: fluent HipChat plugin
|