Skip to content

Commit

Permalink
Few small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Callum Barratt committed May 27, 2016
1 parent 53c4d13 commit 9c87aae
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 34 deletions.
7 changes: 5 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ defmodule Callum.Mixfile do
end

defp aliases do
["ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"]]
[
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
"test": ["test --trace"]
]
end
end
56 changes: 28 additions & 28 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
%{"certifi": {:hex, :certifi, "0.4.0"},
"combine": {:hex, :combine, "0.7.0"},
"connection": {:hex, :connection, "1.0.2"},
"cowboy": {:hex, :cowboy, "1.0.4"},
"cowlib": {:hex, :cowlib, "1.0.2"},
"db_connection": {:hex, :db_connection, "0.2.5"},
"decimal": {:hex, :decimal, "1.1.1"},
"ecto": {:hex, :ecto, "2.0.0-beta.2"},
"ex_machina": {:hex, :ex_machina, "0.6.1"},
"fs": {:hex, :fs, "0.9.2"},
"gettext": {:hex, :gettext, "0.11.0"},
"hackney": {:hex, :hackney, "1.6.0"},
"httpoison": {:hex, :httpoison, "0.8.3"},
"idna": {:hex, :idna, "1.2.0"},
"metrics": {:hex, :metrics, "1.0.1"},
"mimerl": {:hex, :mimerl, "1.0.2"},
"phoenix": {:hex, :phoenix, "1.1.4"},
"phoenix_ecto": {:hex, :phoenix_ecto, "3.0.0-beta.2"},
"phoenix_html": {:hex, :phoenix_html, "2.5.1"},
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.0.3"},
"plug": {:hex, :plug, "1.1.3"},
"poison": {:hex, :poison, "2.1.0"},
"poolboy": {:hex, :poolboy, "1.5.1"},
"postgrex": {:hex, :postgrex, "0.11.1"},
"ranch": {:hex, :ranch, "1.2.1"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.0"},
%{"certifi": {:hex, :certifi, "0.4.0", "a7966efb868b179023618d29a407548f70c52466bf1849b9e8ebd0e34b7ea11f", [:rebar3], []},
"combine": {:hex, :combine, "0.7.0", "2ac6ae852a9835fe8189af18121cddd5bed2677f5df706dc0d208af668ab845d", [:mix], []},
"connection": {:hex, :connection, "1.0.2", "f4a06dd3ecae4141aa66f94ce92ea4c4b8753069472814932f1cadbc3078ab80", [:mix], []},
"cowboy": {:hex, :cowboy, "1.0.4", "a324a8df9f2316c833a470d918aaf73ae894278b8aa6226ce7a9bf699388f878", [:rebar, :make], [{:cowlib, "~> 1.0.0", [hex: :cowlib, optional: false]}, {:ranch, "~> 1.0", [hex: :ranch, optional: false]}]},
"cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [:make], []},
"db_connection": {:hex, :db_connection, "0.2.5", "3e5e28019e0ec744345568d22a2f5206109bff0e2571f4d7819e0d14cf955f3e", [:mix], [{:sbroker, "~> 0.7", [hex: :sbroker, optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: true]}, {:connection, "~> 1.0.2", [hex: :connection, optional: false]}]},
"decimal": {:hex, :decimal, "1.1.1", "a8ff5b673105e6cdaca96f799aeefc6f07142881b616c65db16e14e556b16e76", [:mix], []},
"ecto": {:hex, :ecto, "2.0.0-beta.2", "a64d536dbd978d675c2c35b0fe025da4c0fe39033c60fdeb32b569bbcd1521a8", [:mix], [{:sbroker, "~> 0.7", [hex: :sbroker, optional: true]}, {:postgrex, "~> 0.11.1", [hex: :postgrex, optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: false]}, {:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: true]}, {:mariaex, "~> 0.6", [hex: :mariaex, optional: true]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}]},
"ex_machina": {:hex, :ex_machina, "0.6.1", "677120042987c6a0277ac4cfb1b6e4a0e1774122a0d9fd319ba0630d16fd770f", [:mix], []},
"fs": {:hex, :fs, "0.9.2", "ed17036c26c3f70ac49781ed9220a50c36775c6ca2cf8182d123b6566e49ec59", [:rebar], []},
"gettext": {:hex, :gettext, "0.11.0", "80c1dd42d270482418fa158ec5ba073d2980e3718bacad86f3d4ad71d5667679", [:mix], []},
"hackney": {:hex, :hackney, "1.6.0", "8d1e9440c9edf23bf5e5e2fe0c71de03eb265103b72901337394c840eec679ac", [:rebar3], [{:ssl_verify_fun, "1.1.0", [hex: :ssl_verify_fun, optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, optional: false]}, {:metrics, "1.0.1", [hex: :metrics, optional: false]}, {:idna, "1.2.0", [hex: :idna, optional: false]}, {:certifi, "0.4.0", [hex: :certifi, optional: false]}]},
"httpoison": {:hex, :httpoison, "0.8.3", "b675a3fdc839a0b8d7a285c6b3747d6d596ae70b6ccb762233a990d7289ccae4", [:mix], [{:hackney, "~> 1.6.0", [hex: :hackney, optional: false]}]},
"idna": {:hex, :idna, "1.2.0", "ac62ee99da068f43c50dc69acf700e03a62a348360126260e87f2b54eced86b2", [:rebar3], []},
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], []},
"mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], []},
"phoenix": {:hex, :phoenix, "1.1.4", "65809fba92eb94377372a5fb5a561197654bb8406e773cc47ca1a031bbe58019", [:mix], [{:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: false]}, {:plug, "~> 1.0", [hex: :plug, optional: false]}, {:cowboy, "~> 1.0", [hex: :cowboy, optional: true]}]},
"phoenix_ecto": {:hex, :phoenix_ecto, "3.0.0-rc.0", "c4a482a326dd61b7b4fd1a130cc560020fc6e5e1c1ec845b3cb528af93f829c8", [:mix], [{:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: true]}, {:phoenix_html, "~> 2.5", [hex: :phoenix_html, optional: true]}, {:ecto, "~> 2.0.0-rc", [hex: :ecto, optional: false]}]},
"phoenix_html": {:hex, :phoenix_html, "2.5.1", "631053f9e345fecb5c87d9e0ccd807f7266d27e2ee4269817067af425fd81ba8", [:mix], [{:plug, "~> 0.13 or ~> 1.0", [hex: :plug, optional: false]}]},
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.0.5", "829218c4152ba1e9848e2bf8e161fcde6b4ec679a516259442561d21fde68d0b", [:mix], [{:phoenix, "~> 1.0 or ~> 1.2-rc", [hex: :phoenix, optional: false]}, {:fs, "~> 0.9.1", [hex: :fs, optional: false]}]},
"plug": {:hex, :plug, "1.1.3", "2c1b01a51304ab1b88dc4313c0707e69998c8d6d4cdaeef391fa6003b6e31a5a", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, optional: true]}]},
"poison": {:hex, :poison, "2.1.0", "f583218ced822675e484648fa26c933d621373f01c6c76bd00005d7bd4b82e27", [:mix], []},
"poolboy": {:hex, :poolboy, "1.5.1", "6b46163901cfd0a1b43d692657ed9d7e599853b3b21b95ae5ae0a777cf9b6ca8", [:rebar], []},
"postgrex": {:hex, :postgrex, "0.11.1", "f48af70c0a58b9bfd1aaa456ec4273624554cfb837726b6a7f0701da4a94b2dd", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, optional: false]}, {:db_connection, "~> 0.2", [hex: :db_connection, optional: false]}, {:connection, "~> 1.0", [hex: :connection, optional: false]}]},
"ranch": {:hex, :ranch, "1.2.1", "a6fb992c10f2187b46ffd17ce398ddf8a54f691b81768f9ef5f461ea7e28c762", [:make], []},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.0", "edee20847c42e379bf91261db474ffbe373f8acb56e9079acb6038d4e0bf414f", [:rebar, :make], []},
"ssl_verify_hostname": {:hex, :ssl_verify_hostname, "1.0.5"},
"timex": {:hex, :timex, "1.0.1"},
"tzdata": {:hex, :tzdata, "0.5.6"}}
"timex": {:hex, :timex, "1.0.1", "889ba9b9ea615e2d1e0acb7a5b0dcd8cc4e04058569dc5d4c200d86c374e90ea", [:mix], [{:tzdata, "~> 0.1.8 or ~> 0.5", [hex: :tzdata, optional: false]}, {:combine, "~> 0.7", [hex: :combine, optional: false]}]},
"tzdata": {:hex, :tzdata, "0.5.6", "d44c59175b8e9a170b3b17d6933820de98a3f0932f3a0615d884b8c20e93a87a", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, optional: false]}]}}
6 changes: 5 additions & 1 deletion test/support/conn_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defmodule Callum.ConnCase do
alias Callum.Repo
import Ecto
import Ecto.Changeset
import Ecto.Query, only: [from: 1, from: 2]
import Ecto.Query

import Callum.Router.Helpers

Expand All @@ -35,6 +35,10 @@ defmodule Callum.ConnCase do
setup tags do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Callum.Repo)

unless tags[:async] do
Ecto.Adapters.SQL.Sandbox.mode(Callum.Repo, {:shared, self()})
end

{:ok, conn: Phoenix.ConnTest.conn()}
end
end
2 changes: 1 addition & 1 deletion test/support/model_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule Callum.ModelCase do

import Ecto
import Ecto.Changeset
import Ecto.Query, only: [from: 1, from: 2]
import Ecto.Query
import Callum.ModelCase
end
end
Expand Down
2 changes: 0 additions & 2 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
ExUnit.start

Mix.Task.run "ecto.create", ~w(-r Callum.Repo --quiet)
Mix.Task.run "ecto.migrate", ~w(-r Callum.Repo --quiet)
Ecto.Adapters.SQL.Sandbox.mode(Callum.Repo, :manual)

{:ok, _} = Application.ensure_all_started(:ex_machina)

0 comments on commit 9c87aae

Please sign in to comment.