fluent-plugin-hipchat 0.1.1 → 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 +7 -0
- data/Gemfile +1 -1
- data/README.rdoc +8 -3
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_hipchat.rb +11 -0
- data/test/plugin/out_hipchat.rb +15 -0
- metadata +19 -39
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4bd106249ecd58d1ec8dc594d23578c96c3ccce8
|
4
|
+
data.tar.gz: a7c4e245450152feae2ee4ec671e783f2a793e6e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 848d662f54e466e5ae0bfcd7d9d7c1adca6345bcc477c9dc06a469cec09b1ddbce7aec3bb3a8d57ec84c1e229def11f9338b73ef4cb0bca075d01cb0e0e409ab
|
7
|
+
data.tar.gz: 78f25618a65ba3cd31e3ab7b0e3158be74c7cb8a4e248a9778ce77ef5acd4ca3b46a40d842de8a829fcfc97a2f663dff93f26378dcb964837ee65fa2ee284ffd
|
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
@@ -14,16 +14,21 @@
|
|
14
14
|
default_color yellow
|
15
15
|
default_notify 0
|
16
16
|
default_format html
|
17
|
+
|
18
|
+
# proxy settings
|
19
|
+
# http_proxy_host localhost
|
20
|
+
# http_proxy_port 8080
|
21
|
+
# http_proxy_user username
|
22
|
+
# http_proxy_pass password
|
17
23
|
</match>
|
18
24
|
|
19
|
-
|
20
25
|
fluent_logger.post('hipchat', {
|
21
26
|
:from => 'alice',
|
22
27
|
:message => 'Hello<br>World!',
|
23
28
|
:color => 'red',
|
24
29
|
:room => 'my_room',
|
25
|
-
:notify
|
26
|
-
:format
|
30
|
+
:notify => 1,
|
31
|
+
:format => 'text',
|
27
32
|
})
|
28
33
|
|
29
34
|
= Copyright
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
@@ -11,6 +11,10 @@ module Fluent
|
|
11
11
|
config_param :default_from, :string, :default => nil
|
12
12
|
config_param :default_notify, :bool, :default => nil
|
13
13
|
config_param :default_format, :string, :default => nil
|
14
|
+
config_param :http_proxy_host, :string, :default => nil
|
15
|
+
config_param :http_proxy_port, :integer, :default => nil
|
16
|
+
config_param :http_proxy_user, :string, :default => nil
|
17
|
+
config_param :http_proxy_pass, :string, :default => nil
|
14
18
|
|
15
19
|
attr_reader :hipchat
|
16
20
|
|
@@ -28,6 +32,13 @@ module Fluent
|
|
28
32
|
@default_notify = conf['default_notify'] || 0
|
29
33
|
@default_color = conf['default_color'] || 'yellow'
|
30
34
|
@default_format = conf['default_format'] || 'html'
|
35
|
+
if conf['http_proxy_host']
|
36
|
+
HipChat::API.http_proxy(
|
37
|
+
conf['http_proxy_host'],
|
38
|
+
conf['http_proxy_port'],
|
39
|
+
conf['http_proxy_user'],
|
40
|
+
conf['http_proxy_pass'])
|
41
|
+
end
|
31
42
|
end
|
32
43
|
|
33
44
|
def emit(tag, es, chain)
|
data/test/plugin/out_hipchat.rb
CHANGED
@@ -29,6 +29,13 @@ class HipchatOutputTest < Test::Unit::TestCase
|
|
29
29
|
default_color yellow
|
30
30
|
]
|
31
31
|
|
32
|
+
CONFIG_FOR_PROXY = %[
|
33
|
+
http_proxy_host localhost
|
34
|
+
http_proxy_port 8080
|
35
|
+
http_proxy_user user
|
36
|
+
http_proxy_pass password
|
37
|
+
]
|
38
|
+
|
32
39
|
def create_driver(conf = CONFIG)
|
33
40
|
OutputTestDriver.new(Fluent::HipchatOutput) {
|
34
41
|
}.configure(conf)
|
@@ -76,4 +83,12 @@ class HipchatOutputTest < Test::Unit::TestCase
|
|
76
83
|
d.emit({'message' => 'foo', 'color' => 'invalid'})
|
77
84
|
d.run
|
78
85
|
end
|
86
|
+
|
87
|
+
def test_http_proxy
|
88
|
+
create_driver(CONFIG + CONFIG_FOR_PROXY)
|
89
|
+
assert_equal 'localhost', HipChat::API.default_options[:http_proxyaddr]
|
90
|
+
assert_equal '8080', HipChat::API.default_options[:http_proxyport]
|
91
|
+
assert_equal 'user', HipChat::API.default_options[:http_proxyuser]
|
92
|
+
assert_equal 'password', HipChat::API.default_options[:http_proxypass]
|
93
|
+
end
|
79
94
|
end
|
metadata
CHANGED
@@ -1,110 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-hipchat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Yuichi Tateno
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-09-10 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: fluentd
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.10.8
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 0.10.8
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: hipchat-api
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 1.0.0
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 1.0.0
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 0.9.2
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 0.9.2
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: simplecov
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: 0.5.4
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: 0.5.4
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rr
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: 1.0.0
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: 1.0.0
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: pry
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - '>='
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - '>='
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
description: fluent HipChat plugin
|
@@ -126,33 +113,26 @@ files:
|
|
126
113
|
- test/test_helper.rb
|
127
114
|
homepage: https://github.com/hotchpotch/fluent-plugin-hipchat
|
128
115
|
licenses: []
|
116
|
+
metadata: {}
|
129
117
|
post_install_message:
|
130
118
|
rdoc_options: []
|
131
119
|
require_paths:
|
132
120
|
- lib
|
133
121
|
required_ruby_version: !ruby/object:Gem::Requirement
|
134
|
-
none: false
|
135
122
|
requirements:
|
136
|
-
- -
|
123
|
+
- - '>='
|
137
124
|
- !ruby/object:Gem::Version
|
138
125
|
version: '0'
|
139
|
-
segments:
|
140
|
-
- 0
|
141
|
-
hash: 2040291530210343481
|
142
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
-
none: false
|
144
127
|
requirements:
|
145
|
-
- -
|
128
|
+
- - '>='
|
146
129
|
- !ruby/object:Gem::Version
|
147
130
|
version: '0'
|
148
|
-
segments:
|
149
|
-
- 0
|
150
|
-
hash: 2040291530210343481
|
151
131
|
requirements: []
|
152
132
|
rubyforge_project:
|
153
|
-
rubygems_version:
|
133
|
+
rubygems_version: 2.0.0
|
154
134
|
signing_key:
|
155
|
-
specification_version:
|
135
|
+
specification_version: 4
|
156
136
|
summary: fluent HipChat plugin
|
157
137
|
test_files:
|
158
138
|
- test/plugin/out_hipchat.rb
|