foobara 0.5.0 → 0.5.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: 3046470d98af9744d3a56b57618b2d9b7faf8baa852dfc38e48199eebed873ab
4
- data.tar.gz: 0b108df1a04e3b87371ff24a619c8d81c5e51891a58ed94749a61a94136f2bee
3
+ metadata.gz: fbe07dc4815630bc663e2d203a40e6ee507e7a35cd800937ed075c717b349842
4
+ data.tar.gz: aa8b0cfe1e3dc73a9d5633a709589b8cd51efea18d901d801a33700bfba390d3
5
5
  SHA512:
6
- metadata.gz: 6af6860ee916c0cf343e47d8145be880de9a65819a2b0a1b9f52da046a154bb5dca168918a48baefe08769d69553c5dae935f3351879233af096d12dafa38c8e
7
- data.tar.gz: da2e4bef50d5f2b06d414237f28b0e17f4447cfd2ad61bf01f2eecf866e724aae901aaa3a44dad8d03c652d0c9c8df425948f6ab7f4b2e538140661f1901891a
6
+ metadata.gz: 7dba889d195cd4e4f6cf6edc640f6e2b3090822e272961aa0041bd7fa1e30ac75d2a624b8ca7433aa43d4bc16401416664c0666bfcfcf29e7a1a0128555e76a9
7
+ data.tar.gz: e123cb980d054dd4c853143f22c35423712891feb1a8bf69a1f33af8f9fa0c85ac47b2195542a09a3077db8926843b980f77ccc3d05b4185a312ee5aa00ae971
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # [0.5.1] - 2026-01-29
2
+
3
+ - Fix bug where checking defaults on a type reference explodes
4
+
1
5
  # [0.5.0] - 2026-01-27
2
6
 
3
7
  - Default crud driver table names to be fully qualified to fix bugs in RedisCrudDriver and LocalFilesCrudDriver
@@ -17,7 +17,10 @@ module Foobara
17
17
  value = attributes_hash[attribute_name]
18
18
 
19
19
  if value.nil?
20
- allow_nil = parent_declaration_data[:element_type_declarations][attribute_name][:allow_nil]
20
+ attribute_type_declaration = parent_declaration_data[:element_type_declarations][attribute_name]
21
+ allow_nil = if attribute_type_declaration.is_a?(::Hash)
22
+ attribute_type_declaration[:allow_nil]
23
+ end
21
24
 
22
25
  unless allow_nil
23
26
  to_apply[attribute_name] = default.is_a?(Proc) ? default.call : default
data/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Foobara
2
2
  module Version
3
- VERSION = "0.5.0".freeze
3
+ VERSION = "0.5.1".freeze
4
4
  MINIMUM_RUBY_VERSION = ">= 3.4.0".freeze
5
5
  end
6
6
  end
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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi