undercover 0.8.1 → 0.8.3
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 +2 -2
- data/CHANGELOG.md +13 -1
- data/LICENSE.txt +1 -1
- data/lib/undercover/filter_set.rb +7 -3
- data/lib/undercover/result.rb +5 -4
- data/lib/undercover/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8144aeeac145c88e63c5f57ea0d31c17648b8ea428d11755b15b4bb706fa2982
|
|
4
|
+
data.tar.gz: 769fbd667e3bd48572829c4214f17afcd23cafaf1e7795452a2832b8105b15e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af0adac825397c7c7be37a1e4d1d0a1cc039c4b0ab3a774460d4352fbf8157f4b485b3a1f4b11621d3e2ea0368a251e43ae345ca3082f3baebd5f0d5dfe36fa5
|
|
7
|
+
data.tar.gz: a3ba29ca707eeac980a4d1eab2f17ec17bc206f33ef57e599bd5cb0cffa76d7aaae7934d29b2a6453942abae90f8210bc5d83e23c604349c70bec8dc45fe212a
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -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@v5
|
|
27
27
|
with:
|
|
28
28
|
name: undercover-${{ matrix.ruby }}-coverage
|
|
29
29
|
path: coverage/undercover_coverage.json
|
|
@@ -31,7 +31,7 @@ jobs:
|
|
|
31
31
|
runs-on: ubuntu-latest
|
|
32
32
|
needs: build
|
|
33
33
|
steps:
|
|
34
|
-
- uses: actions/download-artifact@
|
|
34
|
+
- uses: actions/download-artifact@v6
|
|
35
35
|
with:
|
|
36
36
|
name: undercover-3.4-coverage
|
|
37
37
|
- name: Upload coverage
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
# [0.8.3] - 2025-11-20
|
|
10
|
+
### Fixed
|
|
11
|
+
- Normalize slash prefix in FilterSet support to work with the 'rails' profile (https://github.com/grodowski/undercover/pull/244)
|
|
12
|
+
|
|
13
|
+
# [0.8.2] - 2025-11-15
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- Fix NoMethodError in pretty_print for ignored multi-line branch results (https://github.com/grodowski/undercover/pull/243)
|
|
17
|
+
|
|
9
18
|
# [0.8.1] - 2025-09-27
|
|
10
19
|
|
|
11
20
|
### Fixed
|
|
@@ -200,7 +209,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
200
209
|
### Added
|
|
201
210
|
- First release of `undercover` 🎉
|
|
202
211
|
|
|
203
|
-
[Unreleased]: https://github.com/grodowski/undercover/compare/v0.8.
|
|
212
|
+
[Unreleased]: https://github.com/grodowski/undercover/compare/v0.8.3...HEAD
|
|
213
|
+
[0.8.3]: https://github.com/grodowski/undercover/compare/v0.8.2...v0.8.3
|
|
214
|
+
[0.8.2]: https://github.com/grodowski/undercover/compare/v0.8.1...v0.8.2
|
|
215
|
+
[0.8.1]: https://github.com/grodowski/undercover/compare/v0.8.0...v0.8.1
|
|
204
216
|
[0.8.0]: https://github.com/grodowski/undercover/compare/v0.7.4...v0.8.0
|
|
205
217
|
[0.7.4]: https://github.com/grodowski/undercover/compare/v0.7.3...v0.7.4
|
|
206
218
|
[0.7.3]: https://github.com/grodowski/undercover/compare/v0.7.2...v0.7.3
|
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
|
@@ -134,10 +134,12 @@ module Undercover
|
|
|
134
134
|
|
|
135
135
|
private
|
|
136
136
|
|
|
137
|
-
# rubocop:disable Metrics/AbcSize
|
|
138
|
-
def count_covered_branches(line_number)
|
|
137
|
+
def count_covered_branches(line_number) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
|
139
138
|
branches = coverage.select { |cov| cov.size == 4 && cov[0] == line_number }
|
|
140
|
-
count_covered = branches.count
|
|
139
|
+
count_covered = branches.count do |cov|
|
|
140
|
+
branch_cov = cov[3]
|
|
141
|
+
branch_cov == 'ignored' || (branch_cov.respond_to?(:positive?) && branch_cov.positive?)
|
|
142
|
+
end
|
|
141
143
|
|
|
142
144
|
return '' if branches.empty?
|
|
143
145
|
|
|
@@ -148,6 +150,5 @@ module Undercover
|
|
|
148
150
|
Rainbow(" branches: #{count_covered}/#{branches.size}").italic.darkgray.dark
|
|
149
151
|
end
|
|
150
152
|
end
|
|
151
|
-
# rubocop:enable Metrics/AbcSize
|
|
152
153
|
end
|
|
153
154
|
end
|
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.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan Grodowski
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-11-20 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: base64
|