-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmix.exs
147 lines (133 loc) · 3.4 KB
/
mix.exs
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
defmodule StrawHat.Review.MixProject do
use Mix.Project
@name :straw_hat_review
@version "0.2.0"
@elixir_version "~> 1.6"
@source_url "https://github.com/straw-hat-team/straw_hat_review"
def project do
production? = Mix.env() == :prod
[
name: "StrawHat.Review",
description: "Review System",
app: @name,
version: @version,
deps: deps(),
elixir: @elixir_version,
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: production?,
start_permanent: production?,
aliases: aliases(),
test_coverage: test_coverage(),
preferred_cli_env: preferred_cli_env(),
dialyzer: dialyzer(),
package: package(),
docs: docs()
]
end
def application do
[
mod: {StrawHat.Review.Application, []},
extra_applications: [:logger]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
{:straw_hat, "~> 0.4"},
{:postgrex, "~> 0.13"},
{:ecto, "~> 3.0"},
{:ecto_sql, "~> 3.0"},
{:scrivener_ecto, "~> 2.0"},
{:arc, "~> 0.11.0"},
{:arc_ecto, "~> 0.11.1"},
{:plug, "~> 1.5", optional: true},
# Testing
{:ex_machina, ">= 0.0.0", only: [:test]},
{:faker, ">= 0.0.0", only: [:test]},
# Tools
{:dialyxir, ">= 0.0.0", only: [:dev], runtime: false},
{:credo, ">= 0.0.0", only: [:dev, :test], runtime: false},
{:excoveralls, ">= 0.0.0", only: [:test], runtime: false},
{:ex_doc, ">= 0.0.0", only: [:dev], runtime: false},
{:inch_ex, ">= 0.0.0", only: [:dev], runtime: false}
]
end
defp test_coverage do
[tool: ExCoveralls]
end
defp preferred_cli_env do
[
"ecto.reset": :test,
"ecto.setup": :test,
"coveralls.html": :test,
"coveralls.json": :test
]
end
defp dialyzer do
[
plt_add_deps: :project,
remove_defaults: [:unknown]
]
end
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate", "test --trace"]
]
end
defp package do
[
name: @name,
files: [
"lib",
"priv",
"mix.exs",
"README*",
"LICENSE*"
],
maintainers: [
"Yordis Prieto",
"Osley Zorrilla"
],
licenses: ["MIT"],
links: %{"GitHub" => @source_url}
]
end
defp docs do
[
main: "readme",
homepage_url: @source_url,
source_ref: "v#{@version}",
source_url: @source_url,
extras: ["README.md"],
groups_for_modules: [
"Use Cases": [
StrawHat.Review.Reviews,
StrawHat.Review.Aspects,
StrawHat.Review.Medias,
StrawHat.Review.Comments,
StrawHat.Review.Reactions,
StrawHat.Review.CommentReactions,
StrawHat.Review.ReviewReactions
],
Entities: [
StrawHat.Review.Review,
StrawHat.Review.Aspect,
StrawHat.Review.Media,
StrawHat.Review.Reaction,
StrawHat.Review.Comment,
StrawHat.Review.ReviewAspect,
StrawHat.Review.ReviewReaction,
StrawHat.Review.CommentReaction
],
Arc: [
StrawHat.Review.MediaFile,
StrawHat.Review.MediaFile.Type
],
Migrations: []
]
]
end
end