fluent-plugin-http_shadow 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-http_shadow.gemspec +1 -1
- data/lib/fluent/plugin/out_http_shadow.rb +4 -9
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c19b229a7b1bd67fea1c6279fa209c8434be9acc
|
4
|
+
data.tar.gz: 8b4793f5a1749fa6847b1d6a4b2cb01f1c32ead2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a24e4dbcad9d413b20b9f7e5fa0d6acd0bf36f2020e448a48a3e7201b6886b9cbd525958fbfb6ea789dcba315032c3d3784abd1b038fa28e9d81f195930b650
|
7
|
+
data.tar.gz: f601a9bcb878b7831140bae2755d183a29665f9d6f22e569972b3136a36df3f9aecda4a6951348aac695e81890f909688f3404886efcd14f79cd57b0395a0b10
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "fluent-plugin-http_shadow"
|
5
|
-
gem.version = "0.0.
|
5
|
+
gem.version = "0.0.4"
|
6
6
|
gem.summary = %q{copy http request. use shadow proxy server.}
|
7
7
|
gem.description = %q{copy http request. use shadow proxy server.}
|
8
8
|
gem.license = "MIT"
|
@@ -4,7 +4,6 @@ module Fluent
|
|
4
4
|
|
5
5
|
def initialize
|
6
6
|
super
|
7
|
-
require 'uri'
|
8
7
|
require 'erb'
|
9
8
|
require 'typhoeus'
|
10
9
|
require "addressable/uri"
|
@@ -26,6 +25,10 @@ module Fluent
|
|
26
25
|
|
27
26
|
def configure(conf)
|
28
27
|
super
|
28
|
+
if @host.nil? && @host_hash.nil?
|
29
|
+
raise ConfigError, "out_http_shadow: required to @host or @host_hash."
|
30
|
+
end
|
31
|
+
|
29
32
|
@regexp = /\$\{([^}]+)\}/
|
30
33
|
@path_format = ERB.new(@path_format.gsub(@regexp, "<%=record['" + '\1' + "'] %>"))
|
31
34
|
|
@@ -97,14 +100,6 @@ module Fluent
|
|
97
100
|
formatter
|
98
101
|
end
|
99
102
|
|
100
|
-
def get_params(query, record_params)
|
101
|
-
params = query.nil? ? {} : Hash[URI::decode_www_form(query)]
|
102
|
-
if record_params
|
103
|
-
params = params.merge(record_params)
|
104
|
-
end
|
105
|
-
params
|
106
|
-
end
|
107
|
-
|
108
103
|
def get_header(record)
|
109
104
|
header = {}
|
110
105
|
@headers.each do |k, v|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-http_shadow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi Toyama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -174,10 +174,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
176
|
rubyforge_project:
|
177
|
-
rubygems_version: 2.4.
|
177
|
+
rubygems_version: 2.4.2
|
178
178
|
signing_key:
|
179
179
|
specification_version: 4
|
180
180
|
summary: copy http request. use shadow proxy server.
|
181
181
|
test_files:
|
182
182
|
- test/helper.rb
|
183
183
|
- test/plugin/test_out_http_shadow.rb
|
184
|
+
has_rdoc:
|