From cdc99637aa72a14ba7478216b9186197e3c07f2f Mon Sep 17 00:00:00 2001 From: Carson Anderson Date: Wed, 2 Mar 2016 15:36:11 -0700 Subject: [PATCH 1/2] only attempt to use http proxy if it's in the env --- lib/fluent/plugin/out_sumologic.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/fluent/plugin/out_sumologic.rb b/lib/fluent/plugin/out_sumologic.rb index 7c2858a..16a70e5 100644 --- a/lib/fluent/plugin/out_sumologic.rb +++ b/lib/fluent/plugin/out_sumologic.rb @@ -63,8 +63,13 @@ def write(chunk) end end - (proxy,proxy_port) = ENV['http_proxy'].split(':') - http = Net::HTTP::Proxy(proxy,proxy_port).new(@host, @port.to_i) + if ENV.has_key?("http_proxy") + (proxy,proxy_port) = ENV['http_proxy'].split(':') + http = Net::HTTP::Proxy(proxy,proxy_port).new(@host, @port.to_i) + else + http = Net::HTTP.new(@host, @port.to_i) + end + http.use_ssl = true http.verify_mode = @verify_ssl ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE http.set_debug_output $stderr From 15c66a97795773eecf8182d7a95fc14b3381463f Mon Sep 17 00:00:00 2001 From: Carson Anderson Date: Wed, 2 Mar 2016 16:25:29 -0700 Subject: [PATCH 2/2] push our own version of the gem since it's needed right now --- fluent-plugin-sumologic.gemspec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fluent-plugin-sumologic.gemspec b/fluent-plugin-sumologic.gemspec index 460557f..e25863e 100644 --- a/fluent-plugin-sumologic.gemspec +++ b/fluent-plugin-sumologic.gemspec @@ -3,16 +3,16 @@ lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |spec| - spec.name = "fluent-plugin-sumologic" - spec.version = "0.0.2" - spec.authors = ["memorycraft"] - spec.email = ["memorycraft@gmail.com"] + spec.name = "fluent-plugin-sumologic-carsonoid" + spec.version = "0.0.3" + spec.authors = ["memorycraft", "carsonoid"] + spec.email = ["memorycraft@gmail.com", "ca@carson-anderson.com"] spec.description = %q{fluent plugin for sumologic} spec.summary = %q{sumologic is log management system. this plugin is fluent output plugin send to sumologic} - spec.homepage = "https://github.com/memorycraft/fluent-plugin-sumologic" + spec.homepage = "https://github.com/carsonoid/fluent-plugin-sumologic" spec.license = "MIT" - spec.rubyforge_project = "fluent-plugin-sumologic" + spec.rubyforge_project = "fluent-plugin-sumologic-carsonoid" spec.files = `git ls-files`.split($/) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }