bin/calabash-ios-setup.rb in calabash-cucumber-0.21.5 vs bin/calabash-ios-setup.rb in calabash-cucumber-0.21.6

- old
+ new

@@ -1,42 +1,17 @@ require "calabash-cucumber/version" require 'rexml/rexml' require "rexml/document" - -def detect_accessibility_support - dirs = Dir.glob(File.join(File.expand_path("~/Library"),"Application Support","iPhone Simulator","*.*","Library","Preferences")) - dirs.each do |sim_pref_dir| - fp = File.expand_path("#{sim_pref_dir}/com.apple.Accessibility.plist") - out = `defaults read "#{fp}" AXInspectorEnabled` - ax_inspector = out.split("\n")[0]=="0" - out = `defaults read "#{fp}" ApplicationAccessibilityEnabled` - app_acc = out.split("\n")[0]=="0" - if not(File.exists?(fp)) || ax_inspector == "0" || app_acc == "0" - msg("Warn") do - puts "Accessibility is not enabled for simulator: #{sim_pref_dir}" - puts "Enabled accessibility as described here:" - puts "https://github.com/calabash/calabash-ios/wiki/01-Getting-started-guide" - puts "Alternatively run command:" - puts "calabash-ios sim acc" - end - end - - end -end - def calabash_setup(args) puts "Checking if Xcode is running..." res = `ps x -o pid,command | grep -v grep | grep Contents/MacOS/Xcode` unless res=="" puts "Detected running Xcode. You may need to restart Xcode after setup." end project_name, project_path, xpath = find_project_files(args) setup_project(project_name, project_path, xpath) - - calabash_sim_accessibility - detect_accessibility_support msg("Setup done") do puts "Please validate by running the -cal target" puts "from Xcode."