Skip to content

Commit

Permalink
1713651769
Browse files Browse the repository at this point in the history
  • Loading branch information
azimux committed Apr 20, 2024
1 parent 86b2156 commit c9952ab
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
16 changes: 16 additions & 0 deletions spec/foobara/remote_imports/import_command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@
expect(SomeOrg::Math).to be_foobara_domain
end

context "creating all commands" do
let(:inputs) do
{
raw_manifest:
}
end

it "imports them all", :focus do
expect(outcome).to be_success

r = outcome.result

binding.pry
end
end

context "with bad manifest inputs" do
let(:inputs) { { to_import: } }

Expand Down
12 changes: 10 additions & 2 deletions src/foobara/remote_imports/import_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,17 @@ def import_object_from_manifest
end

# Foobara::Util.make_module_p(manifest_to_import.reference)
if manifest_to_import.scoped_prefix && !manifest_to_import.scoped_prefix.empty?
Util.make_module_p(manifest_to_import.scoped_full_path[0..-2].join("::"))
end

domain.foobara_register_type(manifest_to_import.scoped_short_name,
manifest_to_import.declaration_data)
if manifest_to_import.declaration_data["model_class"] == "Foobara::Ai::Anthropic::Types::MessageResult"
$stop = true
end
domain.foobara_register_type(manifest_to_import.scoped_short_name, manifest_to_import.declaration_data)
rescue => e
binding.pry
raise
end
end
end
Expand Down

0 comments on commit c9952ab

Please sign in to comment.