undercover 0.6.2 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8032a929c8402ef3701487bb89a926e1de29a03fd26f71cb916c89823e0d196
4
- data.tar.gz: 6d08da77871f2457ffcf51e0cf1af8876f6b48e4a27116f8bbf034cabfb294c9
3
+ metadata.gz: 6858f42ada692894674f818d7713d20e8239051d06547f72e721f6122dda53be
4
+ data.tar.gz: ef323b826f66d68a5ad0a5a7c14f5d37d3a85344f0efe82ac457181745000fb9
5
5
  SHA512:
6
- metadata.gz: 1947ac5a7c8c9facddb74f74eb6fb185250b16ca4b576690def6de50ce94f5030f83cb59b448bd942f7114c3c95da080f11fbb57d409c47067f2e1e0f126cfe7
7
- data.tar.gz: 8d5098876286f6d5aa7ff8bff316e31af567758e65194897000f47ddeb6b7dc8c82b8ba2962eae02809b158be528ff7346d9acefca4cb4769c9acfcfeaeb332e
6
+ metadata.gz: 365149055a1553d4bc6dfde0475cd4b1bc6a3a82c7a0cb5c5fbcf7604c078e320bafcd85b783d495bc4667bff58c0ebffeb5ec76a982c61bcb366e8a9a8edc18
7
+ data.tar.gz: d5d7ec83fd50f1504f38bdd9961be84d365d5f3882045a1028f3daf45cd309a5ded497941e723cf3f3ce0eb335dfba34310f69b3d5efb91b0013fc5f69cc77a8
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ # [0.6.3] - 2024-12-23
10
+
11
+ ### Fixed
12
+ - Fix false positives with empty blocks/methods on a single line ([#216](https://github.com/grodowski/undercover/issues/216)) by [@splattael](https://github.com/splattael).
13
+ - Updated list of default excluded directories (added `db/` and `config/`)
14
+
9
15
  # [0.6.0] - 2024-12-12
10
16
  ### Added
11
17
  - Add support for including and exluding files by glob patterns, supplied through CLI args and the configuration file (#146)
@@ -137,7 +143,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
137
143
  ### Added
138
144
  - First release of `undercover` 🎉
139
145
 
140
- [Unreleased]: https://github.com/grodowski/undercover/compare/v0.6.0...HEAD
146
+ [Unreleased]: https://github.com/grodowski/undercover/compare/v0.6.3...HEAD
147
+ [0.6.3]:https://github.com/grodowski/undercover/compare/v0.6.3...v0.6.0
141
148
  [0.6.0]: https://github.com/grodowski/undercover/compare/v0.6.0...v0.5.0
142
149
  [0.5.0]: https://github.com/grodowski/undercover/compare/v0.4.7...v0.5.0
143
150
  [0.4.7]: https://github.com/grodowski/undercover/compare/v0.4.6...v0.4.7
@@ -18,7 +18,7 @@ module Undercover
18
18
  ].freeze
19
19
 
20
20
  DEFAULT_FILE_INCLUDE_GLOBS = %w[*.rb *.rake *.ru Rakefile].freeze
21
- DEFAULT_FILE_EXCLUDE_GLOBS = %w[test/* spec/* db/* *_test.rb *_spec.rb].freeze
21
+ DEFAULT_FILE_EXCLUDE_GLOBS = %w[test/* spec/* db/* config/* *_test.rb *_spec.rb].freeze
22
22
 
23
23
  attr_accessor :lcov,
24
24
  :path,
@@ -10,10 +10,16 @@ module Undercover
10
10
 
11
11
  def_delegators :node, :first_line, :last_line, :name
12
12
 
13
- def initialize(node, file_cov, file_path)
13
+ def initialize(node, file_cov, file_path) # rubocop:disable Metrics/MethodLength
14
14
  @node = node
15
15
  @coverage = file_cov.select do |ln, _|
16
- (node.empty_def? ? ln >= first_line : ln > first_line) && ln < last_line
16
+ if first_line == last_line
17
+ ln == first_line
18
+ elsif node.empty_def?
19
+ ln >= first_line
20
+ else
21
+ ln > first_line && ln < last_line
22
+ end
17
23
  end
18
24
  @file_path = file_path
19
25
  @flagged = false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Undercover
4
- VERSION = '0.6.2'
4
+ VERSION = '0.6.3'
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.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Grodowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-15 00:00:00.000000000 Z
11
+ date: 2024-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal