mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Darrin Holst to contributors
This commit is contained in:
parent
5325d6a9c4
commit
20e32d9d4a
2 changed files with 11 additions and 8 deletions
|
@ -377,6 +377,7 @@ The following people have dedicated their time and effort to Capybara:
|
||||||
* Pavel Gabriel
|
* Pavel Gabriel
|
||||||
* Bodaniel Jeanes
|
* Bodaniel Jeanes
|
||||||
* Carl Porth
|
* Carl Porth
|
||||||
|
* Darrin Holst
|
||||||
|
|
||||||
== License:
|
== License:
|
||||||
|
|
||||||
|
|
|
@ -59,16 +59,18 @@ class Capybara::Server
|
||||||
Capybara.log "application has already booted" and return self if responsive?
|
Capybara.log "application has already booted" and return self if responsive?
|
||||||
Capybara.log "booting Rack applicartion on port #{port}"
|
Capybara.log "booting Rack applicartion on port #{port}"
|
||||||
|
|
||||||
Timeout.timeout(10) do
|
|
||||||
Thread.new do
|
Thread.new do
|
||||||
handler.run(Identify.new(@app), :Port => port, :AccessLog => [])
|
handler.run(Identify.new(@app), :Port => port, :AccessLog => [])
|
||||||
end
|
end
|
||||||
Capybara.log "checking if application has booted"
|
Capybara.log "checking if application has booted"
|
||||||
|
|
||||||
loop do
|
Capybara::WaitUntil.timeout(10) do
|
||||||
Capybara.log("application has booted") and break if responsive?
|
if responsive?
|
||||||
Capybara.log("waiting for application to boot...")
|
Capybara.log("application has booted")
|
||||||
|
true
|
||||||
|
else
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self
|
self
|
||||||
|
|
Loading…
Reference in a new issue