foobara-agent-backed-command 0.1.0 → 0.1.2
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 +8 -0
- data/src/agent_backed_command.rb +7 -6
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0450de7304940d43caf9e9d242637b4fd84b86d9854cd1c34ec2dce90effa8d8
|
|
4
|
+
data.tar.gz: 21b89b61da8d6938ed9d0adde8887b84b18bc126010c7abbcc698771d639bf43
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de3fbbfaaf821eb4bfe40a3e276d707371b3b52f8daadba5a1eb5322384f481a51e8bb57a9735e26fd81b95930776dbc81649fc47714b1a0327eb9b75c80910f
|
|
7
|
+
data.tar.gz: 4335c58232538cadb8c7c16547ea1a1851cd1c0ed21f2cf7fdc1f8cd98d75477ea4152f74f35a9002ee9094f3dceffb5efc99104f51ad07cf7513863af6f935f
|
data/CHANGELOG.md
CHANGED
data/src/agent_backed_command.rb
CHANGED
|
@@ -40,9 +40,9 @@ module Foobara
|
|
|
40
40
|
when 1
|
|
41
41
|
instance_variable_set("@#{method_name}", args[0])
|
|
42
42
|
else
|
|
43
|
-
# :
|
|
43
|
+
# simplecov:disable
|
|
44
44
|
raise ArgumentError, "Unexpected number of arguments: #{args.size}"
|
|
45
|
-
# :
|
|
45
|
+
# simplecov:enable
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
end
|
|
@@ -215,7 +215,8 @@ module Foobara
|
|
|
215
215
|
input_keys = inputs_type.element_types.keys - [:agent_options]
|
|
216
216
|
|
|
217
217
|
unless input_keys.empty?
|
|
218
|
-
domain = inputs_type.created_in_namespace
|
|
218
|
+
domain = Domain.to_domain(inputs_type.created_in_namespace)
|
|
219
|
+
|
|
219
220
|
inputs_type = TypeDeclarations::Attributes.reject(inputs_type.declaration_data, :agent_options)
|
|
220
221
|
inputs_type = domain.foobara_type_from_declaration(inputs_type)
|
|
221
222
|
|
|
@@ -238,7 +239,7 @@ module Foobara
|
|
|
238
239
|
end.new
|
|
239
240
|
|
|
240
241
|
inputs_json = serializer.serialize(inputs.except(:agent_options))
|
|
241
|
-
inputs_json = JSON.
|
|
242
|
+
inputs_json = JSON.generate(inputs_json)
|
|
242
243
|
goal += "You have been ran with the following inputs:\n\n#{inputs_json}"
|
|
243
244
|
end
|
|
244
245
|
end
|
|
@@ -254,7 +255,7 @@ module Foobara
|
|
|
254
255
|
def handle_agent_outcome
|
|
255
256
|
unless agent_outcome.success?
|
|
256
257
|
# TODO: test this code path maybe with a stub that forces failure
|
|
257
|
-
# :
|
|
258
|
+
# simplecov:disable
|
|
258
259
|
agent_outcome.each_error do |error|
|
|
259
260
|
add_error(error)
|
|
260
261
|
rescue Halt
|
|
@@ -262,7 +263,7 @@ module Foobara
|
|
|
262
263
|
end
|
|
263
264
|
|
|
264
265
|
halt!
|
|
265
|
-
# :
|
|
266
|
+
# simplecov:enable
|
|
266
267
|
end
|
|
267
268
|
end
|
|
268
269
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foobara-agent-backed-command
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miles Georgi
|
|
@@ -71,13 +71,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
71
71
|
- - ">="
|
|
72
72
|
- !ruby/object:Gem::Version
|
|
73
73
|
version: 3.4.0
|
|
74
|
+
- - "<"
|
|
75
|
+
- !ruby/object:Gem::Version
|
|
76
|
+
version: '4.1'
|
|
74
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
78
|
requirements:
|
|
76
79
|
- - ">="
|
|
77
80
|
- !ruby/object:Gem::Version
|
|
78
81
|
version: '0'
|
|
79
82
|
requirements: []
|
|
80
|
-
rubygems_version:
|
|
83
|
+
rubygems_version: 4.0.16
|
|
81
84
|
specification_version: 4
|
|
82
85
|
summary: Provides a way to create a command without an execute method that is instead
|
|
83
86
|
executed by a Foobara::Agent
|