foobara 0.0.95 → 0.0.97

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: 10cd2a997729a02fc1b6f3ea24a4694a7ec3a0e5908eb3fd37f2f90fd7e56c71
4
- data.tar.gz: 2568a8ffbc4885f8a1edc70c4a7f41582631b0e8f55e6ff6100166814d579a8e
3
+ metadata.gz: 270bbdab2495946ef47796953a750bf7bf5c64ae8e238c9f4a7e2a14fd5f41cd
4
+ data.tar.gz: c73d0aef1208748ab136b1ce7c5da8a78bce8cf3c0c5a5a8dd9cc42068081bab
5
5
  SHA512:
6
- metadata.gz: d41fffe3ecdb08e1c6366ce4bf58cf7733bebcf595f16745ef6b3cd3a1ddfa67a19934934b73aff8e225e03205c73ade43b5ee92d429ba9f1a3d832de1856667
7
- data.tar.gz: 61dba1a73fb5cb3399b68f2a8f00586f79268495106393b3083beb505d6fecd5c896dfb74beec941e3e4d8c8521e212bc6f499889c68f28c37b56c91c10c4260
6
+ metadata.gz: 572b047d7dc0ac8d2e2e527e24b5e1d522bbe1dccfd713cc39bf2ac61ebf5d941469332da94941cf2f85b60d54259a5f6aa29449a0ed3f9d289f205d875bbec7
7
+ data.tar.gz: ba380f9ac1e582affe1821df1bc5c188d5c5a933206e810cec9593b66d958cce1ab0d14c4b25889798d5e46dbcbb10c4e6c4c312df7adf5fcf523c134f6a0211
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [0.0.97] - 2025-04-10
2
+
3
+ - Make atomic serializer dig into first entity instead of staying at the top
4
+
5
+ # [0.0.96] - 2025-04-08
6
+
7
+ - Do not attempt to remove sensitive types from non-model extension declarations
8
+
1
9
  # [0.0.95] - 2025-04-07
2
10
 
3
11
  - Split up #run and #build_request_and_command in CommandConnector to help subclasses
@@ -3,15 +3,24 @@ module Foobara
3
3
  module Serializers
4
4
  class AtomicSerializer < SuccessSerializer
5
5
  def serialize(object)
6
- if object.is_a?(Model)
6
+ case object
7
+ when DetachedEntity
7
8
  if object.is_a?(Entity) && !object.built? && !object.loaded?
8
9
  object.class.load(object)
9
10
  end
10
11
 
11
- object = object.attributes_with_delegates
12
+ entities_to_primary_keys_serializer.serialize(object.attributes_with_delegates)
13
+ when Model
14
+ serialize(object.attributes_with_delegates)
15
+ when Array
16
+ object.map { |element| serialize(element) }
17
+ when Hash
18
+ object.to_h do |key, value|
19
+ [serialize(key), serialize(value)]
20
+ end
21
+ else
22
+ object
12
23
  end
13
-
14
- entities_to_primary_keys_serializer.serialize(object)
15
24
  end
16
25
 
17
26
  def entities_to_primary_keys_serializer
@@ -2,6 +2,10 @@ module Foobara
2
2
  class Model
3
3
  module SensitiveTypeRemovers
4
4
  class Model < TypeDeclarations::SensitiveTypeRemover
5
+ def applicable?(strict_type_declaration)
6
+ strict_type_declaration.is_a?(::Hash) && strict_type_declaration.key?(:attributes_declaration)
7
+ end
8
+
5
9
  def transform(strict_type_declaration)
6
10
  old_attributes_declaration = strict_type_declaration[:attributes_declaration]
7
11
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.95
4
+ version: 0.0.97
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-08 00:00:00.000000000 Z
10
+ date: 2025-04-10 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bigdecimal