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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7cbb5bf98cb9c814b56611f39b4f7aba298d144
4
- data.tar.gz: 5385adfb2b292eee5aece77a826a113a0b380b63
3
+ metadata.gz: 5847398571e8e145a606e3442ab41aa2c7f3380d
4
+ data.tar.gz: 06a306da319b3ae96f7c92ca2f1d28ee747887d2
5
5
  SHA512:
6
- metadata.gz: 16b793245f4d36a08c1662b15d6542ccccd1c1e0b252a5f6f54e1377ccb6ca46fcbe95b52744d856abdffcbd809da8fdc107bc93a2e6f0f25606cce79855b1a6
7
- data.tar.gz: 6e2bc2ba81da7e3035815f822c15c9b39862bd0ead11b5be04b14c6bd43a03b07602d70d2f9307acdb7a2df270447fa8292f8049af0d47baebadf84276f4a356
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/KrauseFx/fastlane">
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/KrauseFx/deliver">deliver</a> &bull;
10
- <a href="https://github.com/KrauseFx/snapshot">snapshot</a> &bull;
11
- <a href="https://github.com/KrauseFx/frameit">frameit</a> &bull;
12
- <a href="https://github.com/KrauseFx/PEM">PEM</a> &bull;
13
- <a href="https://github.com/KrauseFx/sigh">sigh</a> &bull;
14
- <a href="https://github.com/KrauseFx/produce">produce</a> &bull;
15
- <a href="https://github.com/KrauseFx/cert">cert</a> &bull;
9
+ <a href="https://github.com/fastlane/deliver">deliver</a> &bull;
10
+ <a href="https://github.com/fastlane/snapshot">snapshot</a> &bull;
11
+ <a href="https://github.com/fastlane/frameit">frameit</a> &bull;
12
+ <a href="https://github.com/fastlane/PEM">PEM</a> &bull;
13
+ <a href="https://github.com/fastlane/sigh">sigh</a> &bull;
14
+ <a href="https://github.com/fastlane/produce">produce</a> &bull;
15
+ <a href="https://github.com/fastlane/cert">cert</a> &bull;
16
16
  <a href="https://github.com/fastlane/spaceship">spaceship</a> &bull;
17
17
  <a href="https://github.com/fastlane/pilot">pilot</a> &bull;
18
18
  <a href="https://github.com/fastlane/boarding">boarding</a> &bull;
@@ -29,11 +29,11 @@ scan
29
29
  ============
30
30
 
31
31
  [![Twitter: @KauseFx](https://img.shields.io/badge/contact-@KrauseFx-blue.svg?style=flat)](https://twitter.com/KrauseFx)
32
- [![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/scan/blob/master/LICENSE)
32
+ [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/scan/blob/master/LICENSE)
33
33
  [![Gem](https://img.shields.io/gem/v/scan.svg?style=flat)](http://rubygems.org/gems/scan)
34
34
  [![Build Status](https://img.shields.io/travis/fastlane/scan/master.svg?style=flat)](https://travis-ci.org/fastlane/scan)
35
35
 
36
- ###### Building your app has never been easier
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/KrauseFx/fastlane).
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/KrauseFx/deliver): Upload screenshots, metadata and your app to the App Store
185
- - [`snapshot`](https://github.com/KrauseFx/snapshot): Automate taking localized screenshots of your iOS app on every device
186
- - [`frameit`](https://github.com/KrauseFx/frameit): Quickly put your screenshots into the right device frames
187
- - [`PEM`](https://github.com/KrauseFx/pem): Automatically generate and renew your push notification profiles
188
- - [`produce`](https://github.com/KrauseFx/produce): Create new iOS apps on iTunes Connect and Dev Portal using the command line
189
- - [`cert`](https://github.com/KrauseFx/cert): Automatically create and maintain iOS code signing certificates
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
@@ -20,6 +20,8 @@ module Scan
20
20
 
21
21
  attr_accessor :cache
22
22
 
23
+ attr_accessor :device
24
+
23
25
  def config=(value)
24
26
  @config = value
25
27
  DetectValues.set_additional_default_values
@@ -26,9 +26,13 @@ module Scan
26
26
  config = Scan.config
27
27
 
28
28
  if config[:device] # make sure it actually exists
29
- found = FastlaneCore::Simulator.all.find { |d| d.name == config[:device].to_s.strip }
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
- config[:device] = found
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
- config[:device] = found
43
- raise "No simulators found".red unless config[:device]
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.config[:device].udid}"
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
@@ -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: false,
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}"
@@ -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 << {
@@ -45,6 +45,7 @@ module Scan
45
45
 
46
46
  actions = []
47
47
  actions << :clean if config[:clean]
48
+ actions << :build
48
49
  actions << :test
49
50
 
50
51
  actions
@@ -1,4 +1,4 @@
1
1
  module Scan
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  DESCRIPTION = "Making sure no bad code gets on board"
4
4
  end
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.1.2
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-23 00:00:00.000000000 Z
11
+ date: 2015-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core