lib/calabash-cucumber/launch/simulator_helper.rb in calabash-cucumber-0.9.33 vs lib/calabash-cucumber/launch/simulator_helper.rb in calabash-cucumber-0.9.34
- old
+ new
@@ -111,11 +111,11 @@
end
def self.find_preferred_dir(sim_dirs)
pref = sim_dirs.find do |d|
- out = `otool #{d}/* -o | grep CalabashServer`
+ out = `otool "#{File.expand_path(d)}"/* -o 2> /dev/null | grep CalabashServer`
/CalabashServer/.match(out)
end
if pref.nil?
pref = sim_dirs.find {|d| /Calabash-iphonesimulator/.match(d)}
@@ -159,10 +159,10 @@
simulator.launch_ios_app(app_bundle_path, sdk, version)
simulator
end
def self.ping_app
- url = URI.parse (ENV['DEVICE_ENDPOINT']|| "http://localhost:37265/")
+ url = URI.parse(ENV['DEVICE_ENDPOINT']|| "http://localhost:37265/")
puts "Ping #{url}..."
http = Net::HTTP.new(url.host, url.port)
res = http.start do |sess|
sess.request Net::HTTP::Get.new url.path
end