Sha256: 6510ede199ec9005b5441fdfe81ca31075ffcf741f72d9a8d0e96f8cd5e7bba1
Contents?: true
Size: 857 Bytes
Versions: 1
Compression:
Stored size: 857 Bytes
Contents
module Webrat module Selenium module ApplicationServers class Sinatra < Webrat::Selenium::ApplicationServers::Base 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 def stop silence_stream(STDOUT) do pid = File.read(pid_file) system("kill -9 #{pid}") FileUtils.rm_f pid_file end end def fail $stderr.puts $stderr.puts $stderr.puts "==> Failed to boot the Sinatra application server... exiting!" exit end def pid_file prepare_pid_file(Dir.pwd, 'rack.pid') end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
aslakhellesoy-webrat-0.4.4.1 | lib/webrat/selenium/application_servers/sinatra.rb |