fluent-plugin-out-http-ext 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +0 -3
- data/fluent-plugin-out-http-ext.gemspec +1 -1
- data/lib/fluent/plugin/out_http_ext.rb +1 -0
- data/test/plugin/test_out_http_ext.rb +16 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26e4d5bcc932112e5fcc01009af8729d208e57a5
|
4
|
+
data.tar.gz: 28198ae958747c4c9ee0ed790b540c6e6637fc52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2bc98bcc613703a493a9fd5c48c5cf7167b2e659054d0a342e42264160a29d226e026dff05f32eeadd3c278a92ab9e2dd12ca9ab4cf30d9fc6f93043ba99fac
|
7
|
+
data.tar.gz: 1117fa75f436984f76aef29f4e8a8b59c7045cc4512e6d61fd9412e89bf7e655c59baf4a8143845f3424771218dfa20eb699453825e362f7d12065e5b8ac5e2a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "fluent-plugin-out-http-ext"
|
5
|
-
gem.version = "0.1.
|
5
|
+
gem.version = "0.1.9"
|
6
6
|
gem.authors = ["Toshiya Kawasaki"]
|
7
7
|
gem.email = ["kawasakitoshiya@gmail.com"]
|
8
8
|
gem.summary = %q{A generic Fluentd output plugin to send logs to an HTTP endpoint with SSL and Header option}
|
@@ -155,6 +155,7 @@ class Fluent::HTTPOutput < Fluent::Output
|
|
155
155
|
/test/<hash.data> =(use {hash:{data:2}})> /test/2
|
156
156
|
'''
|
157
157
|
result_url = @endpoint_url
|
158
|
+
return result_url unless record.is_a? Hash
|
158
159
|
record.each_deep do |key_dir, value|
|
159
160
|
result_url = result_url.gsub(/<#{key_dir.join(".")}>/, value.to_s)
|
160
161
|
end
|
@@ -271,7 +271,7 @@ class HTTPOutputTest < HTTPOutputTestBase
|
|
271
271
|
assert_equal 2, @puts.size
|
272
272
|
end
|
273
273
|
|
274
|
-
def
|
274
|
+
def test_emit_json_object
|
275
275
|
binary_string = "あ"
|
276
276
|
d = create_driver CONFIG_JSON
|
277
277
|
d.emit({ 'field1' => 50, 'field2' => 20, 'field3' => 10, 'otherfield' => 1, 'binary' => binary_string })
|
@@ -288,6 +288,21 @@ class HTTPOutputTest < HTTPOutputTestBase
|
|
288
288
|
assert_nil record[:auth]
|
289
289
|
end
|
290
290
|
|
291
|
+
def test_emit_json_array
|
292
|
+
binary_string = "あ"
|
293
|
+
d = create_driver CONFIG_JSON
|
294
|
+
d.emit([ 5, binary_string, 30 ])
|
295
|
+
d.run
|
296
|
+
|
297
|
+
assert_equal 1, @posts.size
|
298
|
+
record = @posts[0]
|
299
|
+
|
300
|
+
assert_equal 5, record[:json][0]
|
301
|
+
assert_equal binary_string, record[:json][1]
|
302
|
+
assert_equal 30, record[:json][2]
|
303
|
+
assert_nil record[:auth]
|
304
|
+
end
|
305
|
+
|
291
306
|
def test_http_error_is_raised
|
292
307
|
d = create_driver CONFIG_HTTP_ERROR
|
293
308
|
assert_raise Errno::ECONNREFUSED do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-out-http-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toshiya Kawasaki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yajl-ruby
|