Skip to content

Commit

Permalink
1712786013
Browse files Browse the repository at this point in the history
  • Loading branch information
azimux committed Apr 10, 2024
1 parent 7f699b3 commit 32db028
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: foobara
revision: c1c203207b4a053d0b1541afe3e895def6ee4452
revision: 8317f90868c89515f80997c117e1be88ebaedacb
branch: main
specs:
foobara (0.0.1)
Expand Down
5 changes: 5 additions & 0 deletions src/foobara/remote_command.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Foobara
class RemoteCommand < Command
# TODO: fill this out
end
end
2 changes: 0 additions & 2 deletions src/foobara/remote_imports/import_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ def validate_manifest
end

def already_exists?
binding.pry

method = "foobara_lookup_#{manifest_to_import.scoped_category}"

Foobara.foobara_root_namespace.send(
Expand Down
2 changes: 2 additions & 0 deletions src/foobara/remote_imports/import_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def import_object_from_manifest
already_imported:
)

Util.make_class_p(manifest_to_import.reference, RemoteCommand)

manifest_to_import.types_depended_on do |type|
run_subcommand!(
ImportType,
Expand Down
11 changes: 10 additions & 1 deletion src/foobara/remote_imports/import_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module RemoteImports
class ImportError < Command
include ImportBase

depends_on ImportDomain
depends_on ImportDomain, ImportType

def find_manifests_to_import
root_manifest.errors
Expand All @@ -26,6 +26,15 @@ def import_object_from_manifest
already_imported:
)

manifest_to_import.types_dependend_on do |type|
run_subcommand!(
ImportType,
raw_manifest: manifest_data,
to_import: type.reference,
already_imported:
)
end

build_error
end

Expand Down
1 change: 0 additions & 1 deletion src/foobara/remote_imports/import_organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def find_manifests_to_import
end

def import_object_from_manifest
binding.pry
Organization.create(manifest_to_import.reference)
end
end
Expand Down

0 comments on commit 32db028

Please sign in to comment.