foobara 0.1.2 → 0.1.4
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 +12 -0
- data/projects/command/src/command_pattern_implementation/concerns/namespace.rb +8 -0
- data/projects/command_connectors/src/command_connector.rb +12 -4
- data/projects/command_connectors/src/transformed_command.rb +38 -20
- data/projects/domain/src/is_manifestable.rb +14 -4
- 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: 5ff971dedd276b649d7ceb9b184734a47074357ab20b517b01a377bf7dfedfaa
|
4
|
+
data.tar.gz: a1b07c225fdddebd6dd859650db155a7e20aca66fe0647211d5daede966b305f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d797ddc6c22d97617ffe9c1c951d66257f305dceedccaa5df80f0da3283a902a3c7acfd086dd4603957e3efa2a9f2b06a0851bb6cc420884839f79f19c70816
|
7
|
+
data.tar.gz: f57df9169e0da18ffc23d57e9fd8b2c5d218714938e4b37f1d4de1b19344774756915702d152b19ace97302b481df9bf6b9e4467db590b34f606cae2861cf44f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# [0.1.4] - 2025-08-24
|
2
|
+
|
3
|
+
- Fix TransformedCommand#foobara_manifest bug that failed to overwrite transformed possible_errors
|
4
|
+
if the new possible errors is empty
|
5
|
+
- Make sure we set nil inputs_type in TransformedCommand#foobara_manifest to empty attributes
|
6
|
+
for compatibility with other projects
|
7
|
+
- Sets the parent for various Foobara::Value children to be GlobalDomain in manifests
|
8
|
+
|
9
|
+
# [0.1.3] - 2025-08-24
|
10
|
+
|
11
|
+
- Add Command#abstract and exclude abstract commands from CommandConnector#connect when connecting domains/orgs
|
12
|
+
|
1
13
|
# [0.1.2] - 2025-08-24
|
2
14
|
|
3
15
|
- Exclude processor/processor_class categories from manifest by default
|
@@ -344,13 +344,21 @@ module Foobara
|
|
344
344
|
command_registry.register(*args, **opts)
|
345
345
|
when Module
|
346
346
|
if registerable.foobara_organization?
|
347
|
+
args = args[1..]
|
347
348
|
registerable.foobara_domains.map do |domain|
|
348
|
-
connect(domain, *args
|
349
|
+
connect(domain, *args, **opts)
|
349
350
|
end.flatten
|
350
351
|
elsif registerable.foobara_domain?
|
351
|
-
|
352
|
-
|
353
|
-
|
352
|
+
args = args[1..]
|
353
|
+
connected = []
|
354
|
+
|
355
|
+
registerable.foobara_each_command(mode: Namespace::LookupMode::DIRECT) do |command_class|
|
356
|
+
unless command_class.abstract?
|
357
|
+
connected << connect(command_class, *args, **opts)
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
361
|
+
connected.flatten
|
354
362
|
else
|
355
363
|
# :nocov:
|
356
364
|
raise "Don't know how to register #{registerable} (#{registerable.class})"
|
@@ -369,27 +369,45 @@ module Foobara
|
|
369
369
|
command_class.foobara_manifest
|
370
370
|
end
|
371
371
|
|
372
|
+
# TODO: This should support nil as an inputs_type but it breaks other projects for now
|
373
|
+
inputs_type = inputs_type_for_manifest&.reference_or_declaration_data ||
|
374
|
+
{ type: :attributes, element_type_declarations: {} }
|
375
|
+
|
372
376
|
# TODO: handle errors_types_depended_on!
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
377
|
+
to_merge = {
|
378
|
+
inputs_types_depended_on:,
|
379
|
+
result_types_depended_on:,
|
380
|
+
types_depended_on: types,
|
381
|
+
inputs_type:,
|
382
|
+
result_type: result_type&.reference_or_declaration_data,
|
383
|
+
possible_errors: possible_errors_manifest,
|
384
|
+
capture_unknown_error:,
|
385
|
+
inputs_transformers:,
|
386
|
+
result_transformers:,
|
387
|
+
errors_transformers:,
|
388
|
+
pre_commit_transformers:,
|
389
|
+
serializers:,
|
390
|
+
response_mutators:,
|
391
|
+
request_mutators:,
|
392
|
+
requires_authentication:,
|
393
|
+
authenticator: authenticator_details
|
394
|
+
}
|
395
|
+
|
396
|
+
manifest = manifest.dup
|
397
|
+
|
398
|
+
to_merge.each_pair do |key, value|
|
399
|
+
# TODO: we could probably remove empty strings and nils, too, and from the whole hash
|
400
|
+
# if (value.is_a?(::Hash) || value.is_a?(::Array)) && value.empty?
|
401
|
+
# manifest.delete(key)
|
402
|
+
# else
|
403
|
+
# manifest[key] = value
|
404
|
+
# end
|
405
|
+
# TODO: for now, just including everything for stability
|
406
|
+
# But we should remove all empty values in a future version
|
407
|
+
manifest[key] = value
|
408
|
+
end
|
409
|
+
|
410
|
+
manifest
|
393
411
|
end
|
394
412
|
|
395
413
|
def processors_to_manifest_symbols(processors)
|
@@ -63,16 +63,26 @@ module Foobara
|
|
63
63
|
|
64
64
|
if parent_category
|
65
65
|
if include_processors || (parent_category != :processor && parent_category != :processor_class)
|
66
|
-
if candidate
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
parent = if candidate == Foobara::Value
|
67
|
+
GlobalDomain
|
68
|
+
else
|
69
|
+
candidate
|
70
|
+
end
|
71
|
+
break
|
70
72
|
end
|
71
73
|
end
|
72
74
|
|
73
75
|
candidate = candidate.scoped_namespace
|
74
76
|
end
|
75
77
|
|
78
|
+
if parent == GlobalDomain
|
79
|
+
h[:scoped_path] = scoped_full_path
|
80
|
+
h[:scoped_name] = scoped_full_name
|
81
|
+
h[:scoped_prefix] = scoped_full_path[..-2]
|
82
|
+
h[:domain] = parent.foobara_manifest_reference
|
83
|
+
h[:organization] = parent.foobara_organization.foobara_manifest_reference
|
84
|
+
end
|
85
|
+
|
76
86
|
if parent
|
77
87
|
to_include << parent
|
78
88
|
h[:parent] = [parent_category, parent.foobara_manifest_reference]
|
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.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
@@ -538,7 +538,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
538
538
|
- !ruby/object:Gem::Version
|
539
539
|
version: '0'
|
540
540
|
requirements: []
|
541
|
-
rubygems_version: 3.
|
541
|
+
rubygems_version: 3.6.9
|
542
542
|
specification_version: 4
|
543
543
|
summary: A command-centric and discoverable software framework with a focus on domain
|
544
544
|
concepts and abstracting away integration code
|