forked from wyeworks/boom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
99 lines (88 loc) · 2.58 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
defmodule BoomNotifier.MixProject do
use Mix.Project
@source_url "https://github.com/wyeworks/boom"
def project do
[
app: :boom_notifier,
version: "0.8.0",
elixir: "~> 1.8",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: [
# include swoosh and bamboo here as they are optional deps
# and will be missed in plt generation otherwise.
plt_add_apps: [:eex, :swoosh, :bamboo, :mix],
plt_core_path: "priv/plts",
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
],
aliases: [
quality: ["format", "credo --strict", "dialyzer"],
e2e: ["cmd mix end_to_end_test"]
],
docs: docs(),
description: description(),
package: package(),
test_paths: ["test/unit"]
]
end
defp description do
"""
This package allows your Phoenix application to send notifications
whenever an exceptions is raised. By default it includes an email and a
webhook notifier, but you can implement your custom ones.
"""
end
defp package do
[
files: ["lib", "mix.exs", "README.md"],
licenses: ["MIT"],
links: %{
"GitHub" => @source_url,
"Docs" => "https://hexdocs.pm/boom_notifier"
}
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger],
mod: {BoomNotifier.Application, []}
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:httpoison, "~> 1.5"},
{:jason, "~> 1.2"},
{:plug_cowboy, "~> 1.0 or ~> 2.0"},
# Delivery service is an end-user choice
{:bamboo, "~> 2.0", optional: true},
{:swoosh, "~> 1.5", optional: true},
# Test dependencies
{:bypass, "~> 2.1", only: :test},
{:phoenix, "~> 1.4", only: [:test]},
# Dev dependencies
{:credo, "~> 1.6.1", only: [:dev], runtime: false},
{:dialyxir, "~> 1.1", only: [:dev], runtime: false},
{:ex_doc, "~> 0.23", only: :dev}
]
end
defp docs do
[
main: "readme",
source_url: @source_url,
extras: [
"README.md",
"docs/notifiers/email.md": [title: "Email Notifier"],
"docs/notifiers/webhook.md": [title: "Webhook Notifier"],
"docs/notifiers/custom.md": [title: "Custom Notifier"]
],
groups_for_extras: [
Notifiers: Path.wildcard("docs/notifiers/*.md")
]
]
end
end