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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4fcd5b3694c5b5a674846f6afdc47d9b69bee38f
4
- data.tar.gz: 8355da41535f75c286004c00917c5b70a6997b31
3
+ metadata.gz: eee61874d45cf5a644357bbb94f66e192c7fbf21
4
+ data.tar.gz: f87c5f01be803264e51e31aa5d90ae24c10d6e90
5
5
  SHA512:
6
- metadata.gz: 263e85bb0b112f15639b3242d2855c4f0002001048bf1b16b5b2c813ece268bcb837080935926250729c9dad7d79c50130098ec4e18ad3ac50935368db87df34
7
- data.tar.gz: f1ec4ed7d7e002a190959c88f85c2f1b4e5c3256101be838cbe2538b60559259f0053ef47c3f1d92f9362f4451660feb09f07de9827a038cd9d3f8ce8b2cb206
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
-
@@ -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
@@ -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
-
@@ -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
- dd_dir = Calabash::Cucumber::SimulatorLauncher.new().derived_data_dir_for_project
173
- if not dd_dir
174
- puts "Unable to find iOS XCode project."
175
- puts "You should run this command from an XCode project directory."
176
- exit 1
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
@@ -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
@@ -67,7 +67,6 @@ def console
67
67
  require 'frank-calabash'
68
68
  require 'calabash-cucumber/operations'
69
69
  require 'pry'
70
- ENV['CALABASH_VERSION_PATH']='calabash_version'
71
70
  console = Frank::Console.new
72
71
  console.extend ::Frank::Calabash
73
72
 
@@ -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