tracks/vendor/gems/rack-1.0.1/lib/rack/handler/thin.rb
Eric Allen 156862200b Vendoring Rack
Joyent hasn't upgraded their gem yet, and for many users this could be a
major installation pitfall. Rails is vendored, so why can't it boot?
Rack? What's that?
2009-12-14 11:40:57 -05: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