# File lib/capybara/server.rb, line 57 def boot return self unless @app find_available_port Capybara.log "application has already booted" and return self if responsive? Capybara.log "booting Rack applicartion on port #{port}" Thread.new do handler.run(Identify.new(@app), :Port => port, :AccessLog => []) end Capybara.log "checking if application has booted" Capybara::WaitUntil.timeout(10) do if responsive? Capybara.log("application has booted") true else sleep 0.5 false end end self rescue Timeout::Error Capybara.log "Rack application timed out during boot" exit end
# File lib/capybara/server.rb, line 42 def handler begin require 'rack/handler/thin' Rack::Handler::Thin rescue LoadError begin require 'rack/handler/mongrel' Rack::Handler::Mongrel rescue LoadError require 'rack/handler/webrick' Rack::Handler::WEBrick end end end
Generated with the Darkfish Rdoc Generator 2.