bin/calabash-ios-helpers.rb in calabash-cucumber-0.18.2 vs bin/calabash-ios-helpers.rb in calabash-cucumber-0.19.0.pre1

- old
+ new

@@ -20,12 +20,10 @@ generate a features folder structure. console starts an interactive console to interact with your app via Calabash setup [<path>] setup your XCode project for calabash-ios (EXPERIMENTAL) - update [target] - updates one of the following targets: hooks download install latest compatible version of calabash.framework check [{<path to .ipa>|<path to .app>}] check whether an app or ipa is linked with calabash.framework (EXPERIMENTAL) sim locale <lang> [<region>] @@ -34,12 +32,10 @@ set allow location on/off for current project or bundleid sim reset reset content and settings in all iOS Simulators sim acc enable accessibility in all iOS Simulators - sim device {iPad|iPad_Retina|iPhone|iPhone_Retina|iPhone_Retina_4inch} - change the default iOS Simulator device. EOF end def print_help file = File.join(File.dirname(__FILE__), '..', 'doc', 'calabash-ios-help.txt') @@ -70,66 +66,5 @@ puts "We don't yet support this. Please setup calabash manually." exit 1 end return dir_to_search,project_files end - - -def is_json?(str) - str[0..0] == '{' -end - -# @!visibility private -# @deprecated Replaced with test-cloud gem -def calabash_submit(args) - if args.size < 2 - msg("Error") do - puts "You must supply at path to ipa and secret." - end - exit 1 - end - - ipa_file = args[0] - if not File.exists?(ipa_file) - msg("Error") do - puts "Unable to find .ipa at '#{ipa_file}'" - end - exit 1 - end - - secret = args[1] - - archive_path = "#{Tempfile.new("archive").path}.zip" - - feature_path = "features" - if args.length == 3 - msg("Error") do - puts "Not implemented: You can't supply a path to features folder yet." - puts "You should cd into your project folder containing your features folder" - puts "and then run this command again" - end - exit 1 - end - system ("zip -r -o #{archive_path} #{feature_path}") - - - - url = ENV['SUBMIT_URL'] || "https://www.lesspainful.com/cmd_upload" - - msg("Info") do - puts "Uploading ipa and features to #{url}" - end - result = `curl -F "secret=#{secret}" -F "app=@#{ipa_file}" -F "env=@#{archive_path}" #{url}` - - if is_json? result - json_result = JSON.parse(result) - puts "Test status is '#{json_result['status']}" - puts "Test id is '#{json_result['id']}" - puts "You can see the test result here: #{json_result['url']}" - puts "You can pull the status by using this command:" - puts "curl -F \"secret=#{secret}\" -F \"id=#{json_result['id']}\" https://www.lesspainful.com/cmd_status" - else - puts result - end - -end -