xcov 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -9
- data/lib/xcov/model/report.rb +9 -3
- data/lib/xcov/options.rb +5 -0
- data/lib/xcov/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: 61d71177e02e5309208870af2792be985ee85401
|
4
|
+
data.tar.gz: 278e621bda56cfade3452f8704b84fbfe0e9ab2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 472c701c1c429a60bb9a3bb57a8f19cc68f671d789fb629a18b4367cf24c7da3d9261505aeab5d91db029fa64989a45e4df7f32d5b043b0d77138594376d8fa5
|
7
|
+
data.tar.gz: a6895a791a25380b32cac92820920aed33297177d24199b9a0e39c9c6838e9b9f7fd3676f57054ce2367d7e8e8560ea526c6c6eaea68f1b269d528f55211d7d7
|
data/README.md
CHANGED
@@ -38,15 +38,16 @@ xcov -w LystSDK.xcworkspace -s LystSDK -o xcov_output
|
|
38
38
|
```
|
39
39
|
|
40
40
|
### Parameters allowed
|
41
|
-
*
|
42
|
-
*
|
43
|
-
*
|
44
|
-
*
|
45
|
-
*
|
46
|
-
*
|
47
|
-
*
|
48
|
-
* `
|
49
|
-
* `
|
41
|
+
* `--workspace` `-w`: Path of your `xcworkspace` file.
|
42
|
+
* `--project` `-p`: Path of your `xcodeproj` file (optional).
|
43
|
+
* `--scheme` `-s`: Scheme of the project to analyze.
|
44
|
+
* `--output_directory` `-o`: Path for the output folder where the report files will be saved.
|
45
|
+
* `--derived_data_path` `-j`: Path of your project `Derived Data` folder (optional).
|
46
|
+
* `--minimum_coverage_percentage` `-m`: Raise exception if overall coverage percentage is under this value (ie. 75)
|
47
|
+
* `--include_test_targets`: Enables coverage reports for `.xctest` targets
|
48
|
+
* `--slack_url` `-i`: Incoming WebHook for your Slack group to post results (optional).
|
49
|
+
* `--slack_channel` `-e`: Slack channel where the results will be posted (optional).
|
50
|
+
* `--skip_slack`: Add this flag to avoid publishing results on Slack (optional).
|
50
51
|
|
51
52
|
### [Fastlane](https://github.com/fastlane/fastlane/blob/master/docs/Actions.md)
|
52
53
|
*Fastlane 1.61.0* includes *xCov* as a custom action. You can easily create your coverage reports as follows:
|
@@ -60,6 +61,9 @@ xcov(
|
|
60
61
|
|
61
62
|
## Changelog
|
62
63
|
|
64
|
+
### v.0.4
|
65
|
+
* Additional flag to enable coverage reports for `.xctest` targets
|
66
|
+
|
63
67
|
### v.0.3
|
64
68
|
* Raised exception when the minimum coverage threshold is not reached (by **opfeffer**)
|
65
69
|
|
data/lib/xcov/model/report.rb
CHANGED
@@ -16,6 +16,8 @@ module Xcov
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def average_coverage targets
|
19
|
+
return 0 if targets.count == 0
|
20
|
+
|
19
21
|
coverage = 0
|
20
22
|
targets.each do |target|
|
21
23
|
coverage = coverage + target.coverage
|
@@ -42,9 +44,13 @@ module Xcov
|
|
42
44
|
# Class methods
|
43
45
|
|
44
46
|
def self.map dictionary
|
45
|
-
targets = dictionary["targets"]
|
46
|
-
|
47
|
-
|
47
|
+
targets = dictionary["targets"].select { |target| !target["name"].include?(".xctest") }
|
48
|
+
|
49
|
+
# Don't filter test targets if the flag is set
|
50
|
+
targets = dictionary["targets"] if Xcov.config[:include_test_targets]
|
51
|
+
|
52
|
+
# Create target objects
|
53
|
+
targets = targets.map { |target| Target.map(target)}
|
48
54
|
|
49
55
|
Report.new(targets)
|
50
56
|
end
|
data/lib/xcov/options.rb
CHANGED
@@ -51,6 +51,11 @@ module Xcov
|
|
51
51
|
description: "Raise exception if overall coverage percentage is under this value (ie. 75)",
|
52
52
|
type: Float,
|
53
53
|
default_value: 0),
|
54
|
+
FastlaneCore::ConfigItem.new(key: :include_test_targets,
|
55
|
+
env_name: "XCOV_INCLUDE_TEST_TARGETS",
|
56
|
+
description: "Enables coverage reports for .xctest targets",
|
57
|
+
is_string: false,
|
58
|
+
default_value: false),
|
54
59
|
FastlaneCore::ConfigItem.new(key: :slack_url,
|
55
60
|
short_option: "-i",
|
56
61
|
env_name: "SLACK_URL",
|
data/lib/xcov/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Vidal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|