simplecov-review 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +2 -2
- data/CHANGELOG.md +9 -1
- data/Gemfile.lock +12 -8
- data/lib/simplecov-review/version.rb +1 -1
- data/lib/simplecov-review.rb +20 -1
- data/simplecov-review.gemspec +1 -1
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb6c8e8592e2f0fb601195fa692b8ac08b3a814ace01fc430246b59fa74604af
|
4
|
+
data.tar.gz: 2e5f935c4df6a3e7c22a3e3f876b5506c5ee949565a1f803f390a5445fdf1bdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30ca89e277e54957aff346c3268d6c4b676c5c9513b332fac73a34f9e25cdac675e65da136618ed799476af61ffabfc09b6b8b8ddb64504705dbb346bdaa9c40
|
7
|
+
data.tar.gz: 0a3badc1ce1dfa575bc8c47811e97f495fc3bcf0653c05e000e62e05164bbdf1679c83300a170459ae2ca70f3ddc8ecb84124a0ca0fa6deae444e58add717911
|
data/.github/workflows/main.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simplecov-review (0.
|
5
|
-
simplecov (
|
4
|
+
simplecov-review (0.3.0)
|
5
|
+
simplecov (>= 0.21.2, < 0.23)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
ast (2.4.2)
|
11
11
|
diff-lcs (1.4.4)
|
12
|
-
docile (1.
|
12
|
+
docile (1.4.1)
|
13
13
|
parallel (1.21.0)
|
14
|
-
parser (3.
|
14
|
+
parser (3.3.5.0)
|
15
15
|
ast (~> 2.4.1)
|
16
|
+
racc
|
17
|
+
racc (1.8.1)
|
16
18
|
rainbow (3.0.0)
|
17
19
|
rake (13.0.6)
|
18
20
|
regexp_parser (2.1.1)
|
@@ -44,15 +46,17 @@ GEM
|
|
44
46
|
rubocop-rspec (2.5.0)
|
45
47
|
rubocop (~> 1.19)
|
46
48
|
ruby-progressbar (1.11.0)
|
47
|
-
simplecov (0.
|
49
|
+
simplecov (0.22.0)
|
48
50
|
docile (~> 1.1)
|
49
51
|
simplecov-html (~> 0.11)
|
50
52
|
simplecov_json_formatter (~> 0.1)
|
51
|
-
simplecov-html (0.
|
52
|
-
simplecov_json_formatter (0.1.
|
53
|
+
simplecov-html (0.13.1)
|
54
|
+
simplecov_json_formatter (0.1.4)
|
53
55
|
unicode-display_width (2.1.0)
|
54
56
|
|
55
57
|
PLATFORMS
|
58
|
+
arm64-darwin-21
|
59
|
+
arm64-darwin-23
|
56
60
|
x86_64-darwin-18
|
57
61
|
x86_64-linux
|
58
62
|
|
@@ -64,4 +68,4 @@ DEPENDENCIES
|
|
64
68
|
simplecov-review!
|
65
69
|
|
66
70
|
BUNDLED WITH
|
67
|
-
2.2.
|
71
|
+
2.2.22
|
data/lib/simplecov-review.rb
CHANGED
@@ -32,10 +32,29 @@ module SimpleCov
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def find_missing_groups(file)
|
35
|
-
|
35
|
+
# assume line 0 is covered as well as the end of file, filter skipped coverage
|
36
|
+
lines_coverage = [1] + file.lines.map { |l| l.skipped? ? 1 : l.coverage } + [1]
|
37
|
+
lines_coverage = fill_blank_lines(lines_coverage)
|
38
|
+
lines_missing = lines_coverage.each_index.select { |index| lines_coverage[index].zero? }
|
36
39
|
lines_missing.slice_when { |prev, curr| curr != prev.next }.to_a
|
37
40
|
end
|
38
41
|
|
42
|
+
def fill_blank_lines(lines)
|
43
|
+
forward = fill_missing(lines.dup)
|
44
|
+
backward = fill_missing(lines.reverse).reverse
|
45
|
+
|
46
|
+
[forward, backward].transpose.map(&:compact).map(&:max)
|
47
|
+
end
|
48
|
+
|
49
|
+
def fill_missing(lines)
|
50
|
+
lines.each_index do |index|
|
51
|
+
next if index.zero?
|
52
|
+
next unless lines[index].nil?
|
53
|
+
|
54
|
+
lines[index] = lines[index - 1]
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
39
58
|
def export_path
|
40
59
|
File.join(SimpleCov.coverage_path, FILENAME)
|
41
60
|
end
|
data/simplecov-review.gemspec
CHANGED
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplecov-review
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karol Bąk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simplecov
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.21.2
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0.23'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 0.21.2
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0.23'
|
27
33
|
description:
|
28
34
|
email:
|
29
35
|
- kukicola@gmail.com
|
@@ -64,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
70
|
- !ruby/object:Gem::Version
|
65
71
|
version: '0'
|
66
72
|
requirements: []
|
67
|
-
rubygems_version: 3.
|
73
|
+
rubygems_version: 3.3.7
|
68
74
|
signing_key:
|
69
75
|
specification_version: 4
|
70
76
|
summary: SimpleCov formatter to generate missing lines errors for reporting tools
|