…rt| ...} For example, to use mongrel rather than thin or webrick: Capybara.server do |app, port| require 'rack/handler/mongrel' Rack::Handler::Mongrel.run(app, :Port => port) end
Apparently this prevents some issues and has no downsides.
Mongrel is an outdated server, it doesn't work on Ruby 1.9, for speed, thin is perfectly well suited for compatibility webrick is much better. Also: no more annoying logging information from thin/webrick
Reverts the revert. I've added some code to make the Server reuse already booted applications. This reverts commit 9fe037d. Conflicts: lib/capybara/server.rb
This reverts commit a8a4efc.
This protects against the race conditions which inevitably occur when booting multiple capybara servers (such as running specjour). TCPServer.new() will set recently opened sockets to SOCK_WAIT status to ensure that a certain amount of time elapses before they are reused.
This also introduces Capybara.run_server, which controls whether Capybara will spool up a server or not.