Sha256: d5ce08eb6993c28f2c673bfe4711cb04dd02cda0e7c0820187c235104b6de859

Contents?: true

Size: 1.2 KB

Versions: 6

Compression:

Stored size: 1.2 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_ikachan'

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

def with_base_path(path)
  prev_mount,@mount = @mount,path
  yield
  @mount = prev_mount
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fluent-plugin-ikachan-1.0.0 test/helper.rb
fluent-plugin-ikachan-0.3.0 test/helper.rb
fluent-plugin-ikachan-0.2.6 test/helper.rb
fluent-plugin-ikachan-0.2.5 test/helper.rb
fluent-plugin-ikachan-0.2.4 test/helper.rb
fluent-plugin-ikachan-0.2.3 test/helper.rb