calabash-cucumber 0.9.156 → 0.9.157

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 715059c1784340a903fff4c86c75cdb7cd42fe0c
4
- data.tar.gz: fdf778b06281f52038fb092212110c3f5dc33f21
3
+ metadata.gz: bf0f204dd4bfa1ef9a3fb65156d60064f1aa39ff
4
+ data.tar.gz: cd89efebec79f86f9cda89ce2f6d3e52d285940e
5
5
  SHA512:
6
- metadata.gz: e746d5950b9d3a7cb84e437f72d3e46703c827d0f22d7dc25284bf2f9d4cba6e5deb725a63eb5a4b4f5695bba65b8f4eb974f780e3813cf61fbe0b322d9357ae
7
- data.tar.gz: d4352489b765393b9c1ce26ae1c03fe1792bec13cf6f63e74819467c9d574bf0a445f5f29e3fda1bdf84a0ed93f8d4c8c181a865ddd5bdf8c0d82fd6661d67f6
6
+ metadata.gz: a4eee6bc0bcf795ce013c48e5f075c4943d9e2c95db2ccc92ada7d7dcdc43a68fe4be0b33576de239f4baf0988099bfcf617d91bc325fbf659a289f3dea05205
7
+ data.tar.gz: 7821e5a78b37d87351904536444ad46a31d0c981eb8cc84653e292cba70120d28fac39d261104f898881e38012efb1ac9dcb4a96006a9e12563868b5aa1864b5
@@ -203,8 +203,18 @@ module Calabash
203
203
  return nil unless project_dir
204
204
 
205
205
  ios_project_dir = Dir[File.join(project_dir,'*.iOS')].first
206
- return nil unless ios_project_dir && File.directory?(ios_project_dir)
207
- ios_project_dir
206
+ return ios_project_dir if ios_project_dir && File.directory?(ios_project_dir)
207
+ # ios_project_dir does not exist
208
+ # Detect case where there is no such sub directory
209
+ # (i.e. iOS only Xamarin project)
210
+ bin_dir = File.join(project_dir, 'bin')
211
+ if File.directory?(bin_dir) &&
212
+ (File.directory?(File.join(bin_dir,'iPhoneSimulator')) ||
213
+ File.directory?(File.join(bin_dir,'iPhone')))
214
+ return project_dir ## Looks like iOS bin dir is here
215
+ end
216
+
217
+
208
218
  end
209
219
 
210
220
  def self.bundle_path_from_xamarin_project(device_build_dir='iPhoneSimulator')
@@ -107,7 +107,7 @@ class Calabash::Cucumber::Launcher
107
107
  return :instruments unless sdk_version
108
108
  return :instruments if sdk_version.start_with?('7') # Only instruments supported for iOS7+
109
109
  sim_detector = SimLauncher::SdkDetector.new()
110
- available = sim_detector.available_sdk_versions.reject {|v| v.start_with?('7')}
110
+ available = sim_detector.available_sdk_versions.reject { |v| v.start_with?('7') }
111
111
  if available.include?(sdk_version)
112
112
  :sim_launcher
113
113
  else
@@ -122,6 +122,18 @@ class Calabash::Cucumber::Launcher
122
122
 
123
123
  args[:app] = args[:app] || args[:bundle_id] || app_path || detect_app_bundle_from_args(args)
124
124
 
125
+
126
+ if args[:app]
127
+ if File.directory?(args[:app])
128
+ args[:app] = File.expand_path(args[:app])
129
+ else
130
+ # args[:app] is not a directory so must be a bundle id
131
+ if args[:device_target] == 'simulator' ## bundle id set, but simulator target
132
+ args[:app] = app_path || detect_app_bundle_from_args(args)
133
+ end
134
+ end
135
+ end
136
+
125
137
  unless args[:app]
126
138
  if args[:device_target]=='simulator'
127
139
  device_xamarin_build_dir = 'iPhoneSimulator'
@@ -131,12 +143,8 @@ class Calabash::Cucumber::Launcher
131
143
  args[:app] = Calabash::Cucumber::SimulatorHelper.app_bundle_or_raise(app_path, device_xamarin_build_dir)
132
144
  end
133
145
 
134
- if File.directory?(args[:app])
135
- args[:app] = File.expand_path(args[:app])
136
- end
137
-
138
146
  args[:bundle_id] ||= detect_bundle_id_from_app_bundle(args)
139
-
147
+
140
148
  args[:device] ||= detect_device_from_args(args)
141
149
 
142
150
 
@@ -288,7 +296,6 @@ class Calabash::Cucumber::Launcher
288
296
  end
289
297
 
290
298
 
291
-
292
299
  def info_plist_as_hash(plist_path)
293
300
  unless File.exist?(plist_path)
294
301
  raise "Unable to find Info.plist: #{plist_path}"
@@ -1,6 +1,6 @@
1
1
  module Calabash
2
2
  module Cucumber
3
- VERSION = '0.9.156'
3
+ VERSION = '0.9.157'
4
4
  FRAMEWORK_VERSION = '0.9.155'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.156
4
+ version: 0.9.157
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-11 00:00:00.000000000 Z
11
+ date: 2013-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber