dynamoid 3.13.0 → 3.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: b115b0eb8a9244d3482f3b748edf42272f6d9ffa94db20c5c07c7d08a6a3cf6a
4
- data.tar.gz: 60821b56861e74149f3751f0c58bbc58e6805a9b4db0a4b863527aad99748099
3
+ metadata.gz: f4d2a63b70604d568d7656adc8e0c45fd30d358d004d5f6fb1591bf5b2731ef3
4
+ data.tar.gz: fbd7978ace3ce520c5afc2c445008bac5cec106579212811f34d8a445a0c5152
5
5
  SHA512:
6
- metadata.gz: 1eef7ad0569e01d06b8f52a273acff4621a23419bc7f83830dfb37a44149149ec41b010cfa96c4e81d51043b4c7154c7996c72d7e50b599b4ea969ff6bb7575f
7
- data.tar.gz: ee7561403e8f0bfd2c0e29e2212c0cec903e264c83adc9d238d565054bc98f111d85b3e70e64e838d6c35a434d8b7ef3025eba347ccfee53d249a3834ce53dc0
6
+ metadata.gz: 39347924ec0c682f520a62ddbbf7e51613907575e096f6e525b96218f29431044e8c92d11a3e75e9bfeb2c5553cb637bea84dcedf44bf57da9fbb5e9bf78608b
7
+ data.tar.gz: 333c22e0d878463aa5d25c1765a2b4b379dd9cc9c8c616447d87b6cbf2b1a97cab8f339815dc77a92dbd7ca042f1cf954cf585b36c25bbeabaa7adc61aa81787
data/CHANGELOG.md CHANGED
@@ -11,7 +11,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
  ### Changed
12
12
  ### Removed
13
13
 
14
- ## 3.13.0
14
+ ## 3.13.1
15
+
16
+ ### Fixed
17
+ * [#1003](https://github.com/Dynamoid/dynamoid/pull/1003) Fix detecting dirty changes for `:map` fields
18
+ ### Added
19
+ ### Changed
20
+ ### Removed
21
+
22
+ ## 3.13.0 / 2026-03-29
15
23
 
16
24
  ### Fixed
17
25
  * [#944](https://github.com/Dynamoid/dynamoid/pull/944) Fix `#delete` and `#destroy` methods and set `#destroyed?` properly when operations fail
@@ -303,7 +303,16 @@ module Dynamoid
303
303
  value = read_attribute(name)
304
304
  type_options = self.class.attributes[name.to_sym]
305
305
 
306
- unless type_options[:type].is_a?(Class) && !type_options[:comparable]
306
+ if self.class.attributes.dig(name.to_sym, :type) == :map && value.is_a?(Hash)
307
+ # A special case for the :map field type. attributes_from_database is a
308
+ # HashWithIndifferentAccess which has a side effect - it converts any
309
+ # nested Hash to HashWithIndifferentAccess as well.
310
+ # HashWithIndifferentAccess#== does not tolarate containing symbolized
311
+ # keys in an argument Hash. So if a value is a Hash and may have
312
+ # symbolized keys - wrap it into HashWithIndifferentAccess.
313
+ value_wrapped = value.with_indifferent_access
314
+ value_wrapped != value_from_database
315
+ elsif !type_options[:type].is_a?(Class) || type_options[:comparable]
307
316
  # common case
308
317
  value != value_from_database
309
318
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dynamoid
4
- VERSION = '3.13.0'
4
+ VERSION = '3.13.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.0
4
+ version: 3.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Symonds
@@ -263,10 +263,10 @@ licenses:
263
263
  - MIT
264
264
  metadata:
265
265
  homepage_uri: http://github.com/Dynamoid/dynamoid
266
- source_code_uri: https://github.com/Dynamoid/dynamoid/tree/v3.13.0
267
- changelog_uri: https://github.com/Dynamoid/dynamoid/blob/v3.13.0/CHANGELOG.md
266
+ source_code_uri: https://github.com/Dynamoid/dynamoid/tree/v3.13.1
267
+ changelog_uri: https://github.com/Dynamoid/dynamoid/blob/v3.13.1/CHANGELOG.md
268
268
  bug_tracker_uri: https://github.com/Dynamoid/dynamoid/issues
269
- documentation_uri: https://www.rubydoc.info/gems/dynamoid/3.13.0
269
+ documentation_uri: https://www.rubydoc.info/gems/dynamoid/3.13.1
270
270
  funding_uri: https://opencollective.com/dynamoid
271
271
  wiki_uri: https://github.com/Dynamoid/dynamoid/wiki
272
272
  rubygems_mfa_required: 'true'