xcov 1.8.1 → 1.10.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 +7 -15
- data/assets/stylesheets/main.css +1 -1
- data/lib/xcov/ignore_handler.rb +2 -1
- data/lib/xcov/manager.rb +4 -3
- data/lib/xcov/model/report.rb +3 -3
- data/lib/xcov/options.rb +8 -0
- data/lib/xcov/version.rb +1 -1
- data/lib/xcov-core/bin/xcov-core +0 -0
- data/views/report.erb +2 -2
- metadata +31 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45561ebb1e560099cf03c46ed407eb90bedfee812d7164d7229deed1e84d89d5
|
|
4
|
+
data.tar.gz: e72349b568cc6d28f82a856794377bc7da0b26cb8cc59cdd6cb2f399b1e9fbf6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb31a5ff3822e417a1a0382529d6ec9a342859ce3ca56c30ac86b4be45b11379576b4b0bcfb19ced607d0e268f6178d3645259e9e29558cec087315d7e69a793
|
|
7
|
+
data.tar.gz: d8deca4019f477d4cec991488f22e02a225ff37b70b677052fc8e747c33bbdc77467def3f13a6a46d31ec91009255be0e6dbc9dfcb811d10642c564a6f5f3f64
|
data/README.md
CHANGED
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
<h3 align="center">
|
|
2
|
-
<img src="/assets_readme/logo.png" alt="xcov Logo" />
|
|
2
|
+
<img src="/.github/assets_readme/logo.png" alt="xcov Logo" />
|
|
3
3
|
</h3>
|
|
4
4
|
|
|
5
5
|
-------
|
|
6
6
|
|
|
7
|
-
[](https://github.com/nakiostudio/xcov/blob/master/LICENSE)
|
|
7
|
+
[](https://github.com/fastlane-community/xcov/blob/master/LICENSE)
|
|
9
8
|
[](http://rubygems.org/gems/xcov)
|
|
10
9
|
[](http://rubygems.org/gems/xcov)
|
|
11
10
|
|
|
12
11
|
**xcov** is a friendly visualizer for Xcode's code coverage files.
|
|
13
12
|
|
|
14
|
-
> Maintainers needed
|
|
15
|
-
|
|
16
|
-
## Installation
|
|
17
|
-
```
|
|
18
|
-
sudo gem install xcov
|
|
19
|
-
```
|
|
20
|
-
|
|
21
13
|
## Features
|
|
22
14
|
* Built on top of [fastlane](https://fastlane.tools), you can easily plug it on to your CI environment.
|
|
23
15
|
* Blacklisting of those files which coverage you want to ignore.
|
|
@@ -26,13 +18,13 @@ sudo gem install xcov
|
|
|
26
18
|
* Nice HTML, JSON and Markdown reports.
|
|
27
19
|
|
|
28
20
|
<h3 align="center">
|
|
29
|
-
<img src="/assets_readme/report.png" />
|
|
21
|
+
<img src="/.github/assets_readme/report.png" />
|
|
30
22
|
</h3>
|
|
31
23
|
|
|
32
24
|
* Slack integration.
|
|
33
25
|
|
|
34
26
|
<h3 align="center">
|
|
35
|
-
<img src="/assets_readme/slack_integration.png" />
|
|
27
|
+
<img src="/.github/assets_readme/slack_integration.png" />
|
|
36
28
|
</h3>
|
|
37
29
|
|
|
38
30
|
## Requirements
|
|
@@ -43,7 +35,7 @@ In order to make *xcov* run you must:
|
|
|
43
35
|
* Enable the **Gather coverage data** setting available on your scheme settings window.
|
|
44
36
|
|
|
45
37
|
<h3 align="center">
|
|
46
|
-
<img src="/assets_readme/gather_coverage.png" />
|
|
38
|
+
<img src="/.github/assets_readme/gather_coverage.png" />
|
|
47
39
|
</h3>
|
|
48
40
|
|
|
49
41
|
## Usage
|
|
@@ -133,7 +125,7 @@ xcov(
|
|
|
133
125
|
With the *Danger* plugin you can receive your coverage reports directly on your pull requests. You can find more information on the plugin repository available [here](https://github.com/nakiostudio/danger-xcov).
|
|
134
126
|
|
|
135
127
|
<h3 align="center">
|
|
136
|
-
<img src="/assets_readme/xcov_danger.png" />
|
|
128
|
+
<img src="/.github/assets_readme/xcov_danger.png" />
|
|
137
129
|
</h3>
|
|
138
130
|
|
|
139
131
|
## [Coveralls](https://coveralls.io)
|
|
@@ -141,7 +133,7 @@ With the *Danger* plugin you can receive your coverage reports directly on your
|
|
|
141
133
|
If you want to keep track of the coverage evolution and get some extra features, *xcov* allows you to submit coverage reports to *Coveralls*. To do so, simply create an account and run *xcov* setting the options `coveralls_service_name` and `coveralls_service_job_id` for compatible CI environments. However, if you want to post to *Coveralls* from the console or any custom environment simply set the `coveralls_repo_token` option.
|
|
142
134
|
|
|
143
135
|
<h3 align="center">
|
|
144
|
-
<img src="/assets_readme/coveralls_integration.png" />
|
|
136
|
+
<img src="/.github/assets_readme/coveralls_integration.png" />
|
|
145
137
|
</h3>
|
|
146
138
|
|
|
147
139
|
## Contributors
|
data/assets/stylesheets/main.css
CHANGED
data/lib/xcov/ignore_handler.rb
CHANGED
|
@@ -52,7 +52,8 @@ module Xcov
|
|
|
52
52
|
def relative_path path
|
|
53
53
|
require 'pathname'
|
|
54
54
|
|
|
55
|
-
full_path = Pathname.new(path)
|
|
55
|
+
full_path = Pathname.new(path)
|
|
56
|
+
full_path = full_path.absolute? ? full_path : full_path.realpath # /full/path/to/project/where/is/file.extension
|
|
56
57
|
base_path = Pathname.new(source_directory).realpath # /full/path/to/project/
|
|
57
58
|
|
|
58
59
|
full_path.relative_path_from(base_path).to_s # where/is/file.extension
|
data/lib/xcov/manager.rb
CHANGED
|
@@ -229,9 +229,10 @@ module Xcov
|
|
|
229
229
|
|
|
230
230
|
# Rename each file with global index
|
|
231
231
|
tmp_report_paths.each_with_index do |item, i|
|
|
232
|
-
|
|
233
|
-
File.rename(
|
|
234
|
-
|
|
232
|
+
current_index = index + 1
|
|
233
|
+
File.rename(tmp_archive_paths[i], "#{output_path}/xccovarchive-#{current_index}.xccovarchive")
|
|
234
|
+
File.rename(item, "#{output_path}/xccovreport-#{current_index}.xccovreport")
|
|
235
|
+
index = current_index
|
|
235
236
|
end
|
|
236
237
|
rescue
|
|
237
238
|
UI.error("Error occured while exporting xccovreport from xcresult '#{xcresult_path}'")
|
data/lib/xcov/model/report.rb
CHANGED
|
@@ -18,9 +18,9 @@ module Xcov
|
|
|
18
18
|
def average_coverage targets
|
|
19
19
|
return 0 if targets.count == 0
|
|
20
20
|
return targets.first.coverage if targets.count == 1
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
totalCoveredLines = targets.reduce(0) { |acc, target| acc + target.files.reduce(0) { |acc, file| acc + file.coveredLines } }
|
|
22
|
+
totalExecutableLines = targets.reduce(0) { |acc, target| acc + target.files.reduce(0) { |acc, file| acc + file.executableLines } }
|
|
23
|
+
totalCoveredLines.to_f / totalExecutableLines.to_f
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def print_description
|
data/lib/xcov/options.rb
CHANGED
|
@@ -163,6 +163,7 @@ module Xcov
|
|
|
163
163
|
env_name: "SLACK_URL",
|
|
164
164
|
description: "Create an Incoming WebHook for your Slack group to post results there",
|
|
165
165
|
optional: true,
|
|
166
|
+
sensitive: true,
|
|
166
167
|
verify_block: proc do |value|
|
|
167
168
|
raise "Invalid URL, must start with https://" unless value.start_with? "https://"
|
|
168
169
|
end
|
|
@@ -176,18 +177,21 @@ module Xcov
|
|
|
176
177
|
),
|
|
177
178
|
FastlaneCore::ConfigItem.new(
|
|
178
179
|
key: :skip_slack,
|
|
180
|
+
env_name: "XCOV_SKIP_SLACK",
|
|
179
181
|
description: "Don't publish to slack, even when an URL is given",
|
|
180
182
|
is_string: false,
|
|
181
183
|
default_value: false
|
|
182
184
|
),
|
|
183
185
|
FastlaneCore::ConfigItem.new(
|
|
184
186
|
key: :slack_username,
|
|
187
|
+
env_name: "XCOV_SLACK_USERNAME",
|
|
185
188
|
description: "The username which is used to publish to slack",
|
|
186
189
|
default_value: "xcov",
|
|
187
190
|
optional: true
|
|
188
191
|
),
|
|
189
192
|
FastlaneCore::ConfigItem.new(
|
|
190
193
|
key: :slack_message,
|
|
194
|
+
env_name: "XCOV_SLACK_MESSAGE",
|
|
191
195
|
description: "The message which is published together with a successful report",
|
|
192
196
|
default_value: "Your *xcov* coverage report",
|
|
193
197
|
optional: true
|
|
@@ -218,18 +222,21 @@ module Xcov
|
|
|
218
222
|
),
|
|
219
223
|
FastlaneCore::ConfigItem.new(
|
|
220
224
|
key: :exclude_targets,
|
|
225
|
+
env_name: "XCOV_EXCLUDE_TARGETS",
|
|
221
226
|
optional: true,
|
|
222
227
|
conflicting_options: [:include_targets, :only_project_targets],
|
|
223
228
|
description: "Comma separated list of targets to exclude from coverage report"
|
|
224
229
|
),
|
|
225
230
|
FastlaneCore::ConfigItem.new(
|
|
226
231
|
key: :include_targets,
|
|
232
|
+
env_name: "XCOV_INCLUDE_TARGETS",
|
|
227
233
|
optional: true,
|
|
228
234
|
conflicting_options: [:exclude_targets, :only_project_targets],
|
|
229
235
|
description: "Comma separated list of targets to include in coverage report. If specified then exlude_targets will be ignored"
|
|
230
236
|
),
|
|
231
237
|
FastlaneCore::ConfigItem.new(
|
|
232
238
|
key: :only_project_targets,
|
|
239
|
+
env_name: "XCOV_ONLY_PROJECT_TARGETS",
|
|
233
240
|
optional: true,
|
|
234
241
|
conflicting_options: [:exclude_targets, :include_targets],
|
|
235
242
|
description: "Display the coverage only for main project targets (e.g. skip Pods targets)",
|
|
@@ -264,6 +271,7 @@ module Xcov
|
|
|
264
271
|
key: :coveralls_repo_token,
|
|
265
272
|
env_name: "COVERALLS_REPO_TOKEN",
|
|
266
273
|
optional: true,
|
|
274
|
+
sensitive: true,
|
|
267
275
|
conflicting_options: [:coveralls_service_name, :coveralls_service_job_id],
|
|
268
276
|
description: "Repository token to be used by integrations not compatible with Coveralls"
|
|
269
277
|
),
|
data/lib/xcov/version.rb
CHANGED
data/lib/xcov-core/bin/xcov-core
CHANGED
|
Binary file
|
data/views/report.erb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<!--
|
|
3
3
|
xcov - Xcode code coverage without hassle
|
|
4
|
-
A tool developed by Carlos Vidal @
|
|
4
|
+
A tool developed by Carlos Vidal @nakiostudio
|
|
5
5
|
-->
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
@@ -54,7 +54,7 @@ A tool developed by Carlos Vidal @carlostify
|
|
|
54
54
|
<div class="col-xs-12 col-md-offset-1 col-md-10 col-lg-offset-2 col-lg-8 text-center">
|
|
55
55
|
xcov - Xcode coverage reports without hassle - A tool developed by
|
|
56
56
|
<a href="https://github.com/nakiostudio" target="_blank">Carlos Vidal</a> -
|
|
57
|
-
<a href="https://
|
|
57
|
+
<a href="https://mastodon.online/@nakiostudio" target="_blank">@nakiostudio</a>
|
|
58
58
|
</div>
|
|
59
59
|
</div>
|
|
60
60
|
<!-- Footer ends here -->
|
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: 1.
|
|
4
|
+
version: 1.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carlos Vidal
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fastlane
|
|
@@ -100,6 +100,34 @@ dependencies:
|
|
|
100
100
|
- - "~>"
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
102
|
version: 0.2.0
|
|
103
|
+
- !ruby/object:Gem::Dependency
|
|
104
|
+
name: abbrev
|
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
|
106
|
+
requirements:
|
|
107
|
+
- - ">="
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: '0'
|
|
110
|
+
type: :runtime
|
|
111
|
+
prerelease: false
|
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - ">="
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: '0'
|
|
117
|
+
- !ruby/object:Gem::Dependency
|
|
118
|
+
name: nkf
|
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
|
120
|
+
requirements:
|
|
121
|
+
- - ">="
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: '0'
|
|
124
|
+
type: :runtime
|
|
125
|
+
prerelease: false
|
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
127
|
+
requirements:
|
|
128
|
+
- - ">="
|
|
129
|
+
- !ruby/object:Gem::Version
|
|
130
|
+
version: '0'
|
|
103
131
|
- !ruby/object:Gem::Dependency
|
|
104
132
|
name: bundler
|
|
105
133
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -223,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
223
251
|
- !ruby/object:Gem::Version
|
|
224
252
|
version: '0'
|
|
225
253
|
requirements: []
|
|
226
|
-
rubygems_version: 3.
|
|
254
|
+
rubygems_version: 3.4.19
|
|
227
255
|
signing_key:
|
|
228
256
|
specification_version: 4
|
|
229
257
|
summary: xcov is a friendly visualizer for Xcode's code coverage files
|