foobara 0.0.94 → 0.0.96
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec597d78b729e892d19a941489dc22004810572d110cbcc2a3c2e1b37a9aea3b
|
4
|
+
data.tar.gz: cdafbde7f15182b72bd22d265128df7cc89b73ccf7a74cddefb315bfffeacc6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b1f34ddc24d6da4f7b8972c2098dc8fe0416307f4b9ec71c18c95a72f340dcbe1530fd6ecb42327126459ad4a4877df0d8edeec8a5e4aed703a67b57b23f7e7
|
7
|
+
data.tar.gz: cb69ccfec80f7670d5bfeea9af5fc8475f1bf5aa142182a268efb98d5979ffaf2e7605582cac23e8dedb4dfa86368fa599de725c2ae617f7dac8cad95fe0b36b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# [0.0.96] - 2025-04-08
|
2
|
+
|
3
|
+
- Do not attempt to remove sensitive types from non-model extension declarations
|
4
|
+
|
5
|
+
# [0.0.95] - 2025-04-07
|
6
|
+
|
7
|
+
- Split up #run and #build_request_and_command in CommandConnector to help subclasses
|
8
|
+
|
1
9
|
# [0.0.94] - 2025-04-07
|
2
10
|
|
3
11
|
- Support capture_unknown_errors at the command connector level
|
@@ -7,6 +7,7 @@ module Foobara
|
|
7
7
|
attr_accessor :command,
|
8
8
|
:error,
|
9
9
|
:command_connector,
|
10
|
+
# Why aren't there serializers on the response?
|
10
11
|
:serializers,
|
11
12
|
:inputs,
|
12
13
|
:full_command_name,
|
@@ -15,7 +16,7 @@ module Foobara
|
|
15
16
|
attr_reader :command_class
|
16
17
|
|
17
18
|
def initialize(**opts)
|
18
|
-
valid_keys = %i[inputs full_command_name action]
|
19
|
+
valid_keys = %i[inputs full_command_name action serializers]
|
19
20
|
|
20
21
|
invalid_keys = opts.keys - valid_keys
|
21
22
|
|
@@ -28,6 +29,7 @@ module Foobara
|
|
28
29
|
self.inputs = opts[:inputs] if opts.key?(:inputs)
|
29
30
|
self.action = opts[:action] if opts.key?(:action)
|
30
31
|
self.full_command_name = opts[:full_command_name] if opts.key?(:full_command_name)
|
32
|
+
self.serializers = Util.array(opts[:serializers]) if opts.key?(:serializers)
|
31
33
|
end
|
32
34
|
|
33
35
|
def command_class=(klass)
|
@@ -325,17 +325,23 @@ module Foobara
|
|
325
325
|
end
|
326
326
|
|
327
327
|
def build_request(...)
|
328
|
-
self.class::Request.new(...)
|
328
|
+
self.class::Request.new(...).tap do |request|
|
329
|
+
# TODO: feels like a smell
|
330
|
+
request.command_connector = self
|
331
|
+
end
|
329
332
|
end
|
330
333
|
|
331
334
|
# TODO: maybe introduce a Runner interface?
|
332
|
-
def run(
|
335
|
+
def run(...)
|
333
336
|
process_delayed_connections
|
334
337
|
|
335
|
-
request
|
338
|
+
request = build_request(...)
|
339
|
+
|
340
|
+
run_request(request)
|
341
|
+
end
|
336
342
|
|
337
|
-
|
338
|
-
|
343
|
+
def run_request(request)
|
344
|
+
command = build_command(request)
|
339
345
|
|
340
346
|
if command.respond_to?(:requires_authentication?) && command.requires_authentication?
|
341
347
|
authenticate(request)
|
@@ -379,15 +385,13 @@ module Foobara
|
|
379
385
|
end
|
380
386
|
end
|
381
387
|
|
382
|
-
def
|
383
|
-
request = build_request(...)
|
384
|
-
|
388
|
+
def build_command(request)
|
385
389
|
unless request.error
|
386
390
|
command = request_to_command(request)
|
387
391
|
request.command = command
|
388
392
|
end
|
389
393
|
|
390
|
-
|
394
|
+
command
|
391
395
|
end
|
392
396
|
|
393
397
|
def build_response(request)
|
@@ -2,6 +2,10 @@ module Foobara
|
|
2
2
|
class Model
|
3
3
|
module SensitiveTypeRemovers
|
4
4
|
class Model < TypeDeclarations::SensitiveTypeRemover
|
5
|
+
def applicable?(strict_type_declaration)
|
6
|
+
strict_type_declaration.is_a?(::Hash) && strict_type_declaration.key?(:attributes_declaration)
|
7
|
+
end
|
8
|
+
|
5
9
|
def transform(strict_type_declaration)
|
6
10
|
old_attributes_declaration = strict_type_declaration[:attributes_declaration]
|
7
11
|
|
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.96
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-04-
|
10
|
+
date: 2025-04-09 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: bigdecimal
|