undercover 0.4.6 → 0.4.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bff312e0fdc1d61bc1ac46a49812fe490bc57d095f660ba38df00686b1d08a28
4
- data.tar.gz: b8df1a289dd957868632ecb1aea06033b6945e75357163f1007136ccae94d9b3
3
+ metadata.gz: 208a99638c9f105ea5a9abde3de88efc756e4ca9f739246488b55a80a7118276
4
+ data.tar.gz: c1a5926972f1404a0adbf570ef7b28678fb48ecbabe29f8b65469b09a2b4a25c
5
5
  SHA512:
6
- metadata.gz: b4fee8956df8fd10483e7c6af403859c1e93775fe8d322b3709f22d38b14cbcd4139aea072692eb5bb754f1d581ebf7123352b63d5641c0f7810ee9ba3a577a2
7
- data.tar.gz: 1dfced71df7fb571add736bb31877ae5c3116796c3c3a888db9e3e1d6f8c7ad92809f47dce700ead01064299706a6edf0347d8333ba8218ec8696512de5ca854
6
+ metadata.gz: 69937cd20c436a78a403ba4b12eb52d727120771060de928617b81bcfa8c8010c2ef3af64ea0b986d9655b32934e70e33c9482b5d8b68b2149462c3933e143f7
7
+ data.tar.gz: 9fe21bbb6cf9af2b45f51033eedb1fe75d744b6611c677c65c4052373251166ce54b870dc53f94b8b564aa7839963e3b038be3f36181a7a78c034583f209e9e8
@@ -7,21 +7,24 @@ jobs:
7
7
  matrix:
8
8
  ruby: ['3.2', '3.0', '2.7']
9
9
  steps:
10
- - uses: actions/checkout@v1
10
+ - uses: actions/checkout@v3
11
+ with:
12
+ fetch-depth: 0 # fetch all since test fixtures depend on history
11
13
  - name: Set up Ruby ${{ matrix.ruby }}
12
14
  uses: ruby/setup-ruby@v1
13
15
  with:
14
16
  ruby-version: ${{ matrix.ruby }}
15
17
  - name: Build and test with Rake
16
18
  run: |
17
- gem install bundler undercover --no-doc
19
+ gem install bundler -v 2.4.22
20
+ gem install undercover --no-doc
18
21
  bundle install --jobs 4 --retry 3
19
22
  bundle exec rake
20
23
  - name: undercover (local)
21
24
  run: |
22
- git fetch origin master:master
25
+ git fetch --update-head-ok origin master:master
23
26
  undercover --compare master
24
- - uses: actions/upload-artifact@v2
27
+ - uses: actions/upload-artifact@v3
25
28
  with:
26
29
  name: undercover.lcov
27
30
  path: coverage/lcov/undercover.lcov
@@ -29,7 +32,7 @@ jobs:
29
32
  runs-on: ubuntu-latest
30
33
  needs: build
31
34
  steps:
32
- - uses: actions/download-artifact@v2
35
+ - uses: actions/download-artifact@v3
33
36
  with:
34
37
  name: undercover.lcov
35
38
  - name: Upload coverage
data/CHANGELOG.md CHANGED
@@ -6,8 +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.4.7] - 2022-07-28
10
+ ### Fixed
11
+ - [Update of one-line block is ignored](https://github.com/grodowski/undercover/pull/207) by [@lizhangyuh](https://github.com/lizhangyuh)
12
+
13
+ # [0.4.6] - 2023-04-21
14
+ ### Added
15
+ - #total_coverage and #total_branch_coverage in the LcovParser
16
+
9
17
  ### Changed
10
18
  - Drop support for ruby < 2.7
19
+ - Test coverage with both local `undercover` and Undercover GitHub App for demo purposes
11
20
 
12
21
  # [0.4.5] - 2022-07-28
13
22
  ### Changed
@@ -114,7 +123,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
114
123
  ### Added
115
124
  - First release of `undercover` 🎉
116
125
 
117
- [Unreleased]: https://github.com/grodowski/undercover/compare/v0.4.4...HEAD
126
+ [Unreleased]: https://github.com/grodowski/undercover/compare/v0.4.7...HEAD
127
+ [0.4.7]: https://github.com/grodowski/undercover/compare/v0.4.6...v0.4.7
128
+ [0.4.6]: https://github.com/grodowski/undercover/compare/v0.4.5...v0.4.6
118
129
  [0.4.5]: https://github.com/grodowski/undercover/compare/v0.4.4...v0.4.5
119
130
  [0.4.4]: https://github.com/grodowski/undercover/compare/v0.4.3...v0.4.4
120
131
  [0.4.3]: https://github.com/grodowski/undercover/compare/v0.4.1...v0.4.3
data/README.md CHANGED
@@ -1,16 +1,17 @@
1
- # undercover 👮‍♂️
1
+ ![logo](https://github.com/grodowski/undercover/assets/4991698/c4bf038b-4472-4406-8f1f-5ddc812908d6)
2
2
 
3
- [![Build Status](https://github.com/grodowski/undercover/actions/workflows/ruby.yml/badge.svg)](https://github.com/grodowski/undercover/actions)
4
- [![Maintainability](https://api.codeclimate.com/v1/badges/b403feed68a18c072ec5/maintainability)](https://codeclimate.com/github/grodowski/undercover/maintainability)
5
- ![Downloads](https://img.shields.io/gem/dt/undercover)
3
+ `undercover` warns about methods, classes and blocks that **were changed without tests**, to help you easily find untested code and reduce the number of bugs. It does so by analysing data from git diffs, code structure and SimpleCov coverage reports.
6
4
 
7
- `undercover` examines git diffs and warns about Ruby methods, classes and blocks that **were changed without sufficient test coverage**.
8
-
9
- Works with CI/CD and automated pull request review, as well as locally using the CLI to help you reduce the number of defects caused by untested code changes.
5
+ Works with any Ruby CI pipeline as well as locally as a CLI.
10
6
 
11
7
  - Visit **[https://undercover-ci.com](https://undercover-ci.com)** to set up code review checks with the GitHub App, or use one of the [CI integrations](#code-review-integrations)
12
8
  - Learn how to find untested code changes locally with the [CLI](#usage)
13
9
 
10
+
11
+ [![Build Status](https://github.com/grodowski/undercover/actions/workflows/ruby.yml/badge.svg)](https://github.com/grodowski/undercover/actions)
12
+ [![Maintainability](https://api.codeclimate.com/v1/badges/b403feed68a18c072ec5/maintainability)](https://codeclimate.com/github/grodowski/undercover/maintainability)
13
+ ![Downloads](https://img.shields.io/gem/dt/undercover)
14
+
14
15
  A sample output of `undercover` ran before a commit may look like this:
15
16
 
16
17
  ![screenshot warning](docs/screenshot_warnings.png)
@@ -13,7 +13,7 @@ module Undercover
13
13
  def initialize(node, file_cov, file_path)
14
14
  @node = node
15
15
  @coverage = file_cov.select do |ln, _|
16
- ln > first_line && ln < last_line
16
+ first_line == last_line ? ln == first_line : ln > first_line && ln < last_line
17
17
  end
18
18
  @file_path = file_path
19
19
  @flagged = false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Undercover
4
- VERSION = '0.4.6'
4
+ VERSION = '0.4.7'
5
5
  end
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.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Grodowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-12 00:00:00.000000000 Z
11
+ date: 2024-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: imagen
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.4.1
250
+ rubygems_version: 3.5.4
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: Actionable code coverage - detects untested code blocks in recent changes