Sha256: a3db9bfcf65dd3f7e4ac64ab150956f9d119f86283a7b4295d774a4407115c7a
Contents?: true
Size: 1.12 KB
Versions: 16
Compression:
Stored size: 1.12 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 require 'fluent/plugin/out_growthforecast' 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
16 entries across 16 versions & 1 rubygems