datacaster 3.3.0 → 3.3.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: 57a921f071865d8d6fae653de1e80edc19e1eaf5d2a37450ccd7b32a24f4386f
4
- data.tar.gz: 5307a9a2f7619c331efd7620a2e1a2a7a3b11a82bec3e6ad760e8ec75a29ad84
3
+ metadata.gz: 5864f7aa276d30db8a1c774847715f6167733719b1f5ea0364a1997732dbffeb
4
+ data.tar.gz: 546d45344a7c8acb31510c3a6dc99c275067041d3a06b5d705da6867714ac953
5
5
  SHA512:
6
- metadata.gz: 5b7f3713ebd7ce4568ae79d612e0ee2a8277d0c6baeb398e24975ff95c1167d151649565378240445765ac3499ff5db0c65380d5f215556449505e6e9f2b88a1
7
- data.tar.gz: 5dc58c8d0f853ce3d906e6606af932e7531012666f77a813bf38684463a4606e4bdae3d1f0c63ae1159a1573f30b274b3fffcf9224efa82c34705b73b1671261
6
+ metadata.gz: 03a21b07500ea5fbae488b4e3664b635833a38b107d231a0cad67a89ff522a63ce6652ae24d9db9c2cf2229fd1709c40d49219691f255e1e0cf0635bd0015347
7
+ data.tar.gz: 59257ede6016d05f13a0f64ed3277131f18cd82b4e3cf17a6d97ee850593e7d111e3f195690a9581f9f13540d82d81713e71ae74bf0d8cc678215179fb43283c
data/README.md CHANGED
@@ -595,6 +595,8 @@ login.("test")
595
595
 
596
596
  Always returns ValidResult.
597
597
 
598
+ Returned `default_value` is deeply frozen with [Ractor::make_shareable](https://docs.ruby-lang.org/en/master/Ractor.html#method-c-make_shareable) to prevent application bugs due to modification of unintentionally shared value. If that effect is undesired, use [`transform { value }`](#transform--value--) instead.
599
+
598
600
  Returns `default_value` in the following cases:
599
601
 
600
602
  * if the value is `Datacaster.absent` (`on` is disregarded in such case)
@@ -849,7 +851,7 @@ I18n keys:
849
851
 
850
852
  Always returns ValidResult. The value is transformed to provided argument (disregarding the original value).
851
853
 
852
- Returned value is deeply freezed with [`Ractor::make_shareable`](https://docs.ruby-lang.org/en/master/Ractor.html#method-c-make_shareable) to prevent application bugs due to modification of unintentionally shared value. If that effect is undesired, use [`transform { value }`](#transform--value--) instead.
854
+ Returned value is deeply frozen with [`Ractor::make_shareable`](https://docs.ruby-lang.org/en/master/Ractor.html#method-c-make_shareable) to prevent application bugs due to modification of unintentionally shared value. If that effect is undesired, use [`transform { value }`](#transform--value--) instead.
853
855
 
854
856
  See also [`default`](#defaultdefault_value-on-nil).
855
857
 
@@ -131,7 +131,7 @@ module Datacaster
131
131
  transform do |x|
132
132
  if x == Datacaster.absent ||
133
133
  (!on.nil? && x.respond_to?(on) && x.public_send(on))
134
- value
134
+ Datacaster::Utils.deep_freeze(value)
135
135
  else
136
136
  x
137
137
  end
@@ -1,3 +1,3 @@
1
1
  module Datacaster
2
- VERSION = "3.3.0"
2
+ VERSION = "3.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datacaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Zolotarev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-05 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel