calabash-cucumber 0.18.2 → 0.19.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/bin/calabash-ios +0 -16
  3. data/bin/calabash-ios-build.rb +0 -86
  4. data/bin/calabash-ios-helpers.rb +0 -65
  5. data/bin/calabash-ios-setup.rb +5 -119
  6. data/bin/calabash-ios-sim.rb +0 -37
  7. data/bin/frank-calabash +0 -1
  8. data/doc/calabash-ios-help.txt +0 -8
  9. data/dylibs/libCalabashDyn.dylib +0 -0
  10. data/dylibs/libCalabashDynSim.dylib +0 -0
  11. data/features-skeleton/support/01_launch.rb +3 -4
  12. data/features/step_definitions/calabash_steps.rb +1 -7
  13. data/lib/calabash-cucumber.rb +1 -2
  14. data/lib/calabash-cucumber/actions/instruments_actions.rb +2 -3
  15. data/lib/calabash-cucumber/core.rb +97 -101
  16. data/lib/calabash-cucumber/device.rb +5 -118
  17. data/lib/calabash-cucumber/environment.rb +109 -5
  18. data/lib/calabash-cucumber/environment_helpers.rb +4 -66
  19. data/lib/calabash-cucumber/http/http.rb +114 -0
  20. data/lib/calabash-cucumber/http_helpers.rb +3 -1
  21. data/lib/calabash-cucumber/ipad_1x_2x.rb +5 -7
  22. data/lib/calabash-cucumber/keyboard_helpers.rb +0 -44
  23. data/lib/calabash-cucumber/launcher.rb +425 -808
  24. data/lib/calabash-cucumber/logging.rb +2 -74
  25. data/lib/calabash-cucumber/operations.rb +0 -2
  26. data/lib/calabash-cucumber/rotation_helpers.rb +2 -82
  27. data/lib/calabash-cucumber/status_bar_helpers.rb +2 -8
  28. data/lib/calabash-cucumber/store/preferences.rb +2 -1
  29. data/lib/calabash-cucumber/uia.rb +4 -9
  30. data/lib/calabash-cucumber/version.rb +2 -2
  31. data/lib/calabash-cucumber/wait_helpers.rb +0 -2
  32. data/staticlib/calabash.framework.zip +0 -0
  33. data/staticlib/libFrankCalabash.a +0 -0
  34. metadata +13 -143
  35. data/lib/calabash-cucumber/actions/playback_actions.rb +0 -109
  36. data/lib/calabash-cucumber/deprecated.rb +0 -34
  37. data/lib/calabash-cucumber/launch/simulator_helper.rb +0 -62
  38. data/lib/calabash-cucumber/launch/simulator_launcher.rb +0 -617
  39. data/lib/calabash-cucumber/playback_helpers.rb +0 -225
  40. data/lib/calabash-cucumber/resources/cell_swipe_ios4_ipad.base64 +0 -51
  41. data/lib/calabash-cucumber/resources/cell_swipe_ios4_iphone.base64 +0 -51
  42. data/lib/calabash-cucumber/resources/cell_swipe_ios5_ipad.base64 +0 -74
  43. data/lib/calabash-cucumber/resources/cell_swipe_ios5_iphone.base64 +0 -74
  44. data/lib/calabash-cucumber/resources/double_tap_ios5_ipad.base64 +0 -15
  45. data/lib/calabash-cucumber/resources/double_tap_ios5_iphone.base64 +0 -15
  46. data/lib/calabash-cucumber/resources/double_tap_ios6_ipad.base64 +0 -22
  47. data/lib/calabash-cucumber/resources/double_tap_ios6_iphone.base64 +0 -22
  48. data/lib/calabash-cucumber/resources/pan_ios5_ipad.base64 +0 -199
  49. data/lib/calabash-cucumber/resources/pan_ios5_iphone.base64 +0 -199
  50. data/lib/calabash-cucumber/resources/pan_ios6_ipad.base64 +0 -206
  51. data/lib/calabash-cucumber/resources/pan_ios6_iphone.base64 +0 -206
  52. data/lib/calabash-cucumber/resources/pinch_in_ios4_ipad.base64 +0 -104
  53. data/lib/calabash-cucumber/resources/pinch_in_ios4_iphone.base64 +0 -104
  54. data/lib/calabash-cucumber/resources/pinch_in_ios5_ipad.base64 +0 -144
  55. data/lib/calabash-cucumber/resources/pinch_in_ios5_iphone.base64 +0 -144
  56. data/lib/calabash-cucumber/resources/pinch_in_ios6_ipad.base64 +0 -70
  57. data/lib/calabash-cucumber/resources/pinch_in_ios6_iphone.base64 +0 -70
  58. data/lib/calabash-cucumber/resources/pinch_out_ios5_ipad.base64 +0 -207
  59. data/lib/calabash-cucumber/resources/pinch_out_ios5_iphone.base64 +0 -207
  60. data/lib/calabash-cucumber/resources/pinch_out_ios6_ipad.base64 +0 -96
  61. data/lib/calabash-cucumber/resources/pinch_out_ios6_iphone.base64 +0 -96
  62. data/lib/calabash-cucumber/resources/rotate_left_home_down_ios4_ipad.base64 +0 -2
  63. data/lib/calabash-cucumber/resources/rotate_left_home_down_ios4_iphone.base64 +0 -2
  64. data/lib/calabash-cucumber/resources/rotate_left_home_down_ios5_ipad.base64 +0 -2
  65. data/lib/calabash-cucumber/resources/rotate_left_home_down_ios5_iphone.base64 +0 -2
  66. data/lib/calabash-cucumber/resources/rotate_left_home_left_ios4_ipad.base64 +0 -2
  67. data/lib/calabash-cucumber/resources/rotate_left_home_left_ios4_iphone.base64 +0 -2
  68. data/lib/calabash-cucumber/resources/rotate_left_home_left_ios5_ipad.base64 +0 -2
  69. data/lib/calabash-cucumber/resources/rotate_left_home_left_ios5_iphone.base64 +0 -2
  70. data/lib/calabash-cucumber/resources/rotate_left_home_right_ios4_ipad.base64 +0 -2
  71. data/lib/calabash-cucumber/resources/rotate_left_home_right_ios4_iphone.base64 +0 -2
  72. data/lib/calabash-cucumber/resources/rotate_left_home_right_ios5_ipad.base64 +0 -2
  73. data/lib/calabash-cucumber/resources/rotate_left_home_right_ios5_iphone.base64 +0 -2
  74. data/lib/calabash-cucumber/resources/rotate_left_home_up_ios4_ipad.base64 +0 -2
  75. data/lib/calabash-cucumber/resources/rotate_left_home_up_ios4_iphone.base64 +0 -2
  76. data/lib/calabash-cucumber/resources/rotate_left_home_up_ios5_ipad.base64 +0 -2
  77. data/lib/calabash-cucumber/resources/rotate_left_home_up_ios5_iphone.base64 +0 -2
  78. data/lib/calabash-cucumber/resources/rotate_right_home_down_ios4_ipad.base64 +0 -2
  79. data/lib/calabash-cucumber/resources/rotate_right_home_down_ios4_iphone.base64 +0 -2
  80. data/lib/calabash-cucumber/resources/rotate_right_home_down_ios5_ipad.base64 +0 -2
  81. data/lib/calabash-cucumber/resources/rotate_right_home_down_ios5_iphone.base64 +0 -2
  82. data/lib/calabash-cucumber/resources/rotate_right_home_left_ios4_ipad.base64 +0 -2
  83. data/lib/calabash-cucumber/resources/rotate_right_home_left_ios4_iphone.base64 +0 -2
  84. data/lib/calabash-cucumber/resources/rotate_right_home_left_ios5_ipad.base64 +0 -2
  85. data/lib/calabash-cucumber/resources/rotate_right_home_left_ios5_iphone.base64 +0 -2
  86. data/lib/calabash-cucumber/resources/rotate_right_home_right_ios4_ipad.base64 +0 -2
  87. data/lib/calabash-cucumber/resources/rotate_right_home_right_ios4_iphone.base64 +0 -2
  88. data/lib/calabash-cucumber/resources/rotate_right_home_right_ios5_ipad.base64 +0 -2
  89. data/lib/calabash-cucumber/resources/rotate_right_home_right_ios5_iphone.base64 +0 -2
  90. data/lib/calabash-cucumber/resources/rotate_right_home_up_ios4_ipad.base64 +0 -2
  91. data/lib/calabash-cucumber/resources/rotate_right_home_up_ios4_iphone.base64 +0 -2
  92. data/lib/calabash-cucumber/resources/rotate_right_home_up_ios5_ipad.base64 +0 -2
  93. data/lib/calabash-cucumber/resources/rotate_right_home_up_ios5_iphone.base64 +0 -2
  94. data/lib/calabash-cucumber/resources/swipe_down_ios5_ipad.base64 +0 -18
  95. data/lib/calabash-cucumber/resources/swipe_down_ios5_iphone.base64 +0 -31
  96. data/lib/calabash-cucumber/resources/swipe_down_ios6_ipad.base64 +0 -25
  97. data/lib/calabash-cucumber/resources/swipe_down_ios6_iphone.base64 +0 -25
  98. data/lib/calabash-cucumber/resources/swipe_left_hard_ios4_ipad.base64 +0 -15
  99. data/lib/calabash-cucumber/resources/swipe_left_hard_ios4_iphone.base64 +0 -15
  100. data/lib/calabash-cucumber/resources/swipe_left_ios4_ipad.base64 +0 -18
  101. data/lib/calabash-cucumber/resources/swipe_left_ios4_iphone.base64 +0 -18
  102. data/lib/calabash-cucumber/resources/swipe_left_ios5_ipad.base64 +0 -17
  103. data/lib/calabash-cucumber/resources/swipe_left_ios5_iphone.base64 +0 -34
  104. data/lib/calabash-cucumber/resources/swipe_left_ios6_ipad.base64 +0 -28
  105. data/lib/calabash-cucumber/resources/swipe_left_ios6_iphone.base64 +0 -28
  106. data/lib/calabash-cucumber/resources/swipe_right_hard_ios4_ipad.base64 +0 -17
  107. data/lib/calabash-cucumber/resources/swipe_right_hard_ios4_iphone.base64 +0 -17
  108. data/lib/calabash-cucumber/resources/swipe_right_ios4_ipad.base64 +0 -13
  109. data/lib/calabash-cucumber/resources/swipe_right_ios4_iphone.base64 +0 -13
  110. data/lib/calabash-cucumber/resources/swipe_right_ios5_ipad.base64 +0 -17
  111. data/lib/calabash-cucumber/resources/swipe_right_ios5_iphone.base64 +0 -17
  112. data/lib/calabash-cucumber/resources/swipe_right_ios6_ipad.base64 +0 -25
  113. data/lib/calabash-cucumber/resources/swipe_right_ios6_iphone.base64 +0 -25
  114. data/lib/calabash-cucumber/resources/swipe_up_ios5_ipad.base64 +0 -34
  115. data/lib/calabash-cucumber/resources/swipe_up_ios5_iphone.base64 +0 -28
  116. data/lib/calabash-cucumber/resources/swipe_up_ios6_ipad.base64 +0 -25
  117. data/lib/calabash-cucumber/resources/swipe_up_ios6_iphone.base64 +0 -25
  118. data/lib/calabash-cucumber/resources/touch_done_ios4_ipad.base64 +0 -7
  119. data/lib/calabash-cucumber/resources/touch_done_ios4_iphone.base64 +0 -9
  120. data/lib/calabash-cucumber/resources/touch_done_ios5_ipad.base64 +0 -7
  121. data/lib/calabash-cucumber/resources/touch_done_ios5_iphone.base64 +0 -9
  122. data/lib/calabash-cucumber/resources/touch_hold_ios5_ipad.base64 +0 -9
  123. data/lib/calabash-cucumber/resources/touch_hold_ios5_iphone.base64 +0 -9
  124. data/lib/calabash-cucumber/resources/touch_hold_ios6_ipad.base64 +0 -9
  125. data/lib/calabash-cucumber/resources/touch_hold_ios6_iphone.base64 +0 -9
  126. data/lib/calabash-cucumber/resources/touch_ios4_ipad.base64 +0 -9
  127. data/lib/calabash-cucumber/resources/touch_ios4_iphone.base64 +0 -9
  128. data/lib/calabash-cucumber/resources/touch_ios5_ipad.base64 +0 -9
  129. data/lib/calabash-cucumber/resources/touch_ios5_iphone.base64 +0 -9
  130. data/lib/calabash-cucumber/resources/touch_ios7_ipad.base64 +0 -9
  131. data/lib/calabash-cucumber/resources/touch_ios7_iphone.base64 +0 -9
  132. data/lib/calabash-cucumber/resources/wheel_down_ios4_ipad.base64 +0 -159
  133. data/lib/calabash-cucumber/resources/wheel_down_ios4_iphone.base64 +0 -159
  134. data/lib/calabash-cucumber/resources/wheel_down_ios5_ipad.base64 +0 -156
  135. data/lib/calabash-cucumber/resources/wheel_down_ios5_iphone.base64 +0 -156
  136. data/lib/calabash-cucumber/resources/wheel_up_ios4_ipad.base64 +0 -166
  137. data/lib/calabash-cucumber/resources/wheel_up_ios4_iphone.base64 +0 -166
  138. data/lib/calabash-cucumber/resources/wheel_up_ios5_ipad.base64 +0 -156
  139. data/lib/calabash-cucumber/resources/wheel_up_ios5_iphone.base64 +0 -156
  140. data/lib/calabash-cucumber/utils/logging.rb +0 -111
  141. data/lib/calabash-cucumber/utils/plist_buddy.rb +0 -45
  142. data/lib/calabash-cucumber/utils/simulator_accessibility.rb +0 -334
  143. data/lib/calabash-cucumber/utils/xctools.rb +0 -101
  144. data/scripts/.irbrc +0 -64
  145. data/scripts/launch.rb +0 -48
@@ -1,101 +0,0 @@
1
- require 'run_loop'
2
-
3
- module Calabash
4
- module Cucumber
5
-
6
- # @deprecated 0.11.4 Replaced with RunLoop::XCTools.
7
- # @!visibility private
8
- # Methods for interacting with the xcode tools.
9
- module XcodeTools
10
-
11
- # @deprecated 0.11.4 Replaced with RunLoop::XCTools.
12
- # Returns the path to the current developer directory.
13
- #
14
- # From the man pages:
15
- #
16
- # ```
17
- # $ man xcode-select
18
- # DEVELOPER_DIR
19
- # Overrides the active developer directory. When DEVELOPER_DIR is set,
20
- # its value will be used instead of the system-wide active developer
21
- # directory.
22
- #```
23
- #
24
- # @return [String] path to current developer directory
25
- def xcode_developer_dir
26
- _deprecated('0.11.4', 'Use RunLoop::XCTools', :warn)
27
- RunLoop::XCTools.new.xcode_developer_dir
28
- end
29
-
30
- # @deprecated 0.10.0 not replaced
31
- # Returns the path to the current developer `usr/bin` directory.
32
- # @return [String] path to the current xcode binaries
33
- def xcode_bin_dir
34
- _deprecated('0.10.0', 'no replacement', :warn)
35
- File.expand_path("#{xcode_developer_dir}/usr/bin")
36
- end
37
-
38
- # @deprecated 0.11.4 Replaced with RunLoop::XCTools.
39
- # Method for interacting with instruments.
40
- #
41
- # @example Getting the path to instruments.
42
- # instruments #=> /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
43
- #
44
- # @example Getting a the version of instruments.
45
- # instruments(:version) #=> 5.1.1
46
- #
47
- # @example Getting list of known simulators.
48
- # instruments(:sims) #=> < list of known simulators >
49
- #
50
- # @param [String] cmd controls the return value. currently accepts nil,
51
- # :sims, and :version as valid parameters
52
- # @return [String] based on the value of +cmd+ version, a list known
53
- # simulators, or the path to the instruments binary
54
- # @raise [ArgumentError] if invalid +cmd+ is passed
55
- def instruments(cmd=nil)
56
- instruments = 'xcrun instruments'
57
- return instruments if cmd == nil
58
- case cmd
59
- when :version
60
- _deprecated('0.11.4', 'Use RunLoop::XCTools', :warn)
61
- RunLoop::XCTools.new.instruments(cmd).to_s
62
- when :sims
63
- _deprecated('0.11.4', 'Use RunLoop::XCTools', :warn)
64
- RunLoop::XCTools.new.instruments(cmd)
65
- else
66
- candidates = [:version, :sims]
67
- raise(ArgumentError, "expected '#{cmd}' to be one of '#{candidates}'")
68
- end
69
- end
70
-
71
- # @deprecated 0.11.4 Replaced with RunLoop::XCTools.
72
- # Does the instruments `version` accept the -s flag?
73
- #
74
- # @example
75
- # instruments_supports_hyphen_s?('4.6.3') => false
76
- # instruments_supports_hyphen_s?('5.0.2') => true
77
- # instruments_supports_hyphen_s?('5.1') => true
78
- #
79
- # @param [String] version (instruments(:version))
80
- # a major.minor[.patch] version string
81
- #
82
- # @return [Boolean] true if the version is >= 5.*
83
- def instruments_supports_hyphen_s?(version)
84
- _deprecated('0.11.4', 'Use RunLoop::XCTools', :warn)
85
- RunLoop::XCTools.new.instruments_supports_hyphen_s?(version)
86
- end
87
-
88
- # @deprecated 0.11.4 Replaced with RunLoop::XCTools.
89
- # Returns a list of installed simulators by calling `$ instruments -s devices`.
90
- # and parsing the output
91
- # @return [Array<String>] an array of simulator names suitable for passing
92
- # to instruments or xcodebuild
93
- # @raise [RuntimeError] if the currently active instruments version does
94
- # not support the -s flag
95
- def installed_simulators
96
- _deprecated('0.11.4', 'Use RunLoop::XCTools', :warn)
97
- instruments(:sims)
98
- end
99
- end
100
- end
101
- end
data/scripts/.irbrc DELETED
@@ -1,64 +0,0 @@
1
- require 'rubygems'
2
- require 'irb/completion'
3
- require 'irb/ext/save-history'
4
-
5
- begin
6
- require 'awesome_print'
7
- rescue LoadError => e
8
- msg = ["Caught a LoadError: could not load 'awesome_print'",
9
- "#{e}",
10
- '',
11
- 'Use bundler (recommended) or uninstall awesome_print.',
12
- '',
13
- '# Use bundler (recommended)',
14
- '$ bundle update',
15
- '$ bundle exec calabash-ios console',
16
- '',
17
- '# Uninstall',
18
- '$ gem update --system',
19
- '$ gem uninstall -Vax --force --no-abort-on-dependent awesome_print']
20
- puts msg
21
- exit(1)
22
- end
23
-
24
- AwesomePrint.irb!
25
-
26
- ARGV.concat [ '--readline',
27
- '--prompt-mode',
28
- 'simple']
29
-
30
- IRB.conf[:SAVE_HISTORY] = 50
31
- IRB.conf[:HISTORY_FILE] = '.irb-history'
32
-
33
- require 'calabash-cucumber/operations'
34
-
35
- # legacy support - module was deprecated 0.9.169
36
- # and replaced with simulator_launcher
37
- require 'calabash-cucumber/launch/simulator_helper'
38
- require 'calabash-cucumber/launch/simulator_launcher'
39
- SIM=Calabash::Cucumber::SimulatorLauncher.new()
40
-
41
- extend Calabash::Cucumber::Operations
42
-
43
- def embed(x,y=nil,z=nil)
44
- puts "Screenshot at #{x}"
45
- end
46
-
47
- require "calabash-cucumber"
48
-
49
- def preferences
50
- Calabash::Cucumber::Preferences.new
51
- end
52
-
53
- def disable_usage_tracking
54
- preferences.usage_tracking = "none"
55
- puts "Calabash will not collect usage information."
56
- "none"
57
- end
58
-
59
- def enable_usage_tracking(level="system_info")
60
- preferences.usage_tracking = level
61
- puts "Calabash will collect statistics using the '#{level}' rule."
62
- level
63
- end
64
-
data/scripts/launch.rb DELETED
@@ -1,48 +0,0 @@
1
- ########################################
2
- # #
3
- # Important Note #
4
- # #
5
- # When running calabash-ios tests at #
6
- # www.xamarin.com/test-cloud #
7
- # this file will be overwritten by #
8
- # a file which automates #
9
- # app launch on devices. #
10
- # #
11
- # Don't rely on this file being #
12
- # present when running at #
13
- # Xamarin Test Cloud #
14
- # #
15
- ########################################
16
-
17
- require 'calabash-cucumber/launcher'
18
-
19
-
20
- # APP_BUNDLE_PATH = "#{ENV['HOME']}/Library/Developer/Xcode/DerivedData/??/Build/Products/Calabash-iphonesimulator/??.app"
21
- # You may uncomment the above to overwrite the APP_BUNDLE_PATH
22
- # However the recommended approach is to let Calabash find the app itself
23
- # or set the environment variable APP_BUNDLE_PATH
24
-
25
-
26
- Before do |scenario|
27
- @calabash_launcher = Calabash::Cucumber::Launcher.new
28
- unless @calabash_launcher.calabash_no_launch?
29
- @calabash_launcher.relaunch
30
- @calabash_launcher.calabash_notify(self)
31
- end
32
- end
33
-
34
- After do |scenario|
35
- unless @calabash_launcher.calabash_no_stop?
36
- calabash_exit
37
- if @calabash_launcher.active?
38
- @calabash_launcher.stop
39
- end
40
- end
41
- end
42
-
43
- at_exit do
44
- launcher = Calabash::Cucumber::Launcher.new
45
- if launcher.simulator_target?
46
- launcher.simulator_launcher.stop unless launcher.calabash_no_stop?
47
- end
48
- end