snapshot 1.14.0 → 1.15.0
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/lib/snapshot/runner.rb +1 -1
- data/lib/snapshot/test_command_generator.rb +10 -5
- data/lib/snapshot/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ab0c8a90c25504323f9cb4e593420b2398cc4a2
|
4
|
+
data.tar.gz: eaa725687e667a1f60eff7fa461086edf805d9a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f84ab4ea8dbcbadbc5438caa9eb9527817b4eaf44a8388ed56c0eb0bd5a497937318cb3e8742af1358e6502a61c1c1a1bfbf40883235d32baa5d8add79b8004b
|
7
|
+
data.tar.gz: 18447383ca6317df228bcbce85c12e2ce999d69093ed28bac4e2cdb8412ad0468652cc3dcc43a96c3eb96972b0c789157fb9bcd136bcc2259f0879ba8c4fc290
|
data/lib/snapshot/runner.rb
CHANGED
@@ -203,7 +203,7 @@ module Snapshot
|
|
203
203
|
|
204
204
|
def uninstall_app(device_type)
|
205
205
|
UI.verbose "Uninstalling app '#{Snapshot.config[:app_identifier]}' from #{device_type}..."
|
206
|
-
Snapshot.config[:app_identifier] ||=
|
206
|
+
Snapshot.config[:app_identifier] ||= UI.input("App Identifier: ")
|
207
207
|
device_udid = TestCommandGenerator.device_udid(device_type)
|
208
208
|
|
209
209
|
UI.message "Launch Simulator #{device_type}"
|
@@ -64,7 +64,7 @@ module Snapshot
|
|
64
64
|
["| tee #{xcodebuild_log_path.shellescape} | xcpretty #{Snapshot.config[:xcpretty_args]}"]
|
65
65
|
end
|
66
66
|
|
67
|
-
def find_device(device_name, os_version)
|
67
|
+
def find_device(device_name, os_version = Snapshot.config[:ios_version])
|
68
68
|
# We might get this error message
|
69
69
|
# > The requested device could not be found because multiple devices matched the request.
|
70
70
|
#
|
@@ -72,10 +72,13 @@ module Snapshot
|
|
72
72
|
# { platform:iOS Simulator, id:1685B071-AFB2-4DC1-BE29-8370BA4A6EBD, OS:9.0, name:iPhone 5 }
|
73
73
|
# { platform:iOS Simulator, id:A141F23B-96B3-491A-8949-813B376C28A7, OS:9.0, name:iPhone 5 }
|
74
74
|
#
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
75
|
+
simulators = FastlaneCore::DeviceManager.simulators
|
76
|
+
# Sort devices with matching names by OS version, largest first, so that we can
|
77
|
+
# pick the device with the newest OS in case an exact OS match is not available
|
78
|
+
name_matches = simulators.find_all { |sim| sim.name.strip == device_name.strip }
|
79
|
+
.sort_by { |sim| Gem::Version.new(sim.os_version) }
|
80
|
+
.reverse
|
81
|
+
name_matches.find { |sim| sim.os_version == os_version } || name_matches.first
|
79
82
|
end
|
80
83
|
|
81
84
|
def device_udid(device_name, os_version = Snapshot.config[:ios_version])
|
@@ -92,6 +95,8 @@ module Snapshot
|
|
92
95
|
if device.nil?
|
93
96
|
UI.user_error!("No device found named '#{device_name}' for version '#{os_version}'")
|
94
97
|
return
|
98
|
+
elsif device.os_version != os_version
|
99
|
+
UI.important("Using device named '#{device_name}' with version '#{device.os_version}' because no match was found for version '#{os_version}'")
|
95
100
|
end
|
96
101
|
value = "platform=#{os} Simulator,id=#{device.udid},OS=#{os_version}"
|
97
102
|
|
data/lib/snapshot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snapshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastimage
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.52.0
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 1.0.0
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
43
|
+
version: 0.52.0
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 1.0.0
|