calabash-cucumber 0.9.154 → 0.9.155
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-setup.rb +21 -38
- data/lib/calabash-cucumber/launcher.rb +9 -0
- data/lib/calabash-cucumber/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 476d8e33d00c1b137a2dda6aaee55b59dea7cf8e
|
4
|
+
data.tar.gz: b9a84573f62e8bf7d6a38ba18ead4f93c3ff9d6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2d4bb51ffcedc670c91e41dd8c3859d2b7df20b8b23ed774b2599755c65cd892672f2032896a9307aa70f7213e5d070ca7374419ad3bec4b647efc76478076b
|
7
|
+
data.tar.gz: 88d85b46a59cab625f53fd02a110ee303ee3e23a8099bfb90bb61dd13d32dcbf3603f3cb256fc2f4475c9e30031c8d1e600cd9555a8088996d38cb595ca92e68
|
data/bin/calabash-ios-setup.rb
CHANGED
@@ -25,32 +25,28 @@ end
|
|
25
25
|
def calabash_setup(args)
|
26
26
|
puts "Checking if Xcode is running..."
|
27
27
|
res = `ps x -o pid,command | grep -v grep | grep Contents/MacOS/Xcode`
|
28
|
-
|
29
|
-
puts "Xcode
|
30
|
-
|
31
|
-
setup_project(project_name, project_path, xpath)
|
32
|
-
|
33
|
-
detect_accessibility_support
|
34
|
-
|
35
|
-
msg("Setup done") do
|
36
|
-
|
37
|
-
puts "Please validate by running the -cal target"
|
38
|
-
puts "from Xcode."
|
39
|
-
puts "When starting the iOS Simulator using the"
|
40
|
-
puts "new -cal target, you should see:\n\n"
|
41
|
-
puts ' "Started LPHTTP server on port 37265"'
|
42
|
-
puts "\nin the application log in Xcode."
|
43
|
-
puts "\n\n"
|
44
|
-
puts "After validating, you can generate a features folder:"
|
45
|
-
puts "Go to your project (the dir containing the .xcodeproj file)."
|
46
|
-
puts "Then run calabash-ios gen"
|
47
|
-
puts "(if you don't already have a features folder)."
|
48
|
-
end
|
28
|
+
unless res==""
|
29
|
+
puts "Detected running Xcode. You may need to restart Xcode after setup."
|
30
|
+
end
|
49
31
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
32
|
+
project_name, project_path, xpath = find_project_files(args)
|
33
|
+
setup_project(project_name, project_path, xpath)
|
34
|
+
|
35
|
+
detect_accessibility_support
|
36
|
+
|
37
|
+
msg("Setup done") do
|
38
|
+
|
39
|
+
puts "Please validate by running the -cal target"
|
40
|
+
puts "from Xcode."
|
41
|
+
puts "When starting the iOS Simulator using the"
|
42
|
+
puts "new -cal target, you should see:\n\n"
|
43
|
+
puts ' "Started LPHTTP server on port 37265"'
|
44
|
+
puts "\nin the application log in Xcode."
|
45
|
+
puts "\n\n"
|
46
|
+
puts "After validating, you can generate a features folder:"
|
47
|
+
puts "Go to your project (the dir containing the .xcodeproj file)."
|
48
|
+
puts "Then run calabash-ios gen"
|
49
|
+
puts "(if you don't already have a features folder)."
|
54
50
|
end
|
55
51
|
end
|
56
52
|
|
@@ -136,19 +132,6 @@ def setup_project(project_name, project_path, path)
|
|
136
132
|
exit 1
|
137
133
|
end
|
138
134
|
|
139
|
-
FileUtils.cd project_path do
|
140
|
-
##Backup
|
141
|
-
if File.exists? "#{proj_file}.bak"
|
142
|
-
msg("Error") do
|
143
|
-
puts "Backup file already exists. #{proj_file}.bak"
|
144
|
-
puts "For safety, I won't overwrite this file."
|
145
|
-
puts "You must manually move this file, if you want to"
|
146
|
-
puts "Run calabash-ios setup again."
|
147
|
-
end
|
148
|
-
exit 1
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
135
|
download_calabash(project_path)
|
153
136
|
|
154
137
|
msg("Info") do
|
@@ -122,6 +122,15 @@ 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
|
+
unless args[:app]
|
126
|
+
if args[:device_target]=='simulator'
|
127
|
+
device_xamarin_build_dir = 'iPhoneSimulator'
|
128
|
+
else
|
129
|
+
device_xamarin_build_dir = 'iPhone'
|
130
|
+
end
|
131
|
+
args[:app] = Calabash::Cucumber::SimulatorHelper.app_bundle_or_raise(app_path, device_xamarin_build_dir)
|
132
|
+
end
|
133
|
+
|
125
134
|
if File.directory?(args[:app])
|
126
135
|
args[:app] = File.expand_path(args[:app])
|
127
136
|
end
|