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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 679ffa5a393f1477a9b0f796e2e3340f7560084f9590532395bcdddd1e3a45f4
4
- data.tar.gz: d19c49bea2d88c91055edd0f82651eb6dc879325d4be4ee1a4038ab0271690a8
3
+ metadata.gz: 0450de7304940d43caf9e9d242637b4fd84b86d9854cd1c34ec2dce90effa8d8
4
+ data.tar.gz: 21b89b61da8d6938ed9d0adde8887b84b18bc126010c7abbcc698771d639bf43
5
5
  SHA512:
6
- metadata.gz: ed1cccc71dc2f749fbf5d3505455a2b233bf97f41b5d279d7d32ff6110858918b836f9275d1365497b647acfbd5abbc0ef0f3c5e7153fa674821be50700ab8d0
7
- data.tar.gz: f8f0f30044bc95229f37d53fb5a723c750ba831478f428abf153dcfceaf7a554c44d9fd6d39418e8db62eb485a6e6336b3c570373178005e6e062982f32110ac
6
+ metadata.gz: de3fbbfaaf821eb4bfe40a3e276d707371b3b52f8daadba5a1eb5322384f481a51e8bb57a9735e26fd81b95930776dbc81649fc47714b1a0327eb9b75c80910f
7
+ data.tar.gz: 4335c58232538cadb8c7c16547ea1a1851cd1c0ed21f2cf7fdc1f8cd98d75477ea4152f74f35a9002ee9094f3dceffb5efc99104f51ad07cf7513863af6f935f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [0.1.2] - 2026-09-11
2
+
3
+ - Handle removed JSON.fast_generate
4
+
5
+ ## [0.1.1] - 2025-09-04
6
+
7
+ - Fix bug that results from not all namespaces supporting a #foobara_domain method
8
+
1
9
  ## [0.1.0] - 2025-08-22
2
10
 
3
11
  - Handle Foobara 0.1.0 type declarations
@@ -40,9 +40,9 @@ module Foobara
40
40
  when 1
41
41
  instance_variable_set("@#{method_name}", args[0])
42
42
  else
43
- # :nocov:
43
+ # simplecov:disable
44
44
  raise ArgumentError, "Unexpected number of arguments: #{args.size}"
45
- # :nocov:
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.foobara_domain
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.fast_generate(inputs_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
- # :nocov:
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
- # :nocov:
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.0
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: 3.6.9
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