scan 0.13.1 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -4
- data/lib/scan/detect_values.rb +17 -20
- data/lib/scan/manager.rb +5 -1
- data/lib/scan/report_collector.rb +5 -2
- data/lib/scan/version.rb +1 -1
- metadata +34 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efbfefb415b5b35b6067792da7f1c28c80b1537a
|
4
|
+
data.tar.gz: 641bb65467afb77e05ce248815277c895b613a7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3765d20a20ceca97cc2ffd3d69e1538221a222a89dfff3f7df3ec1ae88dc23d6531d4a250a5672e922381a4e55cfa0b4cc8a43f5351866f2186eb78419cd73da
|
7
|
+
data.tar.gz: 7b153f0fe1a86530f96038e46a199369e4bdbbe75bd7c61e1f5c9f3e2bfe6d39830614d6f5946a423dc4846b10d7d26ce97c172fbf5a81f11ee0b123fff43a0d
|
data/README.md
CHANGED
@@ -32,11 +32,10 @@ scan
|
|
32
32
|
[![Twitter: @FastlaneTools](https://img.shields.io/badge/contact-@FastlaneTools-blue.svg?style=flat)](https://twitter.com/FastlaneTools)
|
33
33
|
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/fastlane/blob/master/scan/LICENSE)
|
34
34
|
[![Gem](https://img.shields.io/gem/v/scan.svg?style=flat)](http://rubygems.org/gems/scan)
|
35
|
-
[![Build Status](https://img.shields.io/circleci/project/fastlane/fastlane/master.svg?style=flat)](https://circleci.com/gh/fastlane/fastlane)
|
36
35
|
|
37
36
|
###### The easiest way to run tests of your iOS and Mac app
|
38
37
|
|
39
|
-
`scan` makes it easy to run tests of your iOS and Mac app on a simulator or connected device.
|
38
|
+
`scan` makes it easy to run tests of your iOS and Mac app on a simulator or connected device.
|
40
39
|
|
41
40
|
Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.com/FastlaneTools)
|
42
41
|
|
@@ -51,7 +50,7 @@ Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.c
|
|
51
50
|
|
52
51
|
-------
|
53
52
|
|
54
|
-
<h5 align="center"><code>scan</code> is part of <a href="https://fastlane.tools">fastlane</a>: The easiest way to automate
|
53
|
+
<h5 align="center"><code>scan</code> is part of <a href="https://fastlane.tools">fastlane</a>: The easiest way to automate beta deployments and releases for your iOS and Android apps.</h5>
|
55
54
|
|
56
55
|
# What's scan?
|
57
56
|
|
@@ -193,7 +192,7 @@ For more information visit the [fastlane GitHub page](https://github.com/fastlan
|
|
193
192
|
# Tips
|
194
193
|
## [`fastlane`](https://fastlane.tools) Toolchain
|
195
194
|
|
196
|
-
- [`fastlane`](https://fastlane.tools): The easiest way to automate
|
195
|
+
- [`fastlane`](https://fastlane.tools): The easiest way to automate beta deployments and releases for your iOS and Android apps
|
197
196
|
- [`deliver`](https://github.com/fastlane/fastlane/tree/master/deliver): Upload screenshots, metadata and your app to the App Store
|
198
197
|
- [`snapshot`](https://github.com/fastlane/fastlane/tree/master/snapshot): Automate taking localized screenshots of your iOS app on every device
|
199
198
|
- [`frameit`](https://github.com/fastlane/fastlane/tree/master/frameit): Quickly put your screenshots into the right device frames
|
data/lib/scan/detect_values.rb
CHANGED
@@ -14,14 +14,24 @@ module Scan
|
|
14
14
|
Scan.project = FastlaneCore::Project.new(config)
|
15
15
|
|
16
16
|
# Go into the project's folder, as there might be a Snapfile there
|
17
|
+
imported_path = File.expand_path(Scan.scanfile_name)
|
17
18
|
Dir.chdir(File.expand_path("..", Scan.project.path)) do
|
18
|
-
config.load_configuration_file(Scan.scanfile_name)
|
19
|
+
config.load_configuration_file(Scan.scanfile_name) unless File.expand_path(Scan.scanfile_name) == imported_path
|
19
20
|
end
|
20
21
|
|
21
22
|
Scan.project.select_scheme
|
22
23
|
|
23
|
-
|
24
|
-
|
24
|
+
devices = Scan.config[:devices] || Array(Scan.config[:device]) # important to use Array(nil) for when the value is nil
|
25
|
+
if devices.count > 0
|
26
|
+
detect_simulator(devices, '', '', '', nil)
|
27
|
+
else
|
28
|
+
if Scan.project.ios?
|
29
|
+
# An iPhone 5s is a reasonably small and useful default for tests
|
30
|
+
detect_simulator(devices, 'iOS', 'IPHONEOS_DEPLOYMENT_TARGET', 'iPhone 5s', nil)
|
31
|
+
elsif Scan.project.tvos?
|
32
|
+
detect_simulator(devices, 'tvOS', 'TVOS_DEPLOYMENT_TARGET', 'Apple TV 1080p', 'TV')
|
33
|
+
end
|
34
|
+
end
|
25
35
|
detect_destination
|
26
36
|
|
27
37
|
default_derived_data
|
@@ -66,20 +76,10 @@ module Scan
|
|
66
76
|
/\s(?=\([\d\.]+\)$)/
|
67
77
|
end
|
68
78
|
|
69
|
-
def self.
|
70
|
-
# An iPhone 5s is a reasonably small and useful default for tests
|
71
|
-
detect_simulator('iOS', 'IPHONEOS_DEPLOYMENT_TARGET', 'iPhone 5s', nil)
|
72
|
-
end
|
73
|
-
|
74
|
-
def self.detect_simulator_tvos
|
75
|
-
detect_simulator('tvOS', 'TVOS_DEPLOYMENT_TARGET', 'Apple TV 1080p', 'TV')
|
76
|
-
end
|
77
|
-
|
78
|
-
def self.detect_simulator(requested_os_type, deployment_target_key, default_device_name, simulator_type_descriptor)
|
79
|
+
def self.detect_simulator(devices, requested_os_type, deployment_target_key, default_device_name, simulator_type_descriptor)
|
79
80
|
require 'set'
|
80
|
-
devices = Scan.config[:devices] || Array(Scan.config[:device]) # important to use Array(nil) for when the value is nil
|
81
81
|
|
82
|
-
deployment_target_version = Scan.project.build_settings(key: deployment_target_key)
|
82
|
+
deployment_target_version = Scan.project.build_settings(key: deployment_target_key) || '0'
|
83
83
|
|
84
84
|
simulators = filter_simulators(
|
85
85
|
FastlaneCore::DeviceManager.simulators(requested_os_type).tap do |array|
|
@@ -162,7 +162,6 @@ module Scan
|
|
162
162
|
Helper.xcode_version.split(".").first.to_i >= 8
|
163
163
|
end
|
164
164
|
|
165
|
-
# Is it an iOS, a tvOS or a macOS device?
|
166
165
|
def self.detect_destination
|
167
166
|
if Scan.config[:destination]
|
168
167
|
UI.important("It's not recommended to set the `destination` value directly")
|
@@ -173,10 +172,8 @@ module Scan
|
|
173
172
|
end
|
174
173
|
|
175
174
|
# building up the destination now
|
176
|
-
if Scan.
|
177
|
-
Scan.config[:destination] = Scan.devices.map { |d| "platform
|
178
|
-
elsif Scan.project.tvos?
|
179
|
-
Scan.config[:destination] = Scan.devices.map { |d| "platform=tvOS Simulator,id=#{d.udid}" }
|
175
|
+
if Scan.devices.count > 0
|
176
|
+
Scan.config[:destination] = Scan.devices.map { |d| "platform=#{d.os_type} Simulator,id=#{d.udid}" }
|
180
177
|
else
|
181
178
|
Scan.config[:destination] = min_xcode8? ? ["platform=macOS"] : ["platform=OS X"]
|
182
179
|
end
|
data/lib/scan/manager.rb
CHANGED
@@ -3,7 +3,11 @@ module Scan
|
|
3
3
|
def work(options)
|
4
4
|
Scan.config = options
|
5
5
|
|
6
|
-
|
6
|
+
# Also print out the path to the used Xcode installation
|
7
|
+
# We go 2 folders up, to not show "Contents/Developer/"
|
8
|
+
values = Scan.config.values(ask: false)
|
9
|
+
values[:xcode_path] = File.expand_path("../..", FastlaneCore::Helper.xcode_path)
|
10
|
+
FastlaneCore::PrintTable.print_values(config: values,
|
7
11
|
hide_keys: [:destination, :slack_url],
|
8
12
|
title: "Summary for scan #{Scan::VERSION}")
|
9
13
|
|
@@ -16,8 +16,11 @@ module Scan
|
|
16
16
|
|
17
17
|
commands = generate_commands(path)
|
18
18
|
commands.each do |output_path, command|
|
19
|
-
system(command)
|
20
|
-
|
19
|
+
if system(command)
|
20
|
+
UI.success("Successfully generated report at '#{output_path}'")
|
21
|
+
else
|
22
|
+
UI.user_error!("Failed to generate report at '#{output_path}'")
|
23
|
+
end
|
21
24
|
|
22
25
|
if @open_report and output_path.end_with?(".html")
|
23
26
|
# Open the HTML file
|
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.
|
4
|
+
version: 0.14.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-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.53.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.53.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.0
|
@@ -36,14 +36,20 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.2.
|
39
|
+
version: 0.2.4
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 1.0.0
|
40
43
|
type: :runtime
|
41
44
|
prerelease: false
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
43
46
|
requirements:
|
44
47
|
- - ">="
|
45
48
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.2.
|
49
|
+
version: 0.2.4
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 1.0.0
|
47
53
|
- !ruby/object:Gem::Dependency
|
48
54
|
name: xcpretty-travis-formatter
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,14 +84,20 @@ dependencies:
|
|
78
84
|
requirements:
|
79
85
|
- - ">="
|
80
86
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
87
|
+
version: 1.4.5
|
88
|
+
- - "<"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 2.0.0
|
82
91
|
type: :runtime
|
83
92
|
prerelease: false
|
84
93
|
version_requirements: !ruby/object:Gem::Requirement
|
85
94
|
requirements:
|
86
95
|
- - ">="
|
87
96
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
97
|
+
version: 1.4.5
|
98
|
+
- - "<"
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 2.0.0
|
89
101
|
- !ruby/object:Gem::Dependency
|
90
102
|
name: bundler
|
91
103
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,20 +140,6 @@ dependencies:
|
|
128
140
|
- - ">="
|
129
141
|
- !ruby/object:Gem::Version
|
130
142
|
version: '0'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: rubocop
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - "~>"
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: 0.38.0
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - "~>"
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: 0.38.0
|
145
143
|
- !ruby/object:Gem::Dependency
|
146
144
|
name: rspec
|
147
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,6 +224,20 @@ dependencies:
|
|
226
224
|
- - ">="
|
227
225
|
- !ruby/object:Gem::Version
|
228
226
|
version: '0'
|
227
|
+
- !ruby/object:Gem::Dependency
|
228
|
+
name: rubocop
|
229
|
+
requirement: !ruby/object:Gem::Requirement
|
230
|
+
requirements:
|
231
|
+
- - "~>"
|
232
|
+
- !ruby/object:Gem::Version
|
233
|
+
version: 0.44.0
|
234
|
+
type: :development
|
235
|
+
prerelease: false
|
236
|
+
version_requirements: !ruby/object:Gem::Requirement
|
237
|
+
requirements:
|
238
|
+
- - "~>"
|
239
|
+
- !ruby/object:Gem::Version
|
240
|
+
version: 0.44.0
|
229
241
|
description: The easiest way to run tests of your iOS and Mac app
|
230
242
|
email:
|
231
243
|
- scan@krausefx.com
|