-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathmix.exs
146 lines (130 loc) · 3.92 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
defmodule Honeybadger.Mixfile do
use Mix.Project
@source_url "https://github.com/honeybadger-io/honeybadger-elixir"
@version "0.23.0"
def project do
[
app: :honeybadger,
version: @version,
elixir: "~> 1.11",
consolidate_protocols: Mix.env() != :test,
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
preferred_cli_env: ["test.ci": :test],
# Hex
package: package(),
name: "Honeybadger",
homepage_url: "https://honeybadger.io",
description: """
Elixir client, Plug and error_logger for integrating with the
Honeybadger.io exception tracker"
""",
# Dialyzer
dialyzer: [
plt_add_apps: [:plug, :mix, :ecto],
flags: [:error_handling, :race_conditions, :underspecs]
],
# Xref
xref: [exclude: [Plug.Conn, Ecto.Changeset]],
# Docs
docs: [
main: "readme",
source_ref: "v#{@version}",
source_url: @source_url,
extras: ["README.md", "CHANGELOG.md"]
]
]
end
# We use a non standard location for mix tasks as we don't want them to leak
# into the host apps mix tasks. This way our release task is shown only in
# our mix tasks
defp elixirc_paths(:dev), do: ["lib", "mix"]
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def application do
[
extra_applications: [:logger, :public_key],
env: [
api_key: {:system, "HONEYBADGER_API_KEY"},
app: nil,
breadcrumbs_enabled: true,
ecto_repos: [],
environment_name: Mix.env(),
exclude_envs: [:dev, :test],
sasl_logging_only: true,
origin: "https://api.honeybadger.io",
proxy: nil,
proxy_auth: {nil, nil},
hackney_opts: [],
use_logger: true,
ignored_domains: [:cowboy],
exclude_errors: [],
# Filters
notice_filter: Honeybadger.NoticeFilter.Default,
event_filter: Honeybadger.EventFilter.Default,
filter: Honeybadger.Filter.Default,
filter_keys: [:password, :credit_card, :__changed__, :flash, :_csrf_token],
filter_args: false,
filter_disable_url: false,
filter_disable_params: false,
filter_disable_assigns: true,
filter_disable_session: false,
# Insights
insights_enabled: false,
insights_config: %{},
# Events
events_worker_enabled: true,
events_max_batch_retries: 3,
events_batch_size: 1000,
events_max_queue_size: 10000,
events_timeout: 5000,
events_throttle_wait: 60000
],
mod: {Honeybadger, []}
]
end
defp deps do
[
{:hackney, "~> 1.1", optional: true},
{:req, "~> 0.5.0", optional: true},
{:jason, "~> 1.0"},
{:plug, ">= 1.0.0 and < 2.0.0", optional: true},
{:ecto, ">= 2.0.0", optional: true},
{:phoenix, ">= 1.0.0 and < 2.0.0", optional: true},
{:telemetry, "~> 0.4 or ~> 1.0"},
{:process_tree, "~> 0.2.1"},
# Dev dependencies
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:dialyxir, "~> 1.0", only: :dev, runtime: false},
{:expublish, "~> 2.5", only: [:dev], runtime: false},
# Test dependencies
{:plug_cowboy, ">= 2.0.0 and < 3.0.0", only: :test},
{:test_server, "~> 0.1.18", only: [:test]}
]
end
defp package do
[
licenses: ["MIT"],
maintainers: ["Joshua Wood"],
links: %{
"Changelog" => "#{@source_url}/blob/master/CHANGELOG.md",
"GitHub" => @source_url
}
]
end
defp aliases do
[
"deps.ci": [
"deps.get --only test",
"cmd --cd dummy/mixapp mix deps.get --only test"
],
"test.ci": [
"test --raise",
"cmd --cd dummy/mixapp mix test --raise"
]
]
end
end