undercover 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +16 -0
- data/CHANGELOG.md +8 -3
- data/lib/undercover/cli.rb +2 -2
- data/lib/undercover/formatter.rb +4 -4
- data/lib/undercover/result.rb +2 -0
- data/lib/undercover/version.rb +1 -1
- data/undercover.gemspec +2 -2
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6cd3608abfe38ef691799586ac21e0818846ea2b67e7867af9c917762c28de7
|
4
|
+
data.tar.gz: 434a7428414fe21d31e5cf691255f39f5abdc9a0e370f39a362d7ac6f90ae7a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18574633620761accff515e582f79949c7bd4deaae9f5e44dfdba03cddfeed39c76d271214be0bbccf6c51da1c0231bd290693679cfd182753b14102bc4dac0b
|
7
|
+
data.tar.gz: 05f18a34ffa46f66a4cb73c9143c0851e295ad60129e7969d2e72a6350af5a874713201797f75ff8bbcaebfe27918a322b75e3b5eb9508eb20140ca5ad82d0bf
|
@@ -0,0 +1,16 @@
|
|
1
|
+
version: 2
|
2
|
+
updates:
|
3
|
+
- package-ecosystem: bundler
|
4
|
+
directory: "/"
|
5
|
+
schedule:
|
6
|
+
interval: daily
|
7
|
+
time: "04:00"
|
8
|
+
open-pull-requests-limit: 10
|
9
|
+
ignore:
|
10
|
+
- dependency-name: rubocop
|
11
|
+
versions:
|
12
|
+
- 1.10.0
|
13
|
+
- 1.12.0
|
14
|
+
- 1.12.1
|
15
|
+
- 1.8.1
|
16
|
+
- 1.9.0
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
-
# [0.4.
|
9
|
+
# [0.4.4] - 2021-11-29
|
10
|
+
### Changed
|
11
|
+
- Dependency updates
|
12
|
+
|
13
|
+
# [0.4.3] - 2021-03-16
|
10
14
|
### Fixed
|
11
15
|
- Branch coverage without line coverage marked as uncovered - fix by @GCorbel
|
12
16
|
|
@@ -103,8 +107,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
103
107
|
### Added
|
104
108
|
- First release of `undercover` 🎉
|
105
109
|
|
106
|
-
[Unreleased]: https://github.com/grodowski/undercover/compare/v0.4.
|
107
|
-
[0.4.
|
110
|
+
[Unreleased]: https://github.com/grodowski/undercover/compare/v0.4.4...HEAD
|
111
|
+
[0.4.3]: https://github.com/grodowski/undercover/compare/v0.4.3...v0.4.4
|
112
|
+
[0.4.3]: https://github.com/grodowski/undercover/compare/v0.4.1...v0.4.3
|
108
113
|
[0.4.1]: https://github.com/grodowski/undercover/compare/v0.4.0...v0.4.1
|
109
114
|
[0.4.0]: https://github.com/grodowski/undercover/compare/v0.3.4...v0.4.0
|
110
115
|
[0.3.4]: https://github.com/grodowski/undercover/compare/v0.3.3...v0.3.4
|
data/lib/undercover/cli.rb
CHANGED
@@ -10,8 +10,8 @@ module Undercover
|
|
10
10
|
|
11
11
|
WARNINGS_TO_S = {
|
12
12
|
stale_coverage: Rainbow('🚨 WARNING: Coverage data is older than your ' \
|
13
|
-
|
14
|
-
|
13
|
+
'latest changes and results might be incomplete. ' \
|
14
|
+
'Re-run tests to update').yellow,
|
15
15
|
no_changes: Rainbow('✅ No reportable changes').green
|
16
16
|
}.freeze
|
17
17
|
def self.run(args)
|
data/lib/undercover/formatter.rb
CHANGED
@@ -18,20 +18,20 @@ module Undercover
|
|
18
18
|
@results.map.with_index(1) do |res, idx|
|
19
19
|
"🚨 #{idx}) node `#{res.node.name}` type: #{res.node.human_name},\n" +
|
20
20
|
(' ' * pad_size) + "loc: #{res.file_path_with_lines}," \
|
21
|
-
|
21
|
+
" coverage: #{res.coverage_f * 100}%\n" +
|
22
22
|
res.pretty_print
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
26
|
def success
|
27
27
|
"#{Rainbow('undercover').bold.green}: ✅ No coverage" \
|
28
|
-
|
28
|
+
' is missing in latest changes'
|
29
29
|
end
|
30
30
|
|
31
31
|
def warnings_header
|
32
32
|
"#{Rainbow('undercover').bold.red}: " \
|
33
|
-
|
34
|
-
|
33
|
+
'👮♂️ some methods have no test coverage! Please add specs for' \
|
34
|
+
' methods listed below'
|
35
35
|
end
|
36
36
|
|
37
37
|
def pad_size
|
data/lib/undercover/result.rb
CHANGED
@@ -27,6 +27,7 @@ module Undercover
|
|
27
27
|
@flagged
|
28
28
|
end
|
29
29
|
|
30
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
30
31
|
def uncovered?(line_no)
|
31
32
|
# check branch coverage for line_no
|
32
33
|
coverage.each do |ln, _block, _branch, cov|
|
@@ -37,6 +38,7 @@ module Undercover
|
|
37
38
|
line_cov = coverage.select { |cov| cov.size == 2 }.find { |ln, _cov| ln == line_no }
|
38
39
|
line_cov && line_cov[1].zero?
|
39
40
|
end
|
41
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
40
42
|
|
41
43
|
# Method `coverage_f` returns the total coverage of this Undercover::Result
|
42
44
|
# as a % value, taking into account missing branches. Line coverage will be counted
|
data/lib/undercover/version.rb
CHANGED
data/undercover.gemspec
CHANGED
@@ -27,13 +27,13 @@ Gem::Specification.new do |spec|
|
|
27
27
|
|
28
28
|
spec.add_dependency 'imagen', '>= 0.1.8'
|
29
29
|
spec.add_dependency 'rainbow', '>= 2.1', '< 4.0'
|
30
|
-
spec.add_dependency 'rugged', '>= 0.27', '< 1.
|
30
|
+
spec.add_dependency 'rugged', '>= 0.27', '< 1.3'
|
31
31
|
|
32
32
|
spec.add_development_dependency 'bundler'
|
33
33
|
spec.add_development_dependency 'pry'
|
34
34
|
spec.add_development_dependency 'rake', '~> 13.0'
|
35
35
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
36
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
36
|
+
spec.add_development_dependency 'rubocop', '~> 1.22.1'
|
37
37
|
spec.add_development_dependency 'simplecov'
|
38
38
|
spec.add_development_dependency 'simplecov-html'
|
39
39
|
spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: undercover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Grodowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: imagen
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
version: '0.27'
|
54
54
|
- - "<"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '1.
|
56
|
+
version: '1.3'
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -63,7 +63,7 @@ dependencies:
|
|
63
63
|
version: '0.27'
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '1.
|
66
|
+
version: '1.3'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: bundler
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,14 +126,14 @@ dependencies:
|
|
126
126
|
requirements:
|
127
127
|
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: 1.
|
129
|
+
version: 1.22.1
|
130
130
|
type: :development
|
131
131
|
prerelease: false
|
132
132
|
version_requirements: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
134
|
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: 1.
|
136
|
+
version: 1.22.1
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: simplecov
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
@@ -199,6 +199,7 @@ extensions: []
|
|
199
199
|
extra_rdoc_files: []
|
200
200
|
files:
|
201
201
|
- ".codebeatsettings"
|
202
|
+
- ".github/dependabot.yml"
|
202
203
|
- ".github/workflows/ruby.yml"
|
203
204
|
- ".gitignore"
|
204
205
|
- ".overcommit.yml"
|
@@ -245,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
246
|
- !ruby/object:Gem::Version
|
246
247
|
version: '0'
|
247
248
|
requirements: []
|
248
|
-
rubygems_version: 3.2.
|
249
|
+
rubygems_version: 3.2.22
|
249
250
|
signing_key:
|
250
251
|
specification_version: 4
|
251
252
|
summary: Actionable code coverage - detects untested code blocks in recent changes
|