foobara 0.0.120 → 0.0.121

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: df43aec79b46e3e71fd064c6482bdd5dd6e0af495987d6cea1cdf97311460e91
4
- data.tar.gz: 800093b7a126bbca27fa300c4df50b568b329c762ad7a2c68925f4a3d5690090
3
+ metadata.gz: 80f2fbb04c10d91d28ece159f2a3c229ba4698579acac813e19625380564928b
4
+ data.tar.gz: acbe6117c76fc36741583db4bffdf26db37f8f54f75d74b2c810b7f44a37a8f4
5
5
  SHA512:
6
- metadata.gz: 6305514bda86178efb70d09cd8ff8d46e404f0407b50189833b9939230cf716a80049afca17ea5071599bfb71f4cd45a660ade570b6bfcec063190e9b3a02096
7
- data.tar.gz: 84705a7ff3bd306c13e7cdf5e81a3a960b0e769df51dacf38859a003da408926133c434d9d03ba2a58b70e57946b58d8355da338a0e780cab34f35a3e84df97c
6
+ metadata.gz: 70b1abede851dcafe1209e13c2d725e39240ab4746666a3b5683274f19051f6dfc84d188a05aac77b3ca7642c0c86661bcf040b5d444109a1a9884ff3f668071
7
+ data.tar.gz: ca9b9cdeca157bc2595f9de3888f88eb4ef358036591bfd74793306fb5ff20912bde4570ea97c13bfc396c8e025f2d41051815d02fe1c77f1c4761ef624c2c69
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # [0.0.121] - 2025-05-11
2
+
3
+ - Handle gnarly bugs that arise when creating a custom type named model (or entity or detached_entity)
4
+
1
5
  # [0.0.120] - 2025-05-11
2
6
 
3
7
  - Fix a race condition in persistence
@@ -21,7 +21,7 @@ module Foobara
21
21
  end
22
22
 
23
23
  def build_method
24
- if to_type.extends?(:entity)
24
+ if to_type.extends_type?(BuiltinTypes[:entity])
25
25
  # TODO: test this code path
26
26
  # :nocov:
27
27
  :build
@@ -4,8 +4,6 @@ module Foobara
4
4
  module TypeDeclarations
5
5
  module Handlers
6
6
  class RegisteredTypeDeclaration < TypeDeclarationHandler
7
- # type_symbol is basically just a flag that lets us know that type is fully qualified.
8
- # rather hacky but other potential workarounds seemed gnarlier
9
7
  class ShortTypeNameDesugarizer < TypeDeclarations::Desugarizer
10
8
  def applicable?(sugary_type_declaration)
11
9
  return false if TypeDeclarations.strict_stringified? || TypeDeclarations.strict?
@@ -15,7 +15,11 @@ module Foobara
15
15
  end
16
16
 
17
17
  def registered_type(strict_type_declaration)
18
- lookup_type!(type_symbol(strict_type_declaration))
18
+ symbol = type_symbol(strict_type_declaration)
19
+ if TypeDeclarations.strict? || TypeDeclarations.strict_stringified?
20
+ symbol = "::#{symbol}"
21
+ end
22
+ lookup_type!(symbol)
19
23
  end
20
24
 
21
25
  def target_classes(strict_type_declaration)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.120
4
+ version: 0.0.121
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi