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

Version Path
spiderfw-0.6.37 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.35 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.34 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.33 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.32 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.31 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.30 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.29 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.28 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.27 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.26 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.26.pre1 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.25 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.24 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.23 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.22 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.21 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.20 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.19 lib/spiderfw/http/adapters/thin.rb
spiderfw-0.6.18 lib/spiderfw/http/adapters/thin.rb