Sha256: 60bd3e73eb7772e35120343157d4fe304738dbe3b6e4d607ef3ea881c2ef8557

Contents?: true

Size: 927 Bytes

Versions: 2

Compression:

Stored size: 927 Bytes

Contents

require "webrat/selenium/application_servers/base"

module Webrat
  module Selenium
    module ApplicationServers
      class Rack < Webrat::Selenium::ApplicationServers::Base

        def start
          @pid = fork do
            exec start_command
          end
        end

        def stop
          Process.kill("TERM", @pid)
        end

        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

        def start_command
          "rackup --port #{Webrat.configuration.application_port} --env #{Webrat.configuration.application_environment}"
        end

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
mutle-webrat-0.7.2.beta.1 lib/webrat/selenium/application_servers/rack.rb
webrat-0.7.2.beta.1 lib/webrat/selenium/application_servers/rack.rb