lib/calabash-cucumber/launch/simulator_helper.rb in calabash-cucumber-0.9.141 vs lib/calabash-cucumber/launch/simulator_helper.rb in calabash-cucumber-0.9.144
- old
+ new
@@ -19,11 +19,11 @@
DEFAULT_SIM_RETRY = 2
# Load environment variable for showing full console output
# If not env var set then we use true; i.e. output to console in full
- FULL_CONSOLE_OUTPUT = ENV['CALABASH_FULL_CONSOLE_OUTPUT'] == 'false' ? false : true
+ FULL_CONSOLE_OUTPUT = ENV['CALABASH_FULL_CONSOLE_OUTPUT'] == '1' ? true : false
def self.relaunch(path, sdk = nil, version = 'iphone', args = nil)
app_bundle_path = app_bundle_or_raise(path)
ensure_connectivity(app_bundle_path, sdk, version, args)
@@ -87,11 +87,11 @@
msg << "To fix there are a couple of options:\n"
msg << "Option 1) Make sure you are running this command from your project directory, "
msg << "i.e., the directory containing your .xcodeproj file."
msg << "In Xcode, build your calabash target for simulator."
msg << "Check that your app can be found in\n #{File.expand_path("~/Library/Developer/Xcode/DerivedData")}"
- msg << "\n\nOption 2). In features/support/launch.rb set APP_BUNDLE_PATH to"
+ msg << "\n\nOption 2). In features/support/01_launch.rb set APP_BUNDLE_PATH to"
msg << "the path where Xcode has built your Calabash target."
msg << "Alternatively you can use the environment variable APP_BUNDLE_PATH.\n"
raise msg.join("\n")
elsif (build_dirs.count > 1)
@@ -99,11 +99,11 @@
msg << "You have several projects with the same name: #{xcode_proj_name} in #{DERIVED_DATA}:\n"
msg << build_dirs.join("\n")
msg << "\nThis means that Calabash can't automatically launch iOS simulator."
msg << "Searched in Xcode 4.x default: #{DEFAULT_DERIVED_DATA_INFO}"
- msg << "\nIn features/support/launch.rb set APP_BUNDLE_PATH to"
+ msg << "\nIn features/support/01_launch.rb set APP_BUNDLE_PATH to"
msg << "the path where Xcode has built your Calabash target."
msg << "Alternatively you can use the environment variable APP_BUNDLE_PATH.\n"
raise msg.join("\n")
else
puts "Found potential build dir: #{build_dirs.first}"
@@ -123,11 +123,11 @@
if path and not File.directory?(path)
puts "Unable to find .app bundle at #{path}. It should be an .app directory."
dd_dir = derived_data_dir_for_project
app_bundles = Dir.glob(File.join(dd_dir, "Build", "Products", "*", "*.app"))
- msg = "Try setting APP_BUNDLE_PATH in features/support/launch.rb to one of:\n\n"
+ msg = "Try setting APP_BUNDLE_PATH in features/support/01_launch.rb to one of:\n\n"
msg << app_bundles.join("\n")
raise msg
elsif path
bundle_path = path
else
@@ -138,31 +138,31 @@
msg << "Have you built your app for simulator?."
msg << "Searched dir: #{dd_dir}/Build/Products"
msg << "Please build your app from Xcode"
msg << "You should build the -cal target."
msg << ""
- msg << "Alternatively, specify APP_BUNDLE_PATH in features/support/launch.rb"
+ msg << "Alternatively, specify APP_BUNDLE_PATH in features/support/01_launch.rb"
msg << "This should point to the location of your built app linked with calabash.\n"
raise msg.join("\n")
end
preferred_dir = find_preferred_dir(sim_dirs)
if preferred_dir.nil?
msg = ["Error... Unable to find APP_BUNDLE_PATH."]
msg << "Cannot find a built app that is linked with calabash.framework"
msg << "Please build your app from Xcode"
msg << "You should build your calabash target."
msg << ""
- msg << "Alternatively, specify APP_BUNDLE_PATH in features/support/launch.rb"
+ msg << "Alternatively, specify APP_BUNDLE_PATH in features/support/01_launch.rb"
msg << "This should point to the location of your built app linked with calabash.\n"
raise msg.join("\n")
end
puts("-"*37)
puts "Auto detected APP_BUNDLE_PATH:\n\n"
puts "APP_BUNDLE_PATH=#{preferred_dir || sim_dirs[0]}\n\n"
puts "Please verify!"
- puts "If this is wrong please set it as APP_BUNDLE_PATH in features/support/launch.rb\n"
+ puts "If this is wrong please set it as APP_BUNDLE_PATH in features/support/01_launch.rb\n"
puts("-"*37)
bundle_path = sim_dirs[0]
end
bundle_path
end
@@ -244,11 +244,10 @@
end
def self.launch(app_bundle_path, sdk, version, args = nil)
simulator = SimLauncher::Simulator.new
- simulator.quit_simulator
- simulator.launch_ios_app(app_bundle_path, sdk, version) #, args wait for update to sim launcher
+ simulator.launch_ios_app(app_bundle_path, sdk, version)
simulator
end
def self.ping_app
url = URI.parse(ENV['DEVICE_ENDPOINT']|| "http://localhost:37265/")