foobara 0.0.111 → 0.0.113

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: 0ff2cd0b6537dbf44f0ef865a8fc6c8ac339d7b306cb67ddfcb744b74d2cb73d
4
- data.tar.gz: cc3a822e6a43b1f2f27070c85fe2a4c07bc6a0274b963816fa3ef55bb531b597
3
+ metadata.gz: 6311b48e0b7d0f27986d0536f437d60db1409f9a71c36cfc5858f3637b37629d
4
+ data.tar.gz: e4e057f18a757133d17cd938275aa6c93a97e6ab03ea207a1eca603ed25f1866
5
5
  SHA512:
6
- metadata.gz: 4f1a8853b814a569aeaa4ac67d53363fe5349658f9e9f8214f2c05d649154fcc6b60be0f249e2912485dbc0689ade4ae1e67e2e5b913f478ff8a4151756a1542
7
- data.tar.gz: c52ccae166bf419ba503653a29aa4bde3b8094c2ba190f611e877eec13ada47bd787c448db5506def4f5cebb73748a215d4de0d2d6dc30325f5c110347ad12bd
6
+ metadata.gz: b48c048cbe4e4c4905222c6564b44842809a160ed07b523ef2a4c9833fc29bcf1b1024729d1431833aa363d0839c41b808b4a09302e070dcca13358a98212327
7
+ data.tar.gz: 761e37c588eef4370fe0884250a6e824083c2c420864cbeb2ebf268340ca1beee2410d1e68ea4cef10d69953f633ae0785d9eaa72f6e9c9727705ecfc2a4ce32
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [0.0.113] - 2025-04-25
2
+
3
+ - If an inputs transformer fails give relevant error/outcome not an unknown error
4
+
5
+ # [0.0.112] - 2025-04-25
6
+
7
+ - Fix bugs preventing generating manifest for connector with mutator instances instead of classes
8
+
1
9
  # [0.0.111] - 2025-04-25
2
10
 
3
11
  - Fix bug in DomainMapper.depends_on
@@ -296,10 +296,8 @@ module Foobara
296
296
  end
297
297
  end
298
298
 
299
- response_mutators = self.response_mutators.map(&:foobara_manifest)
300
- request_mutators = TypeDeclarations.with_manifest_context(remove_sensitive: false) do
301
- self.request_mutators.map(&:foobara_manifest)
302
- end
299
+ response_mutators = mutators_to_manifest_symbols(self.response_mutators, to_include:)
300
+ request_mutators = mutators_to_manifest_symbols(self.request_mutators, to_include:)
303
301
 
304
302
  authenticator_manifest = if authenticator
305
303
  if authenticator.respond_to?(:foobara_manifest)
@@ -345,6 +343,42 @@ module Foobara
345
343
  )
346
344
  end
347
345
 
346
+ def mutators_to_manifest_symbols(mutators, to_include:)
347
+ return nil if mutators.nil? || mutators.empty?
348
+
349
+ mutators.map do |mutator|
350
+ if mutator.scoped_path_set?
351
+ to_include << mutator
352
+ mutator.foobara_manifest_reference
353
+ elsif mutator.is_a?(Value::Mutator)
354
+ klass = mutator.class
355
+
356
+ if klass.scoped_path_set?
357
+ to_include << klass
358
+ klass.foobara_manifest_reference
359
+ # TODO: Delete this nocov block
360
+ # TODO: make anonymous scoped path's have better names instead of random hexadecimal
361
+ # :nocov:
362
+ elsif mutator.symbol
363
+ mutator.symbol
364
+ else
365
+
366
+ to_include << klass if klass.scoped_path_set?
367
+
368
+ name = klass.name
369
+
370
+ while name.nil?
371
+ klass = klass.superclass
372
+ name = klass.name
373
+ end
374
+
375
+ "Anonymous#{Util.non_full_name(name)}"
376
+ # :nocov:
377
+ end
378
+ end
379
+ end
380
+ end
381
+
348
382
  def inputs_transformer
349
383
  return @inputs_transformer if defined?(@inputs_transformer)
350
384
 
@@ -492,7 +526,14 @@ module Foobara
492
526
 
493
527
  def transform_inputs
494
528
  self.transformed_inputs = if self.class.inputs_transformer
495
- self.class.inputs_transformer.process_value!(untransformed_inputs)
529
+ outcome = self.class.inputs_transformer.process_value(untransformed_inputs)
530
+
531
+ if outcome.success?
532
+ outcome.result
533
+ else
534
+ self.outcome = outcome
535
+ untransformed_inputs
536
+ end
496
537
  else
497
538
  untransformed_inputs
498
539
  end
@@ -388,7 +388,11 @@ module Foobara
388
388
  end
389
389
 
390
390
  def run_command(request)
391
- request.command.run
391
+ command = request.command
392
+
393
+ unless command.outcome
394
+ command.run
395
+ end
392
396
  rescue => e
393
397
  if capture_unknown_error
394
398
  request.error = CommandConnector::UnknownError.for(e)
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.111
4
+ version: 0.0.113
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi