calabash/calabash-ios — pull request #220 by navaneeth (2013-10-01 11:38:04+00:00)
Title: Added DETECT_CONNECTED_DEVICE environment variable to launcher

Some Ruby implementation like JRuby has trouble executing a process in the `Timeout::timeout()`. JRuby won't throw the exception and hangs until the process returns.

In Calabash launcher, it detects the connected devices by executing the external process: `udidetect`. udidetect hangs when there are no devices connected. Calabsh launcher executes udidetect in a Timeout and when it
times out, calabash kills the `udidetect` process.

In Jruby, because of a JRuby bug, this causes the process to wait until the launched process exits. TimeoutError is never fired.

This commit introduces an environment variable `DETECT_CONNECTED_DEVICE` which can be used to turn on/off device detection. By default device detection is on.