diff --git a/config/test.exs b/config/test.exs index 9f2ba285..19b4b1ac 100644 --- a/config/test.exs +++ b/config/test.exs @@ -8,7 +8,6 @@ config :paper_trail, PaperTrail.Repo, adapter: Ecto.Adapters.Postgres, username: System.get_env("POSTGRES_USER"), password: System.get_env("POSTGRES_PASSWORD"), - socket_dir: "/tmp", database: "paper_trail_test", hostname: System.get_env("POSTGRES_HOST"), poolsize: 10 @@ -17,7 +16,6 @@ config :paper_trail, PaperTrail.UUIDRepo, adapter: Ecto.Adapters.Postgres, username: System.get_env("POSTGRES_USER"), password: System.get_env("POSTGRES_PASSWORD"), - socket_dir: "/tmp", database: "paper_trail_uuid_test", hostname: System.get_env("POSTGRES_HOST"), poolsize: 10 diff --git a/mix.exs b/mix.exs index fca5c7c6..f74a32a1 100644 --- a/mix.exs +++ b/mix.exs @@ -4,8 +4,8 @@ defmodule PaperTrail.Mixfile do def project do [ app: :paper_trail, - version: "0.8.3", - elixir: "~> 1.6", + version: "0.8.4", + elixir: "~> 1.9", description: description(), build_embedded: Mix.env() == :prod, start_permanent: Mix.env() == :prod, @@ -20,14 +20,14 @@ defmodule PaperTrail.Mixfile do # Type "mix help compile.app" for more information def application do [ - applications: [:logger, :postgrex, :ecto] + applications: [:logger, :postgrex, :ecto, :runtime_tools] ] end defp deps do [ - {:ecto, "~> 3.0"}, - {:ecto_sql, "~> 3.0"}, + {:ecto, "~> 3.3"}, + {:ecto_sql, "~> 3.3"}, {:ex_doc, ">= 0.20.2", only: :dev}, {:postgrex, ">= 0.0.0"}, {:jason, "~> 1.0"}, diff --git a/mix.lock b/mix.lock index 1ac6ea45..a90c7272 100644 --- a/mix.lock +++ b/mix.lock @@ -1,17 +1,15 @@ %{ - "connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], []}, - "db_connection": {:hex, :db_connection, "2.0.1", "09454c6c6e8e4295f400b72580b19f0ac68fda2602e209533285206cb99bee6b", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm"}, - "decimal": {:hex, :decimal, "1.5.0", "b0433a36d0e2430e3d50291b1c65f53c37d56f83665b43d79963684865beab68", [:mix], [], "hexpm"}, - "earmark": {:hex, :earmark, "1.3.2", "b840562ea3d67795ffbb5bd88940b1bed0ed9fa32834915125ea7d02e35888a5", [:mix], [], "hexpm"}, - "ecto": {:hex, :ecto, "3.0.0", "059250d96f17f9c10f524fcb09d058f566691343e90318a161cf62a48f3912a9", [:mix], [{:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}], "hexpm"}, - "ecto_sql": {:hex, :ecto_sql, "3.0.0", "8d1883376bee02a0e76b5ef797e39d04333c34b9935d0b4785dbf3cbdb571e2a", [:mix], [{:db_connection, "~> 2.0", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.0.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:mariaex, "~> 0.9.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.14.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.2.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm"}, - "ex_doc": {:hex, :ex_doc, "0.20.2", "1bd0dfb0304bade58beb77f20f21ee3558cc3c753743ae0ddbb0fd7ba2912331", [:mix], [{:earmark, "~> 1.3", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"}, + "connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm"}, + "db_connection": {:hex, :db_connection, "2.2.0", "e923e88887cd60f9891fd324ac5e0290954511d090553c415fbf54be4c57ee63", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm"}, + "decimal": {:hex, :decimal, "1.8.0", "ca462e0d885f09a1c5a342dbd7c1dcf27ea63548c65a65e67334f4b61803822e", [:mix], [], "hexpm"}, + "earmark": {:hex, :earmark, "1.4.3", "364ca2e9710f6bff494117dbbd53880d84bebb692dafc3a78eb50aa3183f2bfd", [:mix], [], "hexpm"}, + "ecto": {:hex, :ecto, "3.3.0", "9193e261d25c1814324d0b3304fccbadab840b286d270c3b75dfd28c30a3ae15", [:mix], [{:decimal, "~> 1.6", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"}, + "ecto_sql": {:hex, :ecto_sql, "3.3.2", "92804e0de69bb63e621273c3492252cb08a29475c05d40eeb6f41ad2d483cfd3", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.3", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.3.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm"}, + "ex_doc": {:hex, :ex_doc, "0.21.2", "caca5bc28ed7b3bdc0b662f8afe2bee1eedb5c3cf7b322feeeb7c6ebbde089d6", [:mix], [{:earmark, "~> 1.3.3 or ~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"}, "jason": {:hex, :jason, "1.1.2", "b03dedea67a99223a2eaf9f1264ce37154564de899fd3d8b9a21b1a6fd64afe7", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"}, - "makeup": {:hex, :makeup, "0.8.0", "9cf32aea71c7fe0a4b2e9246c2c4978f9070257e5c9ce6d4a28ec450a839b55f", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"}, - "makeup_elixir": {:hex, :makeup_elixir, "0.13.0", "be7a477997dcac2e48a9d695ec730b2d22418292675c75aa2d34ba0909dcdeda", [:mix], [{:makeup, "~> 0.8", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm"}, - "nimble_parsec": {:hex, :nimble_parsec, "0.5.0", "90e2eca3d0266e5c53f8fbe0079694740b9c91b6747f2b7e3c5d21966bba8300", [:mix], [], "hexpm"}, - "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], []}, - "poolboy": {:hex, :poolboy, "1.5.1", "6b46163901cfd0a1b43d692657ed9d7e599853b3b21b95ae5ae0a777cf9b6ca8", [:rebar], []}, - "postgrex": {:hex, :postgrex, "0.14.0", "f3d6ffea1ca8a156e0633900a5338a3d17b00435227726baed8982718232b694", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.0", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"}, - "telemetry": {:hex, :telemetry, "0.2.0", "5b40caa3efe4deb30fb12d7cd8ed4f556f6d6bd15c374c2366772161311ce377", [:mix], [], "hexpm"}, + "makeup": {:hex, :makeup, "1.0.0", "671df94cf5a594b739ce03b0d0316aa64312cee2574b6a44becb83cd90fb05dc", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.14.0", "cf8b7c66ad1cff4c14679698d532f0b5d45a3968ffbcbfd590339cb57742f1ae", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm"}, + "nimble_parsec": {:hex, :nimble_parsec, "0.5.3", "def21c10a9ed70ce22754fdeea0810dafd53c2db3219a0cd54cf5526377af1c6", [:mix], [], "hexpm"}, + "postgrex": {:hex, :postgrex, "0.15.3", "5806baa8a19a68c4d07c7a624ccdb9b57e89cbc573f1b98099e3741214746ae4", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"}, + "telemetry": {:hex, :telemetry, "0.4.1", "ae2718484892448a24470e6aa341bc847c3277bfb8d4e9289f7474d752c09c7f", [:rebar3], [], "hexpm"}, } diff --git a/priv/repo/migrations/20160619190935_add_users.exs b/priv/repo/migrations/20160619190935_add_users.exs index db42cc0c..4bed44b0 100644 --- a/priv/repo/migrations/20160619190935_add_users.exs +++ b/priv/repo/migrations/20160619190935_add_users.exs @@ -1,4 +1,4 @@ -defmodule Repo.Migrations.AddVersions do +defmodule Repo.Migrations.AddUsers do use Ecto.Migration def change do diff --git a/test/paper_trail_strict_mode_test.exs b/test/paper_trail_strict_mode_test.exs index cd605d16..cb0e21d5 100644 --- a/test/paper_trail_strict_mode_test.exs +++ b/test/paper_trail_strict_mode_test.exs @@ -270,10 +270,10 @@ defmodule PaperTrailStrictModeTest do }) |> PaperTrail.insert() - ecto_result = insert_company_result[:model] |> Company.changeset() |> @repo.delete - result = insert_company_result[:model] |> Company.changeset() |> PaperTrail.delete() + {:error, ecto_result} = insert_company_result[:model] |> Company.changeset() |> @repo.delete + {:error, result} = insert_company_result[:model] |> Company.changeset() |> PaperTrail.delete() - assert result == ecto_result + assert Map.drop(result, [:repo_opts]) == Map.drop(ecto_result, [:repo_opts]) end test "creating a person with meta tag creates a person version with correct attributes" do diff --git a/test/paper_trail_test.exs b/test/paper_trail_test.exs index 4480f3be..1cd15753 100644 --- a/test/paper_trail_test.exs +++ b/test/paper_trail_test.exs @@ -328,10 +328,10 @@ defmodule PaperTrailTest do }) |> PaperTrail.insert() - ecto_result = insert_company_result[:model] |> Company.changeset() |> @repo.delete - result = insert_company_result[:model] |> Company.changeset() |> PaperTrail.delete() + {:error, ecto_result} = insert_company_result[:model] |> Company.changeset() |> @repo.delete + {:error, result} = insert_company_result[:model] |> Company.changeset() |> PaperTrail.delete() - assert result == ecto_result + assert Map.drop(result, [:repo_opts]) == Map.drop(ecto_result, [:repo_opts]) end test "creating a person with meta tag creates a person version with correct attributes" do