Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #21 from SmartColumbusOS/adding_dataset_credentials
Browse files Browse the repository at this point in the history
SMRT-1037: Adding credential bool to technical substruct
  • Loading branch information
Nathaniel Scott Stevens committed May 8, 2019
2 parents b07f9c5 + 94214f5 commit 47b503b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ erl_crash.dump
# Ignore package tarball (built via "mix hex.build").
scos_ex-*.tar

.elixir_ls
.elixir_ls
.DS_Store
21 changes: 11 additions & 10 deletions lib/smart_city/dataset/technical.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,22 @@ defmodule SmartCity.Dataset.Technical do
}

@derive Jason.Encoder
defstruct dataName: nil,
defstruct cadence: "never",
credentials: false,
dataName: nil,
headers: %{},
orgId: nil,
orgName: nil,
systemName: nil,
partitioner: %{type: nil, query: nil},
private: true,
queryParams: %{},
schema: [],
sourceUrl: nil,
sourceFormat: nil,
sourceType: "remote",
cadence: "never",
queryParams: %{},
sourceUrl: nil,
systemName: nil,
transformations: [],
validations: [],
headers: %{},
partitioner: %{type: nil, query: nil},
sourceFormat: nil,
private: true
validations: []

@doc """
Returns a new `SmartCity.Dataset.Technical`.
Expand Down
2 changes: 1 addition & 1 deletion test/unit/smart_city/dataset_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ defmodule SmartCity.DatasetTest do
assert {:error, %Jason.DecodeError{}} = Dataset.new("foo")
end

test "can create a new dataset without _metadata in the schema", %{message: map, json: json} do
test "can create a new dataset without _metadata in the schema", %{message: map, json: _json} do
map_no_meta = Map.delete(map, "_metadata")

assert {:ok, _} = Dataset.new(map_no_meta)
Expand Down

0 comments on commit 47b503b

Please sign in to comment.