forked from pinterest/elixometer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
88 lines (76 loc) · 2.04 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
defmodule Elixometer.Mixfile do
use Mix.Project
@description """
Elixometer is a light wrapper around exometer that defines and
subscribes metrics automatically to the configured reporter.
"""
@project_url "https://github.com/pinterest/elixometer"
def project do
[
app: :elixometer,
version: "1.4.2",
elixir: ">= 1.5.0",
description: @description,
source_url: @project_url,
homepage_url: @project_url,
package: package(),
deps: deps(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test,
"coveralls.post": :test
],
elixirc_paths: elixirc_paths(Mix.env()),
# Dialyzer
dialyzer: [plt_add_deps: :transitive, plt_file: {:no_warn, "priv/plts/dialyzer.plt"}],
# Docs
name: "Elixometer",
docs: [
main: "Elixometer",
source_url: @project_url
]
]
end
def application do
[
mod: {Elixometer.App, []},
applications: [:lager, :exometer_core, :pobox],
erl_opts: [parse_transform: "lager_transform"],
env: default_config(Mix.env())
]
end
def default_config(:test) do
[update_frequency: 20]
end
def default_config(_) do
[update_frequency: 1_000]
end
defp deps do
[
# lager 3.2.1 is needed for erl19 because of
# https://github.com/basho/lager/pull/321
{:lager, ">= 3.2.1"},
{:exometer_core, "~> 1.6"},
{:dialyxir, "~> 1.1.0", only: :dev, runtime: false},
{:ex_doc, "~> 0.25", only: :dev},
{:excoveralls, "~> 0.14", only: [:dev, :test]},
{:pobox, "~> 1.2"}
]
end
defp package do
[
files: ["config", "lib", "mix.exs", "mix.lock", "CHANGELOG.md", "README.md", "LICENSE"],
maintainers: ["Jon Parise", "Steve Cohen"],
licenses: ["Apache 2.0"],
links: %{"GitHub" => @project_url}
]
end
defp elixirc_paths(:test) do
["lib", "test/support"]
end
defp elixirc_paths(_) do
["lib"]
end
end