Webrat::Selenium::ApplicationServers::Rack

Public Instance Methods

fail() click to toggle source
# File lib/webrat/selenium/application_servers/rack.rb, line 22
def fail
  $stderr.puts
  $stderr.puts
  $stderr.puts "==> Failed to boot the application server... exiting!"
  $stderr.puts
  $stderr.puts "Verify you can start a server on port #{Webrat.configuration.application_port} with the following command:"
  $stderr.puts
  $stderr.puts "    #{start_command}"
  exit
end
start() click to toggle source
# File lib/webrat/selenium/application_servers/rack.rb, line 8
def start
  @pid = fork do
    if File.exist?("log")
      redirect_io(STDOUT, File.join("log", "webrat.webrick.stdout.log"))
      redirect_io(STDERR, File.join("log", "webrat.webrick.stderr.log"))
    end
    exec start_command
  end
end
start_command() click to toggle source
# File lib/webrat/selenium/application_servers/rack.rb, line 33
def start_command
  "#{bundler} rackup -s webrick --port #{Webrat.configuration.application_port} --env #{Webrat.configuration.application_environment}".strip
end
stop() click to toggle source
# File lib/webrat/selenium/application_servers/rack.rb, line 18
def stop
  Process.kill("INT", @pid)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.