Sha256: 51c1d3c2e3bf495f61dec364088a46791d15df6b1d1d51ff822dbce1d98adf7d
Contents?: true
Size: 838 Bytes
Versions: 57
Compression:
Stored size: 838 Bytes
Contents
require 'thin' require 'spiderfw/http/adapters/rack' module Spider; module HTTP class Thin < Server @supports = { :chunked_request => false } def options(opts) opts = super(opts) defaults = { :host => 'localhost', :app => 'spider' } return defaults.merge(opts) end def start_server(opts={}) opts = options(opts) options = { :Port => opts[:port], :BindAddress => opts[:host] } @server = ::Thin::Server.start(opts[:host], opts[:port].to_i, Spider::HTTP::RackApplication.new) end def shutdown_server @server.stop end end end; end
Version data entries
57 entries across 57 versions & 1 rubygems