Skip to content

Commit

Permalink
Escape unquoted credentials map
Browse files Browse the repository at this point in the history
  • Loading branch information
aleDsz committed May 26, 2022
1 parent d7b2bbc commit 0b36c10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/kino_db/connection_cell.ex
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ defmodule KinoDB.ConnectionCell do
quote do
scopes = ["https://www.googleapis.com/auth/cloud-platform"]

credentials = unquote(attrs["credentials"])
credentials = unquote(Macro.escape(attrs["credentials"]))

goth_opts = [
name: Goth,
Expand Down
14 changes: 2 additions & 12 deletions test/kino_db/connection_cell_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ defmodule KinoDB.ConnectionCellTest do
"variable" => "db",
"type" => "bigquery",
"project_id" => "",
"private_key_id" => "",
"private_key" => "",
"client_email" => "",
"client_id" => "",
"credentials" => %{},
"default_dataset_id" => ""
}

Expand All @@ -78,14 +75,7 @@ defmodule KinoDB.ConnectionCellTest do
assert source ==
"""
scopes = ["https://www.googleapis.com/auth/cloud-platform"]
credentials = %{
"project_id" => "",
"private_key_id" => "",
"private_key" => "",
"client_email" => "",
"client_id" => ""
}
credentials = %{}
goth_opts = [
name: Goth,
Expand Down

0 comments on commit 0b36c10

Please sign in to comment.