-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmix.exs
More file actions
74 lines (67 loc) · 2.14 KB
/
mix.exs
File metadata and controls
74 lines (67 loc) · 2.14 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
defmodule BatchElixir.MixProject do
# credo:disable-for-previous-line
use Mix.Project
def project do
[
app: :batch_elixir,
package: package(),
version: "0.2.2",
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
source_url: "https://github.com/OnceApp/batch_elixir",
test_coverage: test_coverage(System.get_env("CI"))
]
end
defp description() do
"A Batch elixir client"
end
defp package() do
[
name: "batch_elixir",
files: ~w(lib .formatter.exs mix.exs README* LICENSE*),
links: %{"Github" => "https://github.com/OnceApp/batch_elixir"},
licenses: ["MIT"]
]
end
def application do
[
env: [
stats_driver: BatchElixir.Stats.Memory,
producer_name: BatchElixir.Server.Producer,
consumer_options: [],
producer_options: [],
number_of_consumers: 1,
batch_url: "https://api.batch.com/1.1/",
retry_interval_in_milliseconds: 1_000,
max_attempts: 3
],
applications: [:httpoison, :statix, :gen_stage],
extra_applications: [:logger]
] ++ mod_application(Mix.env())
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:httpoison, "~> 1.0"},
{:gen_stage, "~> 0.14"},
{:poison, "~> 3.1"},
{:statix, "~> 1.1"},
{:earmark, "~> 1.2", only: :dev},
{:ex_doc, "~> 0.19.3", only: :dev},
{:cobertura_cover, "~> 0.9.0", only: :test},
{:credo, "~> 0.9.1", only: [:dev, :test], runtime: false},
{:mock, "~> 0.3.0", only: :test},
{:dialyxir, "~> 1.0.0-rc.2", only: [:dev, :test], runtime: false},
{:progress_bar, "~> 2.0", only: [:dev, :test]},
{:timex, "~> 3.5", only: [:dev, :test]},
{:table_rex, "~> 2.0", only: [:dev, :test]},
{:logger_file_backend, "~> 0.0.10", only: [:dev, :test]}
]
end
defp mod_application(:test), do: []
defp mod_application(_env), do: [mod: {BatchElixir.Application, []}]
defp test_coverage(nil), do: [tool: CoberturaCover, html_output: "cover"]
defp test_coverage(_), do: [tool: CoberturaCover]
end