safe_memoize 0.6.1 → 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: 036e876f53d96a1c6ca54ae257bb631c30b0b973a0f0bed77b6fafd92f187c93
4
- data.tar.gz: 2d09472476154ff424940a59666b5a891d95156d44a829025ad9929f92fed24d
3
+ metadata.gz: fcdb1584d3b3306021fa9e49007f686f561cd2658ea811e97fc18d89e36cb20e
4
+ data.tar.gz: bc69db3f6d77baf031c6a1b92004ca2b4d5c60346b9546ec29388231e2d3d782
5
5
  SHA512:
6
- metadata.gz: d0004ea27b6d21d3e32df92f782ddb0d4a768212d4344e3d4e4793d6eb44bb481b309a05a875bb166e1633f3be8c08e4580b006f512dd74723383e11516ff5c4
7
- data.tar.gz: 6a81f21e5e4347a723305893cfcf3dbe8b4b71bdb0ef3767774276e7046893e5ec12471898b6ecfc87df135b0462691324fa16808369a5ad98fc6e54d6ce1a14
6
+ metadata.gz: f1a8bb8cd2ee519a39b90ed96ebac7a700d759e05bc0561225663ee24b6f595660f25da36dda2db4509fb521a9048a38b904760a06e2d09c2347fd52f5011db0
7
+ data.tar.gz: dc1d3b24ecc9fe4a747f1ba12f2a9af335d61f671f1261203a43ff831fc7460dce8e1adf2142c771ff93d5f278127f9a9a54fe408b4361a8a585cebce8ba65a0
@@ -83,7 +83,7 @@ jobs:
83
83
  bundle exec ruby bin/release_notes "$version" "${RUNNER_TEMP}/release_notes.md"
84
84
 
85
85
  - name: Create GitHub release
86
- uses: softprops/action-gh-release@v2
86
+ uses: softprops/action-gh-release@v3
87
87
  with:
88
88
  body_path: ${{ runner.temp }}/release_notes.md
89
89
  files: pkg/*.gem
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.6.3] - 2026-05-18
4
+
5
+ - Upgrade `softprops/action-gh-release` from v2 to v3 to resolve Node.js 20 deprecation warning in release workflow
6
+
7
+ ## [0.6.2] - 2026-05-18
8
+
9
+ - Achieve 100% line coverage across all lib files
10
+ - Add SimpleCov filter to exclude `/spec` from coverage reporting
11
+ - Add tests for `memo_ttl` in `CacheRecordMethods` covering nil, valid numeric, negative, and non-numeric inputs
12
+ - Add tests for private `memo_cache_read` in `CacheStoreMethods` covering nil cache, live hit, and expired entry
13
+ - Add tests for `memo_keys` / `memo_values` with custom-key entries, covering the `custom_key:` projection branch in `InspectionMethods`
14
+ - Add missing error-case tests for `ReleaseTooling.update_version_file` (no VERSION constant) and `finalize_changelog` (no Unreleased heading)
15
+
3
16
  ## [0.6.1] - 2026-05-17
4
17
 
5
18
  - Fix `memo_keys` and `memo_values` showing `args: custom_key, kwargs: nil` for methods using `memoize_with_custom_key` — now surfaces as `custom_key:`
@@ -18,7 +31,7 @@
18
31
 
19
32
  ## [0.5.0] - 2026-05-17
20
33
 
21
- - Drop support for Ruby 3.2 (EOL); minimum required version is now Ruby 3.3
34
+ - Drop support for Ruby 3.2 (EOL); minimum required version is now Ruby 3.3
22
35
 
23
36
  ## [0.4.0] - 2026-05-17
24
37
 
data/README.md CHANGED
@@ -18,6 +18,10 @@ end
18
18
 
19
19
  SafeMemoize uses `Hash#key?` to distinguish "not yet cached" from "cached nil/false", so your methods are only computed once regardless of return value.
20
20
 
21
+ ## How It Works
22
+
23
+ SafeMemoize uses Ruby's `prepend` mechanism. When you call `memoize :method_name`, it creates an anonymous module with a wrapper method and prepends it onto your class. The wrapper calls `super` to invoke the original method and stores the result in a per-instance hash. Thread safety is achieved with a per-instance `Mutex` using double-check locking.
24
+
21
25
  ## Features
22
26
 
23
27
  - [Correctly memoizes `nil` and `false` return values](#nil-and-false-safety)
@@ -519,10 +523,6 @@ obj.cache_metrics_reset # Clears all collected metrics
519
523
 
520
524
  Metrics are per-instance and reset independently from the cache itself — clearing metrics does not evict cached values.
521
525
 
522
- ## How It Works
523
-
524
- SafeMemoize uses Ruby's `prepend` mechanism. When you call `memoize :method_name`, it creates an anonymous module with a wrapper method and prepends it onto your class. The wrapper calls `super` to invoke the original method and stores the result in a per-instance hash. Thread safety is achieved with a per-instance `Mutex` using double-check locking.
525
-
526
526
  ## Development
527
527
 
528
528
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rspec` to run the tests. You can also run `bin/console` for an interactive prompt.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SafeMemoize
4
- VERSION = "0.6.1"
4
+ VERSION = "0.6.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safe_memoize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuck Smith