foobara 0.0.140 → 0.0.141
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/projects/command/src/command_pattern_implementation/concerns/reflection.rb +2 -2
- data/projects/command_connectors/src/command_connector.rb +1 -1
- data/projects/manifest/src/foobara/manifest/attributes.rb +5 -1
- data/projects/type_declarations/src/sensitive_type_removers/attributes.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 338a171937c3133f7c23ce219f6c67a22f464b30727cb0987b88ef8fa2ae0cf9
|
4
|
+
data.tar.gz: 89ba9d99021a7914338de39be6a38520849702e33e38d20da39dcce05ce3f9d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6b27814d890df2c4f46455a944c226b054383ec2112ee7fa937c0b25743bd6fbb8f099c973ad3b8f7bc9a0d603be39f9c59e08ada848332213baec8a1a92475
|
7
|
+
data.tar.gz: 67cf268318f31ea950e63cdf58f6927853d43b226c70dea0e7b42889442c2dbf1a9925927f623df6e673e386fe9ad9d53c4b823f822e3a138bc040cf1d9bc78f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# [0.0.141] - 2025-07-31
|
2
|
+
|
3
|
+
- Fix bug returning a non-strict type declaration in the command connector manifest
|
4
|
+
- Support using :attributes as a type to permit anything with symbolizable keys
|
5
|
+
- Fix buggy global domain in command connector manifest
|
6
|
+
|
1
7
|
# [0.0.140] - 2025-07-25
|
2
8
|
|
3
9
|
- Support result :array, &block style for declaring result type
|
@@ -72,11 +72,11 @@ module Foobara
|
|
72
72
|
possible_errors:,
|
73
73
|
depends_on:,
|
74
74
|
# TODO: allow inputs type to be nil or really any type?
|
75
|
-
inputs_type: inputs_type&.reference_or_declaration_data ||
|
75
|
+
inputs_type: inputs_type&.reference_or_declaration_data || GlobalDomain.foobara_type_from_declaration(
|
76
76
|
type: "::attributes",
|
77
77
|
element_type_declarations: {},
|
78
78
|
required: []
|
79
|
-
|
79
|
+
).declaration_data
|
80
80
|
).merge(description:)
|
81
81
|
|
82
82
|
if result_type
|
@@ -628,7 +628,7 @@ module Foobara
|
|
628
628
|
fixed_scoped_path = error.scoped_full_path[index..]
|
629
629
|
fixed_scoped_name = fixed_scoped_path.join("::")
|
630
630
|
fixed_scoped_prefix = fixed_scoped_path[..-2]
|
631
|
-
fixed_parent = [:domain, domain.
|
631
|
+
fixed_parent = [:domain, domain.reference]
|
632
632
|
|
633
633
|
error.relevant_manifest.merge(
|
634
634
|
parent: fixed_parent,
|
@@ -3,7 +3,7 @@ require_relative "type_declaration"
|
|
3
3
|
module Foobara
|
4
4
|
module Manifest
|
5
5
|
class Attributes < TypeDeclaration
|
6
|
-
optional_keys :required, :defaults
|
6
|
+
optional_keys :required, :defaults, :element_type_declarations
|
7
7
|
|
8
8
|
alias attributes_manifest relevant_manifest
|
9
9
|
|
@@ -19,6 +19,10 @@ module Foobara
|
|
19
19
|
DataPath.value_at([:defaults, attribute_name], attributes_manifest)
|
20
20
|
end
|
21
21
|
|
22
|
+
def has_attribute_declarations?
|
23
|
+
!element_type_declarations.nil?
|
24
|
+
end
|
25
|
+
|
22
26
|
def attribute_declarations
|
23
27
|
element_type_declarations.keys.to_h do |attribute_name|
|
24
28
|
[
|
@@ -4,6 +4,13 @@ module Foobara
|
|
4
4
|
module TypeDeclarations
|
5
5
|
module SensitiveTypeRemovers
|
6
6
|
class Attributes < SensitiveTypeRemover
|
7
|
+
def applicable?(strict_type_declaration)
|
8
|
+
return false unless super
|
9
|
+
|
10
|
+
element_type_declarations = strict_type_declaration[:element_type_declarations]
|
11
|
+
element_type_declarations && !element_type_declarations.empty?
|
12
|
+
end
|
13
|
+
|
7
14
|
def transform(strict_type_declaration)
|
8
15
|
to_change = {}
|
9
16
|
to_remove = []
|
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.
|
4
|
+
version: 0.0.141
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-07-
|
10
|
+
date: 2025-07-31 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: bigdecimal
|