calabash-cucumber 0.18.2 → 0.19.0.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/calabash-ios +0 -16
- data/bin/calabash-ios-build.rb +0 -86
- data/bin/calabash-ios-helpers.rb +0 -65
- data/bin/calabash-ios-setup.rb +5 -119
- data/bin/calabash-ios-sim.rb +0 -37
- data/bin/frank-calabash +0 -1
- data/doc/calabash-ios-help.txt +0 -8
- data/dylibs/libCalabashDyn.dylib +0 -0
- data/dylibs/libCalabashDynSim.dylib +0 -0
- data/features-skeleton/support/01_launch.rb +3 -4
- data/features/step_definitions/calabash_steps.rb +1 -7
- data/lib/calabash-cucumber.rb +1 -2
- data/lib/calabash-cucumber/actions/instruments_actions.rb +2 -3
- data/lib/calabash-cucumber/core.rb +97 -101
- data/lib/calabash-cucumber/device.rb +5 -118
- data/lib/calabash-cucumber/environment.rb +109 -5
- data/lib/calabash-cucumber/environment_helpers.rb +4 -66
- data/lib/calabash-cucumber/http/http.rb +114 -0
- data/lib/calabash-cucumber/http_helpers.rb +3 -1
- data/lib/calabash-cucumber/ipad_1x_2x.rb +5 -7
- data/lib/calabash-cucumber/keyboard_helpers.rb +0 -44
- data/lib/calabash-cucumber/launcher.rb +425 -808
- data/lib/calabash-cucumber/logging.rb +2 -74
- data/lib/calabash-cucumber/operations.rb +0 -2
- data/lib/calabash-cucumber/rotation_helpers.rb +2 -82
- data/lib/calabash-cucumber/status_bar_helpers.rb +2 -8
- data/lib/calabash-cucumber/store/preferences.rb +2 -1
- data/lib/calabash-cucumber/uia.rb +4 -9
- data/lib/calabash-cucumber/version.rb +2 -2
- data/lib/calabash-cucumber/wait_helpers.rb +0 -2
- data/staticlib/calabash.framework.zip +0 -0
- data/staticlib/libFrankCalabash.a +0 -0
- metadata +13 -143
- data/lib/calabash-cucumber/actions/playback_actions.rb +0 -109
- data/lib/calabash-cucumber/deprecated.rb +0 -34
- data/lib/calabash-cucumber/launch/simulator_helper.rb +0 -62
- data/lib/calabash-cucumber/launch/simulator_launcher.rb +0 -617
- data/lib/calabash-cucumber/playback_helpers.rb +0 -225
- data/lib/calabash-cucumber/resources/cell_swipe_ios4_ipad.base64 +0 -51
- data/lib/calabash-cucumber/resources/cell_swipe_ios4_iphone.base64 +0 -51
- data/lib/calabash-cucumber/resources/cell_swipe_ios5_ipad.base64 +0 -74
- data/lib/calabash-cucumber/resources/cell_swipe_ios5_iphone.base64 +0 -74
- data/lib/calabash-cucumber/resources/double_tap_ios5_ipad.base64 +0 -15
- data/lib/calabash-cucumber/resources/double_tap_ios5_iphone.base64 +0 -15
- data/lib/calabash-cucumber/resources/double_tap_ios6_ipad.base64 +0 -22
- data/lib/calabash-cucumber/resources/double_tap_ios6_iphone.base64 +0 -22
- data/lib/calabash-cucumber/resources/pan_ios5_ipad.base64 +0 -199
- data/lib/calabash-cucumber/resources/pan_ios5_iphone.base64 +0 -199
- data/lib/calabash-cucumber/resources/pan_ios6_ipad.base64 +0 -206
- data/lib/calabash-cucumber/resources/pan_ios6_iphone.base64 +0 -206
- data/lib/calabash-cucumber/resources/pinch_in_ios4_ipad.base64 +0 -104
- data/lib/calabash-cucumber/resources/pinch_in_ios4_iphone.base64 +0 -104
- data/lib/calabash-cucumber/resources/pinch_in_ios5_ipad.base64 +0 -144
- data/lib/calabash-cucumber/resources/pinch_in_ios5_iphone.base64 +0 -144
- data/lib/calabash-cucumber/resources/pinch_in_ios6_ipad.base64 +0 -70
- data/lib/calabash-cucumber/resources/pinch_in_ios6_iphone.base64 +0 -70
- data/lib/calabash-cucumber/resources/pinch_out_ios5_ipad.base64 +0 -207
- data/lib/calabash-cucumber/resources/pinch_out_ios5_iphone.base64 +0 -207
- data/lib/calabash-cucumber/resources/pinch_out_ios6_ipad.base64 +0 -96
- data/lib/calabash-cucumber/resources/pinch_out_ios6_iphone.base64 +0 -96
- data/lib/calabash-cucumber/resources/rotate_left_home_down_ios4_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_down_ios4_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_down_ios5_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_down_ios5_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_left_ios4_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_left_ios4_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_left_ios5_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_left_ios5_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_right_ios4_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_right_ios4_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_right_ios5_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_right_ios5_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_up_ios4_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_up_ios4_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_up_ios5_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_left_home_up_ios5_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_down_ios4_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_down_ios4_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_down_ios5_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_down_ios5_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_left_ios4_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_left_ios4_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_left_ios5_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_left_ios5_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_right_ios4_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_right_ios4_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_right_ios5_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_right_ios5_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_up_ios4_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_up_ios4_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_up_ios5_ipad.base64 +0 -2
- data/lib/calabash-cucumber/resources/rotate_right_home_up_ios5_iphone.base64 +0 -2
- data/lib/calabash-cucumber/resources/swipe_down_ios5_ipad.base64 +0 -18
- data/lib/calabash-cucumber/resources/swipe_down_ios5_iphone.base64 +0 -31
- data/lib/calabash-cucumber/resources/swipe_down_ios6_ipad.base64 +0 -25
- data/lib/calabash-cucumber/resources/swipe_down_ios6_iphone.base64 +0 -25
- data/lib/calabash-cucumber/resources/swipe_left_hard_ios4_ipad.base64 +0 -15
- data/lib/calabash-cucumber/resources/swipe_left_hard_ios4_iphone.base64 +0 -15
- data/lib/calabash-cucumber/resources/swipe_left_ios4_ipad.base64 +0 -18
- data/lib/calabash-cucumber/resources/swipe_left_ios4_iphone.base64 +0 -18
- data/lib/calabash-cucumber/resources/swipe_left_ios5_ipad.base64 +0 -17
- data/lib/calabash-cucumber/resources/swipe_left_ios5_iphone.base64 +0 -34
- data/lib/calabash-cucumber/resources/swipe_left_ios6_ipad.base64 +0 -28
- data/lib/calabash-cucumber/resources/swipe_left_ios6_iphone.base64 +0 -28
- data/lib/calabash-cucumber/resources/swipe_right_hard_ios4_ipad.base64 +0 -17
- data/lib/calabash-cucumber/resources/swipe_right_hard_ios4_iphone.base64 +0 -17
- data/lib/calabash-cucumber/resources/swipe_right_ios4_ipad.base64 +0 -13
- data/lib/calabash-cucumber/resources/swipe_right_ios4_iphone.base64 +0 -13
- data/lib/calabash-cucumber/resources/swipe_right_ios5_ipad.base64 +0 -17
- data/lib/calabash-cucumber/resources/swipe_right_ios5_iphone.base64 +0 -17
- data/lib/calabash-cucumber/resources/swipe_right_ios6_ipad.base64 +0 -25
- data/lib/calabash-cucumber/resources/swipe_right_ios6_iphone.base64 +0 -25
- data/lib/calabash-cucumber/resources/swipe_up_ios5_ipad.base64 +0 -34
- data/lib/calabash-cucumber/resources/swipe_up_ios5_iphone.base64 +0 -28
- data/lib/calabash-cucumber/resources/swipe_up_ios6_ipad.base64 +0 -25
- data/lib/calabash-cucumber/resources/swipe_up_ios6_iphone.base64 +0 -25
- data/lib/calabash-cucumber/resources/touch_done_ios4_ipad.base64 +0 -7
- data/lib/calabash-cucumber/resources/touch_done_ios4_iphone.base64 +0 -9
- data/lib/calabash-cucumber/resources/touch_done_ios5_ipad.base64 +0 -7
- data/lib/calabash-cucumber/resources/touch_done_ios5_iphone.base64 +0 -9
- data/lib/calabash-cucumber/resources/touch_hold_ios5_ipad.base64 +0 -9
- data/lib/calabash-cucumber/resources/touch_hold_ios5_iphone.base64 +0 -9
- data/lib/calabash-cucumber/resources/touch_hold_ios6_ipad.base64 +0 -9
- data/lib/calabash-cucumber/resources/touch_hold_ios6_iphone.base64 +0 -9
- data/lib/calabash-cucumber/resources/touch_ios4_ipad.base64 +0 -9
- data/lib/calabash-cucumber/resources/touch_ios4_iphone.base64 +0 -9
- data/lib/calabash-cucumber/resources/touch_ios5_ipad.base64 +0 -9
- data/lib/calabash-cucumber/resources/touch_ios5_iphone.base64 +0 -9
- data/lib/calabash-cucumber/resources/touch_ios7_ipad.base64 +0 -9
- data/lib/calabash-cucumber/resources/touch_ios7_iphone.base64 +0 -9
- data/lib/calabash-cucumber/resources/wheel_down_ios4_ipad.base64 +0 -159
- data/lib/calabash-cucumber/resources/wheel_down_ios4_iphone.base64 +0 -159
- data/lib/calabash-cucumber/resources/wheel_down_ios5_ipad.base64 +0 -156
- data/lib/calabash-cucumber/resources/wheel_down_ios5_iphone.base64 +0 -156
- data/lib/calabash-cucumber/resources/wheel_up_ios4_ipad.base64 +0 -166
- data/lib/calabash-cucumber/resources/wheel_up_ios4_iphone.base64 +0 -166
- data/lib/calabash-cucumber/resources/wheel_up_ios5_ipad.base64 +0 -156
- data/lib/calabash-cucumber/resources/wheel_up_ios5_iphone.base64 +0 -156
- data/lib/calabash-cucumber/utils/logging.rb +0 -111
- data/lib/calabash-cucumber/utils/plist_buddy.rb +0 -45
- data/lib/calabash-cucumber/utils/simulator_accessibility.rb +0 -334
- data/lib/calabash-cucumber/utils/xctools.rb +0 -101
- data/scripts/.irbrc +0 -64
- data/scripts/launch.rb +0 -48
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: eee61874d45cf5a644357bbb94f66e192c7fbf21
         | 
| 4 | 
            +
              data.tar.gz: f87c5f01be803264e51e31aa5d90ae24c10d6e90
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: fc75e8e97b33cad2d2169a58c62790e73b6a016d55fb41032fc216ed7b1d02443f09564f4a3b8bb2a3ce651d716dea7fbda845b5680d9f5ada6af2b4a49f34d2
         | 
| 7 | 
            +
              data.tar.gz: 7febfab9502b7054478efa2bb54817d7dcf58e7a84fe0e6e7afa818a6565a83e70ef81190266465807f2b9f0b760fade9e23d5d1ccac753b06e8650c4f4578d4
         | 
    
        data/bin/calabash-ios
    CHANGED
    
    | @@ -31,15 +31,6 @@ elsif cmd == 'gen' | |
| 31 31 | 
             
            elsif cmd == 'console'
         | 
| 32 32 | 
             
              console
         | 
| 33 33 | 
             
              exit 0
         | 
| 34 | 
            -
            elsif cmd == 'build'
         | 
| 35 | 
            -
              build
         | 
| 36 | 
            -
              exit 0
         | 
| 37 | 
            -
            elsif cmd == 'update'
         | 
| 38 | 
            -
              update(ARGV)
         | 
| 39 | 
            -
              exit 0
         | 
| 40 | 
            -
            elsif cmd == 'run'
         | 
| 41 | 
            -
              run
         | 
| 42 | 
            -
              exit 0
         | 
| 43 34 | 
             
            elsif cmd == 'download'
         | 
| 44 35 | 
             
              calabash_download(ARGV)
         | 
| 45 36 | 
             
              exit 0
         | 
| @@ -49,9 +40,6 @@ elsif cmd == 'setup' | |
| 49 40 | 
             
            elsif cmd == 'check'
         | 
| 50 41 | 
             
              validate_setup(ARGV)
         | 
| 51 42 | 
             
              exit 0
         | 
| 52 | 
            -
            elsif cmd == 'submit'
         | 
| 53 | 
            -
              calabash_submit(ARGV)
         | 
| 54 | 
            -
              exit 0
         | 
| 55 43 | 
             
            elsif cmd == 'version'
         | 
| 56 44 | 
             
              require 'calabash-cucumber'
         | 
| 57 45 | 
             
              puts Calabash::Cucumber::VERSION
         | 
| @@ -71,13 +59,9 @@ elsif cmd == 'sim' | |
| 71 59 | 
             
                  calabash_sim_location(ARGV)
         | 
| 72 60 | 
             
              elsif subcmd == 'locale'
         | 
| 73 61 | 
             
                calabash_sim_locale(ARGV)
         | 
| 74 | 
            -
              elsif subcmd == 'device'
         | 
| 75 | 
            -
                calabash_sim_device(ARGV)
         | 
| 76 62 | 
             
              else
         | 
| 77 63 | 
             
                print_usage
         | 
| 78 64 | 
             
              end
         | 
| 79 65 | 
             
            else
         | 
| 80 66 | 
             
              print_usage
         | 
| 81 67 | 
             
            end
         | 
| 82 | 
            -
             | 
| 83 | 
            -
             | 
    
        data/bin/calabash-ios-build.rb
    CHANGED
    
    | @@ -1,48 +1,3 @@ | |
| 1 | 
            -
            def ensure_build_dir(options={:build_dir => "Calabash"})
         | 
| 2 | 
            -
              if !File.exist?(options[:build_dir])
         | 
| 3 | 
            -
                FileUtils.mkdir_p options[:build_dir]
         | 
| 4 | 
            -
              end
         | 
| 5 | 
            -
            end
         | 
| 6 | 
            -
             | 
| 7 | 
            -
            def build(options={:build_dir=>"Calabash",
         | 
| 8 | 
            -
                               :configuration => "Debug",
         | 
| 9 | 
            -
                               :sdk => "iphonesimulator",
         | 
| 10 | 
            -
                               :dstroot => "Calabash/build",
         | 
| 11 | 
            -
                               :wrapper_name => "Calabash.app"})
         | 
| 12 | 
            -
              #Follow Pete's .xcconfig-based approach with zero-config
         | 
| 13 | 
            -
             | 
| 14 | 
            -
              ensure_build_dir(options)
         | 
| 15 | 
            -
             | 
| 16 | 
            -
              if !File.exists?("#{options[:build_dir]}/cal.xcconfig")
         | 
| 17 | 
            -
                  FileUtils.cp(File.join(File.dirname(__FILE__),"cal.xcconfig"),"#{options[:build_dir]}/cal.xcconfig")
         | 
| 18 | 
            -
              end
         | 
| 19 | 
            -
             | 
| 20 | 
            -
              cmd=["xcodebuild"]
         | 
| 21 | 
            -
              cmd << %Q[-xcconfig "#{options[:build_dir]}/cal.xcconfig"]
         | 
| 22 | 
            -
              cmd << "install"
         | 
| 23 | 
            -
             | 
| 24 | 
            -
              (options[:target] || []).each do |tgt|
         | 
| 25 | 
            -
                options << %Q[-target "#{tgt}"]
         | 
| 26 | 
            -
              end
         | 
| 27 | 
            -
             | 
| 28 | 
            -
              cmd << "-configuration"
         | 
| 29 | 
            -
              cmd << %Q["#{options[:configuration]}"]
         | 
| 30 | 
            -
             | 
| 31 | 
            -
              cmd << "-sdk"
         | 
| 32 | 
            -
              cmd << %Q["#{options[:sdk]}"]
         | 
| 33 | 
            -
             | 
| 34 | 
            -
              cmd << %Q[DSTROOT="#{options[:dstroot]}"]
         | 
| 35 | 
            -
             | 
| 36 | 
            -
              cmd << %Q[WRAPPER_NAME="#{options[:wrapper_name]}"]
         | 
| 37 | 
            -
             | 
| 38 | 
            -
              res =nil
         | 
| 39 | 
            -
              msg("Calabash Build") do
         | 
| 40 | 
            -
                cmd_s = cmd.join(" ")
         | 
| 41 | 
            -
                puts cmd_s
         | 
| 42 | 
            -
                res=system(cmd_s)
         | 
| 43 | 
            -
              end
         | 
| 44 | 
            -
              res
         | 
| 45 | 
            -
            end
         | 
| 46 1 |  | 
| 47 2 | 
             
            def console
         | 
| 48 3 | 
             
              path = ENV['CALABASH_IRBRC']
         | 
| @@ -58,44 +13,3 @@ def console | |
| 58 13 | 
             
              puts "Running irb..."
         | 
| 59 14 | 
             
              exec("irb")
         | 
| 60 15 | 
             
            end
         | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
            def run(options={:build_dir=>"Calabash",
         | 
| 64 | 
            -
                               :configuration => "Debug",
         | 
| 65 | 
            -
                               :sdk => "iphonesimulator",
         | 
| 66 | 
            -
                               :dstroot => "Calabash/build",
         | 
| 67 | 
            -
                               :wrapper_name => "Calabash.app"})
         | 
| 68 | 
            -
              if ENV['NO_DOWNLOAD'] != "1"
         | 
| 69 | 
            -
                if !File.directory?("calabash.framework")
         | 
| 70 | 
            -
                  calabash_download(ARGV)
         | 
| 71 | 
            -
                end
         | 
| 72 | 
            -
              end
         | 
| 73 | 
            -
             | 
| 74 | 
            -
              if ENV['NO_BUILD'] != "1"
         | 
| 75 | 
            -
                if !build(options)
         | 
| 76 | 
            -
                  msg("Error") do
         | 
| 77 | 
            -
                    puts "Build failed. Please consult logs. Aborting."
         | 
| 78 | 
            -
                    exit(false)
         | 
| 79 | 
            -
                  end
         | 
| 80 | 
            -
                end
         | 
| 81 | 
            -
              end
         | 
| 82 | 
            -
             | 
| 83 | 
            -
              if ENV["NO_GEN"] != "1"
         | 
| 84 | 
            -
                if !File.directory?("features")
         | 
| 85 | 
            -
                  calabash_scaffold
         | 
| 86 | 
            -
                else
         | 
| 87 | 
            -
                  msg("Info") do
         | 
| 88 | 
            -
                    puts "Detected features folder, will not generate..."
         | 
| 89 | 
            -
                  end
         | 
| 90 | 
            -
                end
         | 
| 91 | 
            -
              end
         | 
| 92 | 
            -
             | 
| 93 | 
            -
              default_path = "#{options[:dstroot]}/#{options[:wrapper_name]}"
         | 
| 94 | 
            -
              cmd = %Q[APP_BUNDLE_PATH="#{ENV['APP_BUNDLE_PATH'] || default_path}" cucumber]
         | 
| 95 | 
            -
              msg("Info") do
         | 
| 96 | 
            -
                puts "Running command:"
         | 
| 97 | 
            -
                puts cmd
         | 
| 98 | 
            -
              end
         | 
| 99 | 
            -
              system(cmd)
         | 
| 100 | 
            -
              puts "Done..."
         | 
| 101 | 
            -
            end
         | 
    
        data/bin/calabash-ios-helpers.rb
    CHANGED
    
    | @@ -22,8 +22,6 @@ def print_usage | |
| 22 22 | 
             
                  starts an interactive console to interact with your app via Calabash
         | 
| 23 23 | 
             
                setup [<path>]
         | 
| 24 24 | 
             
                  setup your XCode project for calabash-ios (EXPERIMENTAL)
         | 
| 25 | 
            -
                update [target]
         | 
| 26 | 
            -
                  updates one of the following targets: hooks
         | 
| 27 25 | 
             
                download
         | 
| 28 26 | 
             
                  install latest compatible version of calabash.framework
         | 
| 29 27 | 
             
                check [{<path to .ipa>|<path to .app>}]
         | 
| @@ -36,8 +34,6 @@ def print_usage | |
| 36 34 | 
             
                  reset content and settings in all iOS Simulators
         | 
| 37 35 | 
             
                sim acc
         | 
| 38 36 | 
             
                  enable accessibility in all iOS Simulators
         | 
| 39 | 
            -
                sim device {iPad|iPad_Retina|iPhone|iPhone_Retina|iPhone_Retina_4inch}
         | 
| 40 | 
            -
                  change the default iOS Simulator device.
         | 
| 41 37 | 
             
            EOF
         | 
| 42 38 | 
             
            end
         | 
| 43 39 |  | 
| @@ -72,64 +68,3 @@ def ensure_correct_path(args) | |
| 72 68 | 
             
              end
         | 
| 73 69 | 
             
              return dir_to_search,project_files
         | 
| 74 70 | 
             
            end
         | 
| 75 | 
            -
             | 
| 76 | 
            -
             | 
| 77 | 
            -
            def is_json?(str)
         | 
| 78 | 
            -
             str[0..0] == '{'
         | 
| 79 | 
            -
            end
         | 
| 80 | 
            -
             | 
| 81 | 
            -
            # @!visibility private
         | 
| 82 | 
            -
            # @deprecated Replaced with test-cloud gem
         | 
| 83 | 
            -
            def calabash_submit(args)
         | 
| 84 | 
            -
              if args.size < 2
         | 
| 85 | 
            -
               msg("Error") do
         | 
| 86 | 
            -
                 puts "You must supply at path to ipa and secret."
         | 
| 87 | 
            -
               end
         | 
| 88 | 
            -
               exit 1
         | 
| 89 | 
            -
              end
         | 
| 90 | 
            -
             | 
| 91 | 
            -
              ipa_file = args[0]
         | 
| 92 | 
            -
              if not File.exists?(ipa_file)
         | 
| 93 | 
            -
                msg("Error") do
         | 
| 94 | 
            -
                  puts "Unable to find .ipa at '#{ipa_file}'"
         | 
| 95 | 
            -
                end
         | 
| 96 | 
            -
                exit 1
         | 
| 97 | 
            -
              end
         | 
| 98 | 
            -
             | 
| 99 | 
            -
              secret = args[1]
         | 
| 100 | 
            -
             | 
| 101 | 
            -
              archive_path = "#{Tempfile.new("archive").path}.zip"
         | 
| 102 | 
            -
             | 
| 103 | 
            -
              feature_path = "features"
         | 
| 104 | 
            -
              if args.length == 3
         | 
| 105 | 
            -
                msg("Error") do
         | 
| 106 | 
            -
                  puts "Not implemented: You can't supply a path to features folder yet."
         | 
| 107 | 
            -
                  puts "You should cd into your project folder containing your features folder"
         | 
| 108 | 
            -
                  puts "and then run this command again"
         | 
| 109 | 
            -
                end
         | 
| 110 | 
            -
                exit 1
         | 
| 111 | 
            -
              end
         | 
| 112 | 
            -
              system ("zip -r -o #{archive_path} #{feature_path}")
         | 
| 113 | 
            -
             | 
| 114 | 
            -
             | 
| 115 | 
            -
             | 
| 116 | 
            -
              url = ENV['SUBMIT_URL'] || "https://www.lesspainful.com/cmd_upload"
         | 
| 117 | 
            -
             | 
| 118 | 
            -
              msg("Info") do
         | 
| 119 | 
            -
                puts "Uploading ipa and features to #{url}"
         | 
| 120 | 
            -
              end
         | 
| 121 | 
            -
              result = `curl -F "secret=#{secret}" -F "app=@#{ipa_file}" -F "env=@#{archive_path}" #{url}`
         | 
| 122 | 
            -
             | 
| 123 | 
            -
              if is_json? result
         | 
| 124 | 
            -
               json_result = JSON.parse(result)
         | 
| 125 | 
            -
               puts "Test status is '#{json_result['status']}"
         | 
| 126 | 
            -
               puts "Test id is '#{json_result['id']}"
         | 
| 127 | 
            -
               puts "You can see the test result here: #{json_result['url']}"
         | 
| 128 | 
            -
               puts "You can pull the status by using this command:"
         | 
| 129 | 
            -
               puts "curl -F \"secret=#{secret}\" -F \"id=#{json_result['id']}\" https://www.lesspainful.com/cmd_status"
         | 
| 130 | 
            -
              else
         | 
| 131 | 
            -
               puts result
         | 
| 132 | 
            -
              end
         | 
| 133 | 
            -
             | 
| 134 | 
            -
            end
         | 
| 135 | 
            -
             | 
    
        data/bin/calabash-ios-setup.rb
    CHANGED
    
    | @@ -79,16 +79,6 @@ def calabash_download(args) | |
| 79 79 | 
             
              download_calabash(File.expand_path("."))
         | 
| 80 80 | 
             
            end
         | 
| 81 81 |  | 
| 82 | 
            -
            # @todo eval for deprecation - has no callers.
         | 
| 83 | 
            -
            def has_proxy?
         | 
| 84 | 
            -
              ENV['http_proxy'] ? true : false
         | 
| 85 | 
            -
            end
         | 
| 86 | 
            -
             | 
| 87 | 
            -
            def proxy
         | 
| 88 | 
            -
              url_parts = URI.split(ENV['http_proxy'])
         | 
| 89 | 
            -
              [url_parts[2], url_parts[3]]
         | 
| 90 | 
            -
            end
         | 
| 91 | 
            -
             | 
| 92 82 | 
             
            def download_calabash(project_path)
         | 
| 93 83 | 
             
              file = 'calabash.framework'
         | 
| 94 84 | 
             
              ##Download calabash.framework
         | 
| @@ -155,7 +145,6 @@ def setup_project(project_name, project_path, path) | |
| 155 145 |  | 
| 156 146 | 
             
            end
         | 
| 157 147 |  | 
| 158 | 
            -
            require 'calabash-cucumber/launch/simulator_launcher'
         | 
| 159 148 | 
             
            def validate_setup(args)
         | 
| 160 149 | 
             
              if args.length > 0
         | 
| 161 150 | 
             
                if args[0].end_with?(".ipa")
         | 
| @@ -169,63 +158,12 @@ def validate_setup(args) | |
| 169 158 | 
             
                  exit 1
         | 
| 170 159 | 
             
                end
         | 
| 171 160 | 
             
              else
         | 
| 172 | 
            -
                 | 
| 173 | 
            -
                   | 
| 174 | 
            -
             | 
| 175 | 
            -
             | 
| 176 | 
            -
             | 
| 177 | 
            -
                  end
         | 
| 178 | 
            -
                  app_bundles = Dir.glob(File.join(dd_dir, "Build", "Products", "*", "*.app"))
         | 
| 179 | 
            -
                  sim_dirs = Dir.glob(File.join(dd_dir, "Build", "Products", "Debug-iphonesimulator", "*.app"))
         | 
| 180 | 
            -
                  sim_dirs = sim_dirs.concat(Dir.glob(File.join(dd_dir, "Build", "Products", "Calabash-iphonesimulator", "*.app")))
         | 
| 181 | 
            -
                  if sim_dirs.empty?
         | 
| 182 | 
            -
                    msg = ["Have you built your app for simulator?"]
         | 
| 183 | 
            -
                    msg << "You should build the -cal target and your normal target"
         | 
| 184 | 
            -
                    msg << "(with configuration Debug)."
         | 
| 185 | 
            -
                    msg << "Searched dir: #{dd_dir}/Build/Products"
         | 
| 186 | 
            -
                    msg("Error") do
         | 
| 187 | 
            -
                      puts msg.join("\n")
         | 
| 188 | 
            -
                    end
         | 
| 189 | 
            -
                    exit 1
         | 
| 190 | 
            -
                  elsif sim_dirs.count != 2
         | 
| 191 | 
            -
                    msg = ["Have you built your app for simulator?"]
         | 
| 192 | 
            -
                    msg << "You should build the -cal target and your normal target"
         | 
| 193 | 
            -
                    msg << "(with configuration Debug)."
         | 
| 194 | 
            -
                    msg << "Searched dir: #{dd_dir}/Build/Products"
         | 
| 195 | 
            -
                    msg("Error") do
         | 
| 196 | 
            -
                      puts msg.join("\n")
         | 
| 197 | 
            -
                    end
         | 
| 198 | 
            -
                    exit 1
         | 
| 199 | 
            -
                  end
         | 
| 200 | 
            -
                  out_debug = `otool "#{sim_dirs[0]}"/* -o 2> /dev/null | grep CalabashServer`
         | 
| 201 | 
            -
                  out_cal = `otool "#{sim_dirs[1]}"/* -o 2> /dev/null | grep CalabashServer 2> /dev/null`
         | 
| 202 | 
            -
                  ok = (not /CalabashServer/.match(out_debug)) and /CalabashServer/.match(out_cal)
         | 
| 203 | 
            -
                  if ok
         | 
| 204 | 
            -
                    msg("OK") do
         | 
| 205 | 
            -
                      puts "Your configuration seems ok."
         | 
| 206 | 
            -
                      puts "app in directory:"
         | 
| 207 | 
            -
                      puts sim_dirs[0]
         | 
| 208 | 
            -
                      puts "does not have calabash.framework linked in."
         | 
| 209 | 
            -
                      puts "directory:"
         | 
| 210 | 
            -
                      puts sim_dirs[1]
         | 
| 211 | 
            -
                      puts "does."
         | 
| 212 | 
            -
                    end
         | 
| 213 | 
            -
                  else
         | 
| 214 | 
            -
                    msg("Fail") do
         | 
| 215 | 
            -
                      puts "Your configuration looks bad."
         | 
| 216 | 
            -
                      if (not /CalabashServer/.match(out_debug))
         | 
| 217 | 
            -
                        puts "WARNING: You Debug build seems to be linking with Calabash."
         | 
| 218 | 
            -
                        puts "You should restore your xcodeproject file from backup."
         | 
| 219 | 
            -
                      else
         | 
| 220 | 
            -
                        puts "app in directory"
         | 
| 221 | 
            -
                        puts sim_dirs[1]
         | 
| 222 | 
            -
                        puts "does not have calabash.framework linked in."
         | 
| 223 | 
            -
                      end
         | 
| 224 | 
            -
                    end
         | 
| 225 | 
            -
                  end
         | 
| 161 | 
            +
                $stderr.puts(
         | 
| 162 | 
            +
                  %Q["Please pass a .app or .ipa as an argument.  Ad hoc validation of projects
         | 
| 163 | 
            +
            is not yet supported])
         | 
| 164 | 
            +
                $stderr.flush
         | 
| 165 | 
            +
                exit 1
         | 
| 226 166 | 
             
              end
         | 
| 227 | 
            -
             | 
| 228 | 
            -
             | 
| 229 167 | 
             
            end
         | 
| 230 168 |  | 
| 231 169 | 
             
            def validate_ipa(ipa)
         | 
| @@ -263,55 +201,3 @@ def validate_app(app) | |
| 263 201 | 
             
                exit(1)
         | 
| 264 202 | 
             
              end
         | 
| 265 203 | 
             
            end
         | 
| 266 | 
            -
             | 
| 267 | 
            -
            def update(args)
         | 
| 268 | 
            -
              if args.length > 0
         | 
| 269 | 
            -
                target = args[0]
         | 
| 270 | 
            -
                unless UPDATE_TARGETS.include?(target)
         | 
| 271 | 
            -
                  msg('Error') do
         | 
| 272 | 
            -
                    puts "Invalid target #{target}. Must be one of: #{UPDATE_TARGETS.join(' ')}"
         | 
| 273 | 
            -
                  end
         | 
| 274 | 
            -
                  exit 1
         | 
| 275 | 
            -
                end
         | 
| 276 | 
            -
             | 
| 277 | 
            -
             | 
| 278 | 
            -
             | 
| 279 | 
            -
                target_file = 'features/support/launch.rb'
         | 
| 280 | 
            -
                msg('Question') do
         | 
| 281 | 
            -
                  puts "I'm about to update the #{target_file} file."
         | 
| 282 | 
            -
                  puts "Please hit return to confirm that's what you want."
         | 
| 283 | 
            -
                end
         | 
| 284 | 
            -
                exit 2 unless STDIN.gets.chomp == ''
         | 
| 285 | 
            -
             | 
| 286 | 
            -
             | 
| 287 | 
            -
                unless File.exist?(target_file)
         | 
| 288 | 
            -
                  msg('Error') do
         | 
| 289 | 
            -
                    puts "Unable to find file #{target_file}"
         | 
| 290 | 
            -
                    puts "Please change directory so that #{target_file} exists."
         | 
| 291 | 
            -
                  end
         | 
| 292 | 
            -
                  exit 1
         | 
| 293 | 
            -
                end
         | 
| 294 | 
            -
                new_launch_script = File.join(@script_dir, 'launch.rb')
         | 
| 295 | 
            -
             | 
| 296 | 
            -
                FileUtils.cp(new_launch_script, 'features/support/01_launch.rb', :verbose => true)
         | 
| 297 | 
            -
                FileUtils.rm(target_file, :force => true, :verbose => true)
         | 
| 298 | 
            -
             | 
| 299 | 
            -
                hooks_file = 'features/support/hooks.rb'
         | 
| 300 | 
            -
                if File.exist?(hooks_file)
         | 
| 301 | 
            -
                  FileUtils.mv(hooks_file, 'features/support/02_pre_stop_hooks.rb', :verbose => true)
         | 
| 302 | 
            -
                end
         | 
| 303 | 
            -
             | 
| 304 | 
            -
                msg('Info') do
         | 
| 305 | 
            -
                  puts "File copied.\n"
         | 
| 306 | 
            -
                  puts 'Launch on device using environment variable DEVICE_TARGET=device.'
         | 
| 307 | 
            -
                  puts 'Launch on simulator by default or using environment variable DEVICE_TARGET=simulator.'
         | 
| 308 | 
            -
                end
         | 
| 309 | 
            -
              else
         | 
| 310 | 
            -
                msg('Error') do
         | 
| 311 | 
            -
                  puts "update must take one of the following targets: #{UPDATE_TARGETS.join(' ')}"
         | 
| 312 | 
            -
                end
         | 
| 313 | 
            -
                exit 1
         | 
| 314 | 
            -
             | 
| 315 | 
            -
              end
         | 
| 316 | 
            -
             | 
| 317 | 
            -
            end
         | 
    
        data/bin/calabash-ios-sim.rb
    CHANGED
    
    | @@ -1,11 +1,6 @@ | |
| 1 | 
            -
            require 'calabash-cucumber/utils/simulator_accessibility'
         | 
| 2 | 
            -
            require 'calabash-cucumber/utils/logging'
         | 
| 3 1 | 
             
            require "calabash-cucumber/environment"
         | 
| 4 2 | 
             
            require 'run_loop'
         | 
| 5 3 |  | 
| 6 | 
            -
            include Calabash::Cucumber::Logging
         | 
| 7 | 
            -
            include Calabash::Cucumber::SimulatorAccessibility
         | 
| 8 | 
            -
             | 
| 9 4 | 
             
            def quit_sim
         | 
| 10 5 | 
             
              RunLoop::SimControl.new.quit_sim
         | 
| 11 6 | 
             
            end
         | 
| @@ -157,35 +152,3 @@ SUCCESS! | |
| 157 152 | 
             
            }
         | 
| 158 153 | 
             
              true
         | 
| 159 154 | 
             
            end
         | 
| 160 | 
            -
             | 
| 161 | 
            -
             | 
| 162 | 
            -
            def calabash_sim_device(args)
         | 
| 163 | 
            -
              quit_simulator
         | 
| 164 | 
            -
              options = ["iPad", "iPad_Retina", "iPhone", "iPhone_Retina", "iPhone_Retina_4inch"]
         | 
| 165 | 
            -
              if args.length != 1 or not options.find { |x| x == args[0] }
         | 
| 166 | 
            -
                print_usage
         | 
| 167 | 
            -
                puts "Unrecognized args: #{args}"
         | 
| 168 | 
            -
                puts "should be one of #{options.inspect}"
         | 
| 169 | 
            -
                exit(0)
         | 
| 170 | 
            -
              end
         | 
| 171 | 
            -
              path =File.join(File.expand_path("~/Library"), "Preferences", "com.apple.iphonesimulator.plist")
         | 
| 172 | 
            -
              plist = CFPropertyList::List.new(:file => path)
         | 
| 173 | 
            -
              hash = CFPropertyList.native_types(plist.value)
         | 
| 174 | 
            -
             | 
| 175 | 
            -
              device = case args[0]
         | 
| 176 | 
            -
                         when "iPad_Retina"
         | 
| 177 | 
            -
                           "iPad (Retina)"
         | 
| 178 | 
            -
                         when "iPhone_Retina"
         | 
| 179 | 
            -
                           "iPhone (Retina 3.5-inch)"
         | 
| 180 | 
            -
                         when "iPhone_Retina_4inch"
         | 
| 181 | 
            -
                           "iPhone (Retina 4-inch)"
         | 
| 182 | 
            -
                         else
         | 
| 183 | 
            -
                           args[0]
         | 
| 184 | 
            -
                       end
         | 
| 185 | 
            -
              if device
         | 
| 186 | 
            -
                hash['SimulateDevice'] = device
         | 
| 187 | 
            -
                plist.value = CFPropertyList.guess(hash)
         | 
| 188 | 
            -
                plist.save(path, CFPropertyList::List::FORMAT_BINARY)
         | 
| 189 | 
            -
              end
         | 
| 190 | 
            -
             | 
| 191 | 
            -
            end
         | 
    
        data/bin/frank-calabash
    CHANGED
    
    
    
        data/doc/calabash-ios-help.txt
    CHANGED
    
    | @@ -8,11 +8,8 @@ Usage: calabash-ios <command-name> [parameters] | |
| 8 8 | 
             
                sim locale [lang] [regional]?
         | 
| 9 9 | 
             
                sim reset
         | 
| 10 10 | 
             
                sim acc
         | 
| 11 | 
            -
                sim device {iPad,iPad_Retina,iPhone,iPhone_Retina,iPhone_Retina_4inch}
         | 
| 12 11 | 
             
                sim location {on|off} <bundleid>
         | 
| 13 12 |  | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 13 | 
             
              Commands:
         | 
| 17 14 | 
             
              gen creates a skeleton features dir. This is usually used once when
         | 
| 18 15 | 
             
                  setting up calabash to ensure that the features folder contains
         | 
| @@ -44,9 +41,6 @@ Usage: calabash-ios <command-name> [parameters] | |
| 44 41 | 
             
                    If something goes wrong. Close Xcode and copy project.pbxproj.bak
         | 
| 45 42 | 
             
                    to project.pbxproj inside your .xcodeproj folder.
         | 
| 46 43 |  | 
| 47 | 
            -
              update [target]
         | 
| 48 | 
            -
                    updates one of the following targets: hooks
         | 
| 49 | 
            -
             | 
| 50 44 | 
             
              download [opt_path]?
         | 
| 51 45 | 
             
                    copies current compatible version of calabash.framework to your project.
         | 
| 52 46 | 
             
                    It should be run from a directory containing an Xcode project,
         | 
| @@ -81,5 +75,3 @@ Usage: calabash-ios <command-name> [parameters] | |
| 81 75 | 
             
              sim reset (EXPERIMENTAL) Will select "Reset Content and Settings"
         | 
| 82 76 | 
             
                  in the iOS Simulators using AppleScript.
         | 
| 83 77 |  | 
| 84 | 
            -
              sim device [device] Will set the default iOS Simulator device.
         | 
| 85 | 
            -
                  [device] can be one of iPad iPad_Retina iPhone iPhone_Retina iPhone_Retina_4inch
         |