foobara 0.5.8 → 0.5.9
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: c97d7f81b121b86084fb6305b3327cdb82500828a1e4f87fc308c11390c46045
|
|
4
|
+
data.tar.gz: 7a48863a2c118156769df85217057309a680207af1af989d2465676c6cf012bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25ea5d0c8f87d7f77c0d6f8feecf93aac2940161eceebd3b8935013b7e06b617e12d8e003826f439f5685027b96121e795765a9b4376e2f08038f682f7860601
|
|
7
|
+
data.tar.gz: 8b7796124e4e7d553f895c46913a693aa3f42666712a8100404bf68bcdaf80f25ec201177894c72efc6d7b53aac1565be8fe4c795f3a762ab4127d0da9b344fa
|
data/CHANGELOG.md
CHANGED
|
@@ -413,8 +413,6 @@ module Foobara
|
|
|
413
413
|
raise NoCommandFoundError.new(message: "Could not find command registered for #{full_command_name}")
|
|
414
414
|
# :nocov:
|
|
415
415
|
end
|
|
416
|
-
|
|
417
|
-
transformed_command_class
|
|
418
416
|
else
|
|
419
417
|
action = case action
|
|
420
418
|
when "describe_type", "manifest", "describe_command"
|
|
@@ -433,8 +431,15 @@ module Foobara
|
|
|
433
431
|
command_class = find_builtin_command_class(command_name)
|
|
434
432
|
full_command_name = command_class.full_command_name
|
|
435
433
|
|
|
436
|
-
transformed_command_from_name(full_command_name) ||
|
|
434
|
+
transformed_command_class = transformed_command_from_name(full_command_name) ||
|
|
435
|
+
transform_command_class(command_class)
|
|
436
|
+
|
|
437
|
+
if transformed_command_class < TransformedCommand
|
|
438
|
+
transformed_command_class.builtin = true
|
|
439
|
+
end
|
|
437
440
|
end
|
|
441
|
+
|
|
442
|
+
transformed_command_class
|
|
438
443
|
end
|
|
439
444
|
|
|
440
445
|
def request_to_command_inputs(request)
|
|
@@ -640,8 +645,14 @@ module Foobara
|
|
|
640
645
|
|
|
641
646
|
def run_command(request)
|
|
642
647
|
command = request.command
|
|
648
|
+
command_class = request.command_class
|
|
643
649
|
|
|
644
|
-
if requires_allowed_rule &&
|
|
650
|
+
if requires_allowed_rule &&
|
|
651
|
+
command.is_a?(TransformedCommand) &&
|
|
652
|
+
# The != false looks odd and must be that we want to distinguish between the default (nil)
|
|
653
|
+
# and explicitly not requiring auth
|
|
654
|
+
command.class.requires_authentication != false &&
|
|
655
|
+
!command_class.builtin?
|
|
645
656
|
unless command.allowed_rule
|
|
646
657
|
raise NoAllowedRuleGivenError,
|
|
647
658
|
"Must connect #{command.full_command_name} with an `allowed_if:` " \
|
|
@@ -21,7 +21,8 @@ module Foobara
|
|
|
21
21
|
:requires_authentication,
|
|
22
22
|
:authenticator,
|
|
23
23
|
:subclassed_in_namespace,
|
|
24
|
-
:suffix
|
|
24
|
+
:suffix,
|
|
25
|
+
:builtin
|
|
25
26
|
|
|
26
27
|
def subclass(
|
|
27
28
|
command_class,
|
|
@@ -546,6 +547,10 @@ module Foobara
|
|
|
546
547
|
end
|
|
547
548
|
end
|
|
548
549
|
|
|
550
|
+
def builtin?
|
|
551
|
+
builtin
|
|
552
|
+
end
|
|
553
|
+
|
|
549
554
|
private
|
|
550
555
|
|
|
551
556
|
def processors_to_manifest_symbols(processors)
|
|
@@ -12,7 +12,7 @@ module Foobara
|
|
|
12
12
|
map = map.merge(possible_error.key.to_s => possible_error)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
if transformed_command.allowed_rule
|
|
15
|
+
if transformed_command.allowed_rule && transformed_command.allowed_rule.symbol != :always
|
|
16
16
|
possible_error = PossibleError.new(CommandConnector::NotAllowedError)
|
|
17
17
|
map = map.merge(possible_error.key.to_s => possible_error)
|
|
18
18
|
end
|
data/version.rb
CHANGED