tracks/vendor/gems/rack-1.1.0/lib/rack/handler/thin.rb
Reinier Balt e84e899bef fix #1097 by unpacking gems into vendor
except RedCloth which needs native extentions
2011-02-25 15:31:05 +01:00

18 lines
463 B
Ruby

require "thin"
require "rack/content_length"
require "rack/chunked"
module Rack
module Handler
class Thin
def self.run(app, options={})
app = Rack::Chunked.new(Rack::ContentLength.new(app))
server = ::Thin::Server.new(options[:Host] || '0.0.0.0',
options[:Port] || 8080,
app)
yield server if block_given?
server.start
end
end
end
end