uncov 0.6.0 → 0.6.1

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: fc5eb3c1149eba5de56dd2bd43a4bf9a450abc25689456ef9290da0bb903b657
4
- data.tar.gz: '08567ab62f909c0b8ebdf9f8bc8793edcb0e96e77408b10a5249da61cab7e42d'
3
+ metadata.gz: 2f557524930fea642ca504cc2bfccfc99c7b865b930d42edcbbd76f01ec8013a
4
+ data.tar.gz: 5522f0f4b1c899e48c0b4f5ff7cc78a69005adc36d648f1f554a1778c9045eb4
5
5
  SHA512:
6
- metadata.gz: 849aec6d7483b7e76349d714ed59a7c53f0f3d9dd7c04e1423b808c0f00559274ef541fff97a024e001f7861a171c1079769229bc2bb2652500568f14f1f4283
7
- data.tar.gz: 07eda0122c302e6003ed972585f7d0103985bbf56a5bf778029a3c3591ab9535cc94c8d3b83cc211f94eace1ebf495ef10eb365d8339807179e3ec3d8e294ad7
6
+ metadata.gz: 1ea2690f56426f9c50f1d9fa05597cbf86e3c67b3eff3ecbafbcb05b8c1901588b845bfd6e14798dae35355410ff68df2305073883d556cb17c5b6a66f9734c4
7
+ data.tar.gz: 71abb30813bf499aeb08f7126fc19b2d765645df8e7e4704c006083dedcb37f270401d098dee557ef345da5c72aac43494aa65c6a02d95af28c17d5b7b2b7166
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 2025-05-31: [v0.6.1](https://github.com/mpapis/uncov/releases/tag/v0.6.1)
4
+
5
+ ### Patch
6
+
7
+ - [#63](https://github.com/mpapis/uncov/pull/63): Improve filesystem performance, by [@mpapis](https://github.com/mpapis)
8
+
9
+
3
10
  ## 2025-05-26: [v0.6.0](https://github.com/mpapis/uncov/releases/tag/v0.6.0)
4
11
 
5
12
  ### Minor
data/CONTRIBUTING.md CHANGED
@@ -12,7 +12,7 @@ All security vulnerabilities will be promptly addressed.
12
12
 
13
13
  ## Development
14
14
  - `docker-compose build uncov` to (re-)build dev container,
15
- - `docker-compose run uncov` to enter dev container,
15
+ - `docker-compose run --rm uncov` to enter dev container,
16
16
  - `bundle` to install dependencies and uncov,
17
17
  - `rake` to run lint, test and uncov - **precheck** before opening PR,
18
18
  - `uncov` to test manually
data/README.md CHANGED
@@ -66,7 +66,7 @@ nocov* - filters/flags only work with coverage/.resultset.json SimpleCov fi
66
66
  FN_GLOB: shell filename globing -> https://ruby-doc.org/core-3.1.1/File.html#method-c-fnmatch
67
67
  in bash: `shopt -s extglob dotglob globstar` and test with `ls {app,lib}/**/*.rb`
68
68
 
69
- uncov 0.6.0 by Michal Papis <mpapis@gmail.com>
69
+ uncov 0.6.1 by Michal Papis <mpapis@gmail.com>
70
70
  ```
71
71
 
72
72
 
@@ -5,8 +5,10 @@ class Uncov::Finder::FileSystem
5
5
  include Uncov::Cache
6
6
 
7
7
  def code_files
8
- list_files(Uncov.configuration.relevant_files).to_h do |file_name|
9
- [file_name, read_lines(file_name)]
8
+ cache(:code_files) do
9
+ list_files(Uncov.configuration.relevant_files).to_h do |file_name|
10
+ [file_name, read_lines(file_name)]
11
+ end
10
12
  end
11
13
  end
12
14
 
@@ -17,7 +19,9 @@ class Uncov::Finder::FileSystem
17
19
  private
18
20
 
19
21
  def test_files
20
- list_files(Uncov.configuration.relevant_tests)
22
+ cache(:test_files) do
23
+ list_files(Uncov.configuration.relevant_tests)
24
+ end
21
25
  end
22
26
 
23
27
  def list_files(glob)
@@ -25,6 +29,8 @@ class Uncov::Finder::FileSystem
25
29
  end
26
30
 
27
31
  def read_lines(file_name)
28
- File.readlines(file_name).each_with_index.to_h { |line, line_index| [line_index + 1, line.rstrip] }
32
+ lines = {}
33
+ File.foreach(file_name).with_index(1) { |line, idx| lines[idx] = line.chomp }
34
+ lines
29
35
  end
30
36
  end
data/lib/uncov/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uncov
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uncov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Papis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-26 00:00:00.000000000 Z
11
+ date: 2025-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize