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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef02eece34dcaef1ec42972fee354179d5dcca77
4
- data.tar.gz: efe74b98276c2bec27d146a1b9538e9af43655a4
3
+ metadata.gz: 26e4d5bcc932112e5fcc01009af8729d208e57a5
4
+ data.tar.gz: 28198ae958747c4c9ee0ed790b540c6e6637fc52
5
5
  SHA512:
6
- metadata.gz: fc0ddf81a5dda2873c73d1db05bacb1545238351ec0c5eb22665c5f140c31bde74b3e06e47a07b1b9d988e7e26216a30293a44a293ebaf421f1285532e285096
7
- data.tar.gz: 2dee7b6aafada7ebb2cc8d85c800c4cafdbf71e360c5cfe6d42ce4a724cbc4651e0f4a667fb8fda2f58f056ac68ce4dac9398aad49046cb1c34b4f7b9cd17a3b
6
+ metadata.gz: e2bc98bcc613703a493a9fd5c48c5cf7167b2e659054d0a342e42264160a29d226e026dff05f32eeadd3c278a92ab9e2dd12ca9ab4cf30d9fc6f93043ba99fac
7
+ data.tar.gz: 1117fa75f436984f76aef29f4e8a8b59c7045cc4512e6d61fd9412e89bf7e655c59baf4a8143845f3424771218dfa20eb699453825e362f7d12065e5b8ac5e2a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.9
4
+ * accept array request body
5
+
3
6
  ## 0.1.8
4
7
  * Add verify ssl option
5
8
  * Restrict ruby version to more than 2.1.0
data/README.md CHANGED
@@ -49,9 +49,6 @@ If you'd like to retry failed requests, consider using [fluent-plugin-bufferize]
49
49
 
50
50
  # upload to rubygems
51
51
  $ bundle exec rake release
52
-
53
- # push updates
54
- $ git push --follow-tags
55
52
  ```
56
53
 
57
54
  ----
@@ -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.8"
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 test_emit_json
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.8
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-10-10 00:00:00.000000000 Z
11
+ date: 2016-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yajl-ruby