faulty 0.13.0 → 0.13.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: 3642cb65b01572d880aec16ece320bed43b9c12ae13a2dce602c1bf2a5a250c3
4
- data.tar.gz: 7116acd4f458c31a738d0f90a7ac0bc0f37e392e75105f19e7b9648af9d7b4c7
3
+ metadata.gz: 6a4a53b4acae5b6c5a96a2ff7bd948fefd483baec3662b62b7b102e928a67b20
4
+ data.tar.gz: a0af7add5cbc7f9e834fbf788b0cb8de43b2dc898421ad7c7380d16a68dbf485
5
5
  SHA512:
6
- metadata.gz: b7078729322061727335102869126e65348f270a71a41b624a2722d62c416672f6b39778338faf570ceac39b7355ebfbc8bf4aff7e866123aada12ba507172ad
7
- data.tar.gz: 117eae9db002823c62280a7236f5a1969409b6baeffa9c51b0430205f23df5b0238890602cae2217fb19da6e22ea8ebbabf622c750bbb732cd95d0a2caa85554
6
+ metadata.gz: 0da0c7361aa0f09ec0317ca993e1cc48f429876dbec1022c75d25e5a1c01b54bf6c9fa0af0a6b9b96ab9ed497b020bebf35eca9a6c7e6df5442ceec044095e75
7
+ data.tar.gz: a5967ca7e589c531008675d3624c234f6cd5f9772cb56a544bf99ef30b4b9d983a5f22c01f23eba6942adc80ed4e5352d0874a76638a24eadcda92d29cfb3a3c
data/CHANGELOG.md CHANGED
@@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
  [Unreleased]
10
10
  -------------------
11
11
 
12
+ [0.13.1] - 2026-05-29
13
+ ---------------------
14
+
15
+ ### Fixed
16
+
17
+ * `Cache::AutoWire.wrap` now applies `CircuitProxy` and `FaultTolerantProxy`
18
+ to `Cache::Default` when the resolved backend is not fault tolerant (e.g.
19
+ `Rails.cache`). Previously a `nil` cache short-circuited the wrapping and
20
+ could leave the auto-wired cache non-fault-tolerant. justinhoward
21
+
12
22
  [0.13.0] - 2026-05-13
13
23
  ---------------------
14
24
 
@@ -29,7 +29,10 @@ class Faulty
29
29
  class << self
30
30
  # Wrap a cache backend with sensible defaults
31
31
  #
32
- # If the cache is `nil`, create a new {Default}.
32
+ # If the cache is `nil`, create a new {Default}. Since {Default} may
33
+ # resolve to a non-fault-tolerant backend (e.g. `Rails.cache`), the
34
+ # result is passed back through {wrap} so it still receives the
35
+ # {CircuitProxy} and {FaultTolerantProxy} wrappers when needed.
33
36
  #
34
37
  # If the backend is not fault tolerant, wrap it in {CircuitProxy} and
35
38
  # {FaultTolerantProxy}.
@@ -40,7 +43,7 @@ class Faulty
40
43
  def wrap(cache, **options, &)
41
44
  options = Options.new(options, &)
42
45
  if cache.nil?
43
- Cache::Default.new
46
+ wrap(Cache::Default.new, **options.to_h)
44
47
  elsif cache.fault_tolerant?
45
48
  cache
46
49
  else
@@ -3,6 +3,6 @@
3
3
  class Faulty
4
4
  # The current Faulty version
5
5
  def self.version
6
- Gem::Version.new('0.13.0')
6
+ Gem::Version.new('0.13.1')
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faulty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Howard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-14 00:00:00.000000000 Z
11
+ date: 2026-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -152,7 +152,7 @@ licenses:
152
152
  metadata:
153
153
  rubygems_mfa_required: 'true'
154
154
  changelog_uri: https://github.com/ParentSquare/faulty/blob/master/CHANGELOG.md
155
- documentation_uri: https://www.rubydoc.info/gems/faulty/0.13.0
155
+ documentation_uri: https://www.rubydoc.info/gems/faulty/0.13.1
156
156
  post_install_message:
157
157
  rdoc_options: []
158
158
  require_paths: