bin/calabash-ios-setup.rb in calabash-cucumber-0.9.20 vs bin/calabash-ios-setup.rb in calabash-cucumber-0.9.21
- old
+ new
@@ -1,7 +1,8 @@
require "calabash-cucumber/version"
+
def dup_scheme(project_name, pbx_dir)
userdata_dirs = Dir.foreach("#{pbx_dir}/xcuserdata").find_all { |x|
/\.xcuserdatad$/.match(x)
}
@@ -152,11 +153,11 @@
end
file = 'calabash.framework'
##Download calabash.framework
if not Dir.exists?(File.join(project_path, file))
msg("Info") do
- zip_file = "calabash.framework-#{Calabash::Cucumber::VERSION}.zip"
+ zip_file = "calabash.framework-#{ENV['CALABASH_VERSION']||Calabash::Cucumber::VERSION}.zip"
puts "Did not find calabash.framework. I'll download it...'"
puts "http://cloud.github.com/downloads/calabash/calabash-ios/#{zip_file}"
require 'uri'
uri = URI.parse "http://cloud.github.com/downloads/calabash/calabash-ios/#{zip_file}"
@@ -361,9 +362,14 @@
if args.length > 0
if args[0].end_with?(".ipa")
validate_ipa(args[0])
elsif args[0].end_with?(".app")
validate_app(args[0])
+ else
+ msg("Error") do
+ puts "File should end with .app or .ipa"
+ end
+ exit 1
end
else
dd_dir = Calabash::Cucumber::SimulatorHelper.derived_data_dir_for_project
if not dd_dir
puts "Unable to find iOS project."
\ No newline at end of file