Webrat::Selenium::ApplicationServers::Sinatra

Public Instance Methods

fail() click to toggle source
# File lib/webrat/selenium/application_servers/sinatra.rb, line 23
def fail
  $stderr.puts
  $stderr.puts
  $stderr.puts "==> Failed to boot the Sinatra application server... exiting!"
  exit
end
pid_file() click to toggle source
# File lib/webrat/selenium/application_servers/sinatra.rb, line 30
def pid_file
  prepare_pid_file(Dir.pwd, 'rack.pid')
end
start() click to toggle source
# File lib/webrat/selenium/application_servers/sinatra.rb, line 8
def start
  fork do
    File.open('rack.pid', 'w') { |fp| fp.write Process.pid }
    exec 'rackup', File.expand_path(Dir.pwd + '/config.ru'), '-p', Webrat.configuration.application_port.to_s
  end
end
stop() click to toggle source
# File lib/webrat/selenium/application_servers/sinatra.rb, line 15
def stop
  silence_stream(STDOUT) do
    pid = File.read(pid_file)
    system("kill -9 #{pid}")
    FileUtils.rm_f pid_file
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.