Sha256: d06d858932400fba1111c0068df15e8ee8d017a57b9f27ae242d640473c7ec4f

Contents?: true

Size: 1.08 KB

Versions: 14

Compression:

Stored size: 1.08 KB

Contents

require 'rubygems'
require 'bundler'

begin
  Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
  $stderr.puts e.message
  $stderr.puts "Run `bundle install` to install missing gems"
  exit e.status_code
end

require 'test/unit'

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'fluent/test'

unless ENV.has_key?('VERBOSE')
  nulllogger = Object.new
  nulllogger.instance_eval {|obj|
    def method_missing(method, *args)
      # pass
    end
  }
  $log = nulllogger
end

class Test::Unit::TestCase
end

require 'webrick'

# to handle POST/PUT/DELETE ...
module WEBrick::HTTPServlet
  class ProcHandler < AbstractServlet
    alias do_POST   do_GET
    alias do_PUT    do_GET
    alias do_DELETE do_GET
  end
end

def get_code(server, port, path, headers={})
  require 'net/http' 
  Net::HTTP.start(server, port){|http|
    http.get(path, headers).code
  } 
end 
def get_content(server, port, path, headers={})
  require 'net/http'
  Net::HTTP.start(server, port){|http|
    http.get(path, headers).body
  } 
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
fluent-plugin-out-http-ext-0.1.10 lib/fluent/test/http_output_test.rb
fluent-plugin-out-http-ext-0.1.9 lib/fluent/test/http_output_test.rb
fluent-plugin-out-http-ext-0.1.8 lib/fluent/test/http_output_test.rb
fluent-plugin-out-http-ext-ignore-ssl-errors-0.0.1 lib/fluent/test/http_output_test.rb
fluent-plugin-out-falcon-0.1.5 lib/fluent/test/falcon_output_test.rb
fluent-plugin-out-http-ext-0.1.7 lib/fluent/test/http_output_test.rb
fluent-plugin-out-http-ext-0.1.6 lib/fluent/test/http_output_test.rb
fluent-plugin-out-http-ext-0.1.5.4 lib/fluent/test/http_output_test.rb
fluent-plugin-out-http-ext-0.1.5.3 lib/fluent/test/http_output_test.rb
fluent-plugin-out-http-0.1.4 lib/fluent/test/http_output_test.rb
fluent-plugin-out-http-0.1.3 lib/fluent/test/http_output_test.rb
fluent-plugin-out-http-0.1.2 lib/fluent/test/http_output_test.rb
fluent-plugin-out-http-0.1.1 lib/fluent/test/http_output_test.rb
fluent-plugin-out-http-0.1.0 lib/fluent/test/http_output_test.rb