scan 0.5.1 → 0.5.2
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/scan/detect_values.rb +13 -14
- data/lib/scan/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e45976649b2e9fd5eb6c7dec135c9972d14fc49a
|
4
|
+
data.tar.gz: a750b23c56d56e7918c200f242ba3452cac5bcaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa2e8fbdc5593c33e9beb4fabb2cec95dbb9a5482a7584fce1c07800eb415bee302a3e77318ea2965316662a9fdd695fdbc76945be2cd6c52771f3fe75328071
|
7
|
+
data.tar.gz: 1474af4717f5c30f7d10fadd0cce22a3d678728f0e5ad63a1aad05c7add87781de40071c679511da125bbf1d2966e514ee15c8962211c2c2ab3e71d3a334176c
|
data/lib/scan/detect_values.rb
CHANGED
@@ -27,6 +27,15 @@ module Scan
|
|
27
27
|
return config
|
28
28
|
end
|
29
29
|
|
30
|
+
def self.filter_simulators(simulators, deployment_target)
|
31
|
+
# Filter out any simulators that are not the same major and minor version of our deployment target
|
32
|
+
deployment_target_version = Gem::Version.new(deployment_target)
|
33
|
+
simulators.select do |s|
|
34
|
+
sim_version = Gem::Version.new(s.ios_version)
|
35
|
+
(sim_version >= deployment_target_version)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
30
39
|
def self.default_device_ios
|
31
40
|
config = Scan.config
|
32
41
|
|
@@ -47,15 +56,10 @@ module Scan
|
|
47
56
|
|
48
57
|
sims = FastlaneCore::Simulator.all
|
49
58
|
xcode_target = Scan.project.build_settings(key: "IPHONEOS_DEPLOYMENT_TARGET")
|
50
|
-
|
51
|
-
# Filter out any simulators that are not the same major version of our deployment target
|
52
|
-
if xcode_target.to_s.length > 0
|
53
|
-
min_target = xcode_target.split(".").first.to_i
|
54
|
-
sims = sims.select { |s| s.ios_version.to_i >= min_target }
|
55
|
-
end
|
59
|
+
sims = filter_simulators(sims, xcode_target)
|
56
60
|
|
57
61
|
# An iPhone 5s is reasonable small and useful for tests
|
58
|
-
found = sims.
|
62
|
+
found = sims.detect { |d| d.name == "iPhone 5s" }
|
59
63
|
found ||= sims.first # anything is better than nothing
|
60
64
|
|
61
65
|
Scan.device = found
|
@@ -83,15 +87,10 @@ module Scan
|
|
83
87
|
|
84
88
|
sims = FastlaneCore::SimulatorTV.all
|
85
89
|
xcode_target = Scan.project.build_settings(key: "TVOS_DEPLOYMENT_TARGET")
|
86
|
-
|
87
|
-
# Filter out any simulators that are not the same major version of our deployment target
|
88
|
-
if xcode_target.to_s.length > 0
|
89
|
-
min_target = xcode_target.split(".").first.to_i
|
90
|
-
sims = sims.select { |s| s.ios_version.to_i >= min_target }
|
91
|
-
end
|
90
|
+
sims = filter_simulators(sims, xcode_target)
|
92
91
|
|
93
92
|
# Apple TV 1080p is useful for tests
|
94
|
-
found = sims.
|
93
|
+
found = sims.detect { |d| d.name == "Apple TV 1080p" }
|
95
94
|
found ||= sims.first # anything is better than nothing
|
96
95
|
|
97
96
|
Scan.device = found
|
data/lib/scan/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
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-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|