Sha256: 4a44557b6cc65c2ecb3e390eedb705c718253f03189738cc3904ad9e795bea98
Contents?: true
Size: 1.26 KB
Versions: 56
Compression:
Stored size: 1.26 KB
Contents
require "webrat/selenium/application_servers/base" module Webrat module Selenium module ApplicationServers class Merb < Webrat::Selenium::ApplicationServers::Base def start system start_command 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 Merb application server... exiting!" $stderr.puts $stderr.puts "Verify you can start a Merb server on port #{Webrat.configuration.application_port} with the following command:" $stderr.puts $stderr.puts " #{start_command}" exit end def pid_file "log/merb.#{Webrat.configuration.application_port}.pid" end def start_command "#{merb_command} -d -p #{Webrat.configuration.application_port} -e #{Webrat.configuration.application_environment}" end def merb_command if File.exist?('bin/merb') merb_cmd = 'bin/merb' else merb_cmd = 'merb' end end end end end end
Version data entries
56 entries across 56 versions & 22 rubygems