Skip to content

Commit

Permalink
rubocops
Browse files Browse the repository at this point in the history
  • Loading branch information
claytongentry committed Feb 7, 2025
1 parent be33267 commit 0bc38bb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/manifold/api/workspace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def generate_terraform
vector_config = @vector_service.load_vector_config(vector)
config.add_vector(vector_config)
end
config.set_merge_config(manifold_yaml["dimensions"]&.fetch("merge", nil)) if manifold_yaml["dimensions"]
config.merge_config = manifold_yaml["dimensions"]&.fetch("merge", nil) if manifold_yaml["dimensions"]
config.write(terraform_main_path)
end
end
Expand Down
4 changes: 1 addition & 3 deletions lib/manifold/terraform/workspace_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ def add_vector(vector_config)
@vectors << vector_config
end

def set_merge_config(merge_config)
@merge_config = merge_config
end
attr_writer :merge_config

def as_json
{
Expand Down
7 changes: 7 additions & 0 deletions spec/manifold/api/workspace_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,17 @@ def configure_vector_config
end

def setup_workspace_files
setup_routines_directory
setup_manifold_config
end

def setup_routines_directory
Pathname.pwd.join("lib/routines").mkpath
Pathname.pwd.join("lib/routines/select_pages.sql")
.write("SELECT id, STRUCT(url, title) AS dimensions FROM pages")
end

def setup_manifold_config
workspace.add
workspace.manifold_path.write(<<~YAML)
vectors:
Expand Down
2 changes: 1 addition & 1 deletion spec/manifold/terraform/workspace_configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
before do
setup_merge_vector_config
config.add_vector(vector_config)
config.set_merge_config({ "source" => "lib/routines/select_pages.sql" })
config.merge_config = { "source" => "lib/routines/select_pages.sql" }
end

it "includes routine configuration" do
Expand Down

0 comments on commit 0bc38bb

Please sign in to comment.