Merged updates from trunk into stable branch
[feedcatcher.git] / vendor / rails / actionpack / lib / action_controller / vendor / rack-1.0 / rack / handler / thin.rb
1 require "thin"
2 require "rack/content_length"
3 require "rack/chunked"
4
5 module Rack
6 module Handler
7 class Thin
8 def self.run(app, options={})
9 app = Rack::Chunked.new(Rack::ContentLength.new(app))
10 server = ::Thin::Server.new(options[:Host] || '0.0.0.0',
11 options[:Port] || 8080,
12 app)
13 yield server if block_given?
14 server.start
15 end
16 end
17 end
18 end