Sha256: df8915b61c827be5db6d2218c741edb21844efb1e1fa5f82409823bfa931c6f6
Contents?: true
Size: 1.53 KB
Versions: 18
Compression:
Stored size: 1.53 KB
Contents
module Rack # *Handlers* connect web servers with Rack. # # Rack includes Handlers for Mongrel, WEBrick, FastCGI, CGI, SCGI # and LiteSpeed. # # Handlers usually are activated by calling <tt>MyHandler.run(myapp)</tt>. # A second optional hash can be passed to include server-specific # configuration. module Handler def self.get(server) return unless server if klass = @handlers[server] obj = Object klass.split("::").each { |x| obj = obj.const_get(x) } obj else Rack::Handler.const_get(server.capitalize) end end def self.register(server, klass) @handlers ||= {} @handlers[server] = klass end autoload :CGI, "rack/handler/cgi" autoload :FastCGI, "rack/handler/fastcgi" autoload :Mongrel, "rack/handler/mongrel" autoload :EventedMongrel, "rack/handler/evented_mongrel" autoload :SwiftipliedMongrel, "rack/handler/swiftiplied_mongrel" autoload :WEBrick, "rack/handler/webrick" autoload :LSWS, "rack/handler/lsws" autoload :SCGI, "rack/handler/scgi" autoload :Thin, "rack/handler/thin" register 'cgi', 'Rack::Handler::CGI' register 'fastcgi', 'Rack::Handler::FastCGI' register 'mongrel', 'Rack::Handler::Mongrel' register 'emongrel', 'Rack::Handler::EventedMongrel' register 'smongrel', 'Rack::Handler::SwiftipliedMongrel' register 'webrick', 'Rack::Handler::WEBrick' register 'lsws', 'Rack::Handler::LSWS' register 'scgi', 'Rack::Handler::SCGI' register 'thin', 'Rack::Handler::Thin' end end
Version data entries
18 entries across 18 versions & 10 rubygems