foobara 0.1.3 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 382dbd4fb1743f89af17bc70f7acdbef0ad2851767122f702e2503dcfacddf12
4
- data.tar.gz: 02dfabf373e9ec1545ecbcaeeed6c31b0f6338bcc5e9095b3e0efe9bc9f61c03
3
+ metadata.gz: 5ff971dedd276b649d7ceb9b184734a47074357ab20b517b01a377bf7dfedfaa
4
+ data.tar.gz: a1b07c225fdddebd6dd859650db155a7e20aca66fe0647211d5daede966b305f
5
5
  SHA512:
6
- metadata.gz: 535af52cbd9ad41609694db0b23e69f003d5959ccff113bc98dcedc13ff15df685b6abfcafe510f26243888d979b4724b061d00a76164805167d8f90cc3f4d39
7
- data.tar.gz: 692827d4929a901e5127c706c5f63d5da40330dfc5a5e868ea0661ef5885b25dbb5a4db43f8b76e980076ded3d876637ea1328bd164a16fed9e86664d99b9d4c
6
+ metadata.gz: 1d797ddc6c22d97617ffe9c1c951d66257f305dceedccaa5df80f0da3283a902a3c7acfd086dd4603957e3efa2a9f2b06a0851bb6cc420884839f79f19c70816
7
+ data.tar.gz: f57df9169e0da18ffc23d57e9fd8b2c5d218714938e4b37f1d4de1b19344774756915702d152b19ace97302b481df9bf6b9e4467db590b34f606cae2861cf44f
data/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
- # [0.1.3] - 2025-08-25
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
2
10
 
3
11
  - Add Command#abstract and exclude abstract commands from CommandConnector#connect when connecting domains/orgs
4
12
 
@@ -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
- manifest.merge(
374
- Util.remove_blank(
375
- inputs_types_depended_on:,
376
- result_types_depended_on:,
377
- types_depended_on: types,
378
- inputs_type: inputs_type_for_manifest&.reference_or_declaration_data,
379
- result_type: result_type&.reference_or_declaration_data,
380
- possible_errors: possible_errors_manifest,
381
- capture_unknown_error:,
382
- inputs_transformers:,
383
- result_transformers:,
384
- errors_transformers:,
385
- pre_commit_transformers:,
386
- serializers:,
387
- response_mutators:,
388
- request_mutators:,
389
- requires_authentication:,
390
- authenticator: authenticator_details
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 != Foobara::Value
67
- parent = candidate
68
- break
69
- end
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.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi