undercover 0.8.2 → 0.8.4
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/.github/workflows/ruby.yml +15 -8
- data/.tool-versions +1 -1
- data/CHANGELOG.md +14 -1
- data/Gemfile +1 -1
- data/LICENSE.txt +1 -1
- data/lib/undercover/filter_set.rb +7 -3
- data/lib/undercover/lcov_parser.rb +2 -1
- data/lib/undercover/result.rb +2 -1
- data/lib/undercover/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f86959c16f0b74f14a45569ca4d746650e764eef3b94cc8f10ff341b2900f099
|
|
4
|
+
data.tar.gz: ef70c14d604fa88d59cca1cec6155382eed5360795a6c9c38c3b3d72366e2080
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 703e9ea6340101fd7d49368eb07bfd70986f31f7306219f5b3f791383eecf63483db59360716005e528ecdf6aae91e7ce4bb1d3a7d3c5b62dceccb5dde1e85b0
|
|
7
|
+
data.tar.gz: 704e695944e5135f41408bc9fa9f8b27c3213574a884d04a5f8723c7f985d0f309d32c49977d74ced2d21da4b580129419d2971a26fe91c495b4e0246ce4c1ff
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
name: Ruby
|
|
2
|
-
on: [push]
|
|
2
|
+
on: [push, pull_request]
|
|
3
3
|
jobs:
|
|
4
4
|
build:
|
|
5
5
|
runs-on: ubuntu-latest
|
|
6
6
|
strategy:
|
|
7
7
|
matrix:
|
|
8
|
-
ruby: ['
|
|
8
|
+
ruby: ['4.0', '3.4']
|
|
9
9
|
steps:
|
|
10
|
-
- uses: actions/checkout@
|
|
10
|
+
- uses: actions/checkout@v6
|
|
11
11
|
with:
|
|
12
12
|
fetch-depth: 0 # fetch all since test fixtures depend on history
|
|
13
13
|
- name: Set up Ruby ${{ matrix.ruby }}
|
|
@@ -23,7 +23,7 @@ jobs:
|
|
|
23
23
|
run: |
|
|
24
24
|
git fetch --update-head-ok origin master:master
|
|
25
25
|
undercover --simplecov coverage/undercover_coverage.json --compare master
|
|
26
|
-
- uses: actions/upload-artifact@
|
|
26
|
+
- uses: actions/upload-artifact@v6
|
|
27
27
|
with:
|
|
28
28
|
name: undercover-${{ matrix.ruby }}-coverage
|
|
29
29
|
path: coverage/undercover_coverage.json
|
|
@@ -31,12 +31,19 @@ jobs:
|
|
|
31
31
|
runs-on: ubuntu-latest
|
|
32
32
|
needs: build
|
|
33
33
|
steps:
|
|
34
|
-
- uses: actions/download-artifact@
|
|
34
|
+
- uses: actions/download-artifact@v7
|
|
35
35
|
with:
|
|
36
|
-
name: undercover-
|
|
36
|
+
name: undercover-4.0-coverage
|
|
37
37
|
- name: Upload coverage
|
|
38
38
|
run: |
|
|
39
|
-
ruby -e "$(curl -s https://undercover-ci.com/uploader.rb)" -- \
|
|
39
|
+
output=$(ruby -e "$(curl -s https://undercover-ci.com/uploader.rb)" -- \
|
|
40
40
|
--repo grodowski/undercover \
|
|
41
41
|
--commit ${{ github.event.pull_request.head.sha || github.sha }} \
|
|
42
|
-
--simplecov /home/runner/work/undercover/undercover/undercover_coverage.json
|
|
42
|
+
--simplecov /home/runner/work/undercover/undercover/undercover_coverage.json 2>&1) || {
|
|
43
|
+
if echo "$output" | grep -q "has already completed"; then
|
|
44
|
+
echo "Coverage already processed for this commit ✅"
|
|
45
|
+
else
|
|
46
|
+
echo "Coverage upload failed: $output"
|
|
47
|
+
exit 1
|
|
48
|
+
fi
|
|
49
|
+
}
|
data/.tool-versions
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
ruby
|
|
1
|
+
ruby 4.0.1
|
|
2
2
|
nodejs v24.4.0
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
# [0.8.4] - 2026-02-06
|
|
10
|
+
### Fixed
|
|
11
|
+
- Print branch coverage even on n/a lines (https://github.com/grodowski/undercover/pull/249) by [@kuahyeow](https://github.com/kuahyeow)
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- Ruby 4 support in CI
|
|
15
|
+
|
|
16
|
+
# [0.8.3] - 2025-11-20
|
|
17
|
+
### Fixed
|
|
18
|
+
- Normalize slash prefix in FilterSet support to work with the 'rails' profile (https://github.com/grodowski/undercover/pull/244)
|
|
19
|
+
|
|
9
20
|
# [0.8.2] - 2025-11-15
|
|
10
21
|
|
|
11
22
|
### Fixed
|
|
@@ -205,7 +216,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
205
216
|
### Added
|
|
206
217
|
- First release of `undercover` 🎉
|
|
207
218
|
|
|
208
|
-
[Unreleased]: https://github.com/grodowski/undercover/compare/v0.8.
|
|
219
|
+
[Unreleased]: https://github.com/grodowski/undercover/compare/v0.8.4...HEAD
|
|
220
|
+
[0.8.4]: https://github.com/grodowski/undercover/compare/v0.8.3...v0.8.4
|
|
221
|
+
[0.8.3]: https://github.com/grodowski/undercover/compare/v0.8.2...v0.8.3
|
|
209
222
|
[0.8.2]: https://github.com/grodowski/undercover/compare/v0.8.1...v0.8.2
|
|
210
223
|
[0.8.1]: https://github.com/grodowski/undercover/compare/v0.8.0...v0.8.1
|
|
211
224
|
[0.8.0]: https://github.com/grodowski/undercover/compare/v0.7.4...v0.8.0
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
|
@@ -26,13 +26,17 @@ module Undercover
|
|
|
26
26
|
simplecov_filters.any? do |filter|
|
|
27
27
|
filter = filter.transform_keys(&:to_sym)
|
|
28
28
|
if filter[:string]
|
|
29
|
-
filepath.include?(filter[:string])
|
|
29
|
+
normalized(filepath).include?(filter[:string])
|
|
30
30
|
elsif filter[:regex]
|
|
31
|
-
filepath.match?(Regexp.new(filter[:regex]))
|
|
31
|
+
normalized(filepath).match?(Regexp.new(filter[:regex]))
|
|
32
32
|
elsif filter[:file]
|
|
33
|
-
filepath == filter[:file]
|
|
33
|
+
filepath == filter[:file] # TODO: check if file also gets a slash?
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
|
+
|
|
38
|
+
def normalized(filepath)
|
|
39
|
+
filepath.start_with?('/') ? filepath : "/#{filepath}"
|
|
40
|
+
end
|
|
37
41
|
end
|
|
38
42
|
end
|
data/lib/undercover/result.rb
CHANGED
|
@@ -108,7 +108,8 @@ module Undercover
|
|
|
108
108
|
Rainbow(' skipped with :nocov:').italic.darkgray.dark
|
|
109
109
|
elsif covered.nil?
|
|
110
110
|
Rainbow(formatted_line).darkgray.dark +
|
|
111
|
-
Rainbow(' hits: n/a').italic.darkgray.dark
|
|
111
|
+
Rainbow(' hits: n/a').italic.darkgray.dark +
|
|
112
|
+
count_covered_branches(num)
|
|
112
113
|
elsif covered.positive?
|
|
113
114
|
Rainbow(formatted_line).green +
|
|
114
115
|
Rainbow(" hits: #{covered}").italic.darkgray.dark +
|
data/lib/undercover/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: undercover
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan Grodowski
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: base64
|
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
178
178
|
- !ruby/object:Gem::Version
|
|
179
179
|
version: '0'
|
|
180
180
|
requirements: []
|
|
181
|
-
rubygems_version:
|
|
181
|
+
rubygems_version: 4.0.3
|
|
182
182
|
specification_version: 4
|
|
183
183
|
summary: Actionable code coverage - detects untested code blocks in recent changes
|
|
184
184
|
test_files: []
|