scan 0.1.2 → 0.2.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/README.md +17 -17
- data/lib/scan.rb +2 -0
- data/lib/scan/detect_values.rb +10 -5
- data/lib/scan/options.rb +5 -1
- data/lib/scan/report_collector.rb +1 -1
- data/lib/scan/slack_poster.rb +5 -0
- data/lib/scan/test_command_generator.rb +1 -0
- 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: 5847398571e8e145a606e3442ab41aa2c7f3380d
|
4
|
+
data.tar.gz: 06a306da319b3ae96f7c92ca2f1d28ee747887d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed3261bb9fc4d7fa7be8d97bb543a9e81fb50ae3603209c655370aeccb65257dd34ae5a90844be5bcb912209f0467c41d7a0db8af9aec7d5b1b93d4a9470b10b
|
7
|
+
data.tar.gz: 286a58e2f980e417a383ee845613f90b2d11ed2bfabd3e1c9c6de7db1b0591892aa3e51f4781e6a4e8ddb16908de8a7a72f9b6abfaec963719e3a2db67f735a7
|
data/README.md
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
<h3 align="center">
|
2
|
-
<a href="https://github.com/
|
2
|
+
<a href="https://github.com/fastlane/fastlane">
|
3
3
|
<img src="assets/fastlane.png" width="150" />
|
4
4
|
<br />
|
5
5
|
fastlane
|
6
6
|
</a>
|
7
7
|
</h3>
|
8
8
|
<p align="center">
|
9
|
-
<a href="https://github.com/
|
10
|
-
<a href="https://github.com/
|
11
|
-
<a href="https://github.com/
|
12
|
-
<a href="https://github.com/
|
13
|
-
<a href="https://github.com/
|
14
|
-
<a href="https://github.com/
|
15
|
-
<a href="https://github.com/
|
9
|
+
<a href="https://github.com/fastlane/deliver">deliver</a> •
|
10
|
+
<a href="https://github.com/fastlane/snapshot">snapshot</a> •
|
11
|
+
<a href="https://github.com/fastlane/frameit">frameit</a> •
|
12
|
+
<a href="https://github.com/fastlane/PEM">PEM</a> •
|
13
|
+
<a href="https://github.com/fastlane/sigh">sigh</a> •
|
14
|
+
<a href="https://github.com/fastlane/produce">produce</a> •
|
15
|
+
<a href="https://github.com/fastlane/cert">cert</a> •
|
16
16
|
<a href="https://github.com/fastlane/spaceship">spaceship</a> •
|
17
17
|
<a href="https://github.com/fastlane/pilot">pilot</a> •
|
18
18
|
<a href="https://github.com/fastlane/boarding">boarding</a> •
|
@@ -29,11 +29,11 @@ scan
|
|
29
29
|
============
|
30
30
|
|
31
31
|
[](https://twitter.com/KrauseFx)
|
32
|
-
[](https://github.com/fastlane/scan/blob/master/LICENSE)
|
33
33
|
[](http://rubygems.org/gems/scan)
|
34
34
|
[](https://travis-ci.org/fastlane/scan)
|
35
35
|
|
36
|
-
######
|
36
|
+
###### The easiest way to run tests of your iOS and Mac app
|
37
37
|
|
38
38
|
Get in contact with the developer on Twitter: [@KrauseFx](https://twitter.com/KrauseFx)
|
39
39
|
|
@@ -174,19 +174,19 @@ lane :test do
|
|
174
174
|
end
|
175
175
|
```
|
176
176
|
|
177
|
-
For more information visit the [fastlane GitHub page](https://github.com/
|
177
|
+
For more information visit the [fastlane GitHub page](https://github.com/fastlane/fastlane).
|
178
178
|
|
179
179
|
|
180
180
|
# Tips
|
181
181
|
## [`fastlane`](https://fastlane.tools) Toolchain
|
182
182
|
|
183
183
|
- [`fastlane`](https://fastlane.tools): Connect all deployment tools into one streamlined workflow
|
184
|
-
- [`deliver`](https://github.com/
|
185
|
-
- [`snapshot`](https://github.com/
|
186
|
-
- [`frameit`](https://github.com/
|
187
|
-
- [`PEM`](https://github.com/
|
188
|
-
- [`produce`](https://github.com/
|
189
|
-
- [`cert`](https://github.com/
|
184
|
+
- [`deliver`](https://github.com/fastlane/deliver): Upload screenshots, metadata and your app to the App Store
|
185
|
+
- [`snapshot`](https://github.com/fastlane/snapshot): Automate taking localized screenshots of your iOS app on every device
|
186
|
+
- [`frameit`](https://github.com/fastlane/frameit): Quickly put your screenshots into the right device frames
|
187
|
+
- [`PEM`](https://github.com/fastlane/PEM): Automatically generate and renew your push notification profiles
|
188
|
+
- [`produce`](https://github.com/fastlane/produce): Create new iOS apps on iTunes Connect and Dev Portal using the command line
|
189
|
+
- [`cert`](https://github.com/fastlane/cert): Automatically create and maintain iOS code signing certificates
|
190
190
|
- [`spaceship`](https://github.com/fastlane/spaceship): Ruby library to access the Apple Dev Center and iTunes Connect
|
191
191
|
- [`pilot`](https://github.com/fastlane/pilot): The best way to manage your TestFlight testers and builds from your terminal
|
192
192
|
- [`boarding`](https://github.com/fastlane/boarding): The easiest way to invite your TestFlight beta testers
|
data/lib/scan.rb
CHANGED
data/lib/scan/detect_values.rb
CHANGED
@@ -26,9 +26,13 @@ module Scan
|
|
26
26
|
config = Scan.config
|
27
27
|
|
28
28
|
if config[:device] # make sure it actually exists
|
29
|
-
|
29
|
+
|
30
|
+
device = config[:device].to_s.strip.tr('()', '') # Remove parenthesis
|
31
|
+
|
32
|
+
found = FastlaneCore::Simulator.all.find { |d| (d.name + " " + d.ios_version).include? device }
|
33
|
+
|
30
34
|
if found
|
31
|
-
|
35
|
+
Scan.device = found
|
32
36
|
return
|
33
37
|
else
|
34
38
|
Helper.log.error "Couldn't find simulator '#{config[:device]}' - falling back to default simulator".red
|
@@ -39,8 +43,9 @@ module Scan
|
|
39
43
|
found = FastlaneCore::Simulator.all.find { |d| d.name == "iPhone 5s" }
|
40
44
|
found ||= FastlaneCore::Simulator.all.first # anything is better than nothing
|
41
45
|
|
42
|
-
|
43
|
-
|
46
|
+
Scan.device = found
|
47
|
+
|
48
|
+
raise "No simulators found".red unless Scan.device
|
44
49
|
end
|
45
50
|
|
46
51
|
# Is it an iOS device or a Mac?
|
@@ -55,7 +60,7 @@ module Scan
|
|
55
60
|
|
56
61
|
# building up the destination now
|
57
62
|
if Scan.project.ios?
|
58
|
-
Scan.config[:destination] = "platform=iOS Simulator,id=#{Scan.
|
63
|
+
Scan.config[:destination] = "platform=iOS Simulator,id=#{Scan.device.udid}"
|
59
64
|
else
|
60
65
|
Scan.config[:destination] = "platform=OS X"
|
61
66
|
end
|
data/lib/scan/options.rb
CHANGED
@@ -30,7 +30,7 @@ module Scan
|
|
30
30
|
FastlaneCore::ConfigItem.new(key: :device,
|
31
31
|
short_option: "-a",
|
32
32
|
optional: true,
|
33
|
-
is_string:
|
33
|
+
is_string: true,
|
34
34
|
env_name: "SCAN_DEVICE",
|
35
35
|
description: "The name of the simulator type you want to run tests on"),
|
36
36
|
FastlaneCore::ConfigItem.new(key: :scheme,
|
@@ -100,6 +100,10 @@ module Scan
|
|
100
100
|
verify_block: proc do |value|
|
101
101
|
raise "Invalid URL, must start with https://" unless value.start_with? "https://"
|
102
102
|
end),
|
103
|
+
FastlaneCore::ConfigItem.new(key: :slack_channel,
|
104
|
+
env_name: "SCAN_SLACK_CHANNEL",
|
105
|
+
description: "#channel or @username",
|
106
|
+
optional: true),
|
103
107
|
FastlaneCore::ConfigItem.new(key: :skip_slack,
|
104
108
|
description: "Don't publish to slack, even when an URL is given",
|
105
109
|
is_string: false,
|
@@ -32,7 +32,7 @@ module Scan
|
|
32
32
|
end
|
33
33
|
|
34
34
|
file_name = "report.#{type}"
|
35
|
-
output_path = output_file_name || File.join(Scan.config[:output_directory], file_name)
|
35
|
+
output_path = output_file_name || File.join(File.expand_path(Scan.config[:output_directory]), file_name)
|
36
36
|
parts = ["cat '#{path}' | "]
|
37
37
|
parts << "xcpretty"
|
38
38
|
parts << "--report #{type}"
|
data/lib/scan/slack_poster.rb
CHANGED
@@ -9,6 +9,11 @@ module Scan
|
|
9
9
|
notifier = Slack::Notifier.new(Scan.config[:slack_url])
|
10
10
|
notifier.username = 'fastlane'
|
11
11
|
|
12
|
+
if Scan.config[:slack_channel].to_s.length > 0
|
13
|
+
notifier.channel = Scan.config[:slack_channel]
|
14
|
+
notifier.channel = ('#' + notifier.channel) unless ['#', '@'].include?(notifier.channel[0]) # send message to channel by default
|
15
|
+
end
|
16
|
+
|
12
17
|
attachments = []
|
13
18
|
|
14
19
|
attachments << {
|
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.2.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: 2015-10-
|
11
|
+
date: 2015-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|