-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathmix.exs
More file actions
60 lines (51 loc) · 1.47 KB
/
mix.exs
File metadata and controls
60 lines (51 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
defmodule EctoStateMachine.Mixfile do
use Mix.Project
@project_url "https://github.com/asiniy/ecto_state_machine"
@version "0.3.0"
def project do
[
app: :ecto_state_machine,
version: @version,
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
source_url: @project_url,
homepage_url: @project_url,
description: "State machine pattern for Ecto. I tried to make it similar as possible to ruby's gem 'aasm'",
package: package()
]
end
defp elixirc_paths(:test), do: elixirc_paths() ++ ["test/support", "test/dummy"]
defp elixirc_paths(_), do: elixirc_paths()
defp elixirc_paths, do: ["lib"]
def application do
[
applications: app_list(Mix.env),
]
end
def app_list(:test), do: app_list() ++ [:ecto, :postgrex, :ex_machina]
def app_list(_), do: app_list()
def app_list, do: [:logger]
defp deps do
[
{:ecto, ">= 2.0.0"},
{:postgrex, ">= 0.0.0", only: :test},
{:ex_machina, "~> 1.0.0", only: :test},
{:ex_doc, ">= 0.0.0", only: :dev},
]
end
defp package do
[
name: :ecto_state_machine,
files: ["lib/ecto_state_machine.ex", "mix.exs"],
maintainers: ["Alex Antonov"],
licenses: ["Apache 2.0"],
links: %{
"GitHub" => @project_url,
"Author's blog" => "http://asiniy.github.io/"
}
]
end
end