-
Notifications
You must be signed in to change notification settings - Fork 31
/
mix.exs
66 lines (57 loc) · 1.44 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
defmodule RemoteIp.Mixfile do
use Mix.Project
def project do
[
app: :remote_ip,
version: "1.2.0",
elixir: "~> 1.12",
description: description(),
package: package(),
deps: deps(),
aliases: aliases(),
dialyzer: dialyzer(),
docs: docs(),
test_coverage: test_coverage()
]
end
def application do
[extra_applications: [:logger]]
end
defp description do
"A plug to rewrite the Plug.Conn's remote_ip based on request headers" <>
" such as Forwarded, X-Forwarded-For, X-Client-Ip, and X-Real-Ip"
end
defp package do
%{
files: ~w[lib mix.exs README.md LICENSE],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/ajvondrak/remote_ip"}
}
end
defp deps do
[
{:combine, "~> 0.10"},
{:plug, "~> 1.14"},
{:ex_doc, "~> 0.34", only: :dev, runtime: false},
{:dialyxir, "~> 1.4", only: [:ci, :dev], runtime: false},
{:excoveralls, "~> 0.18", only: [:ci, :test], runtime: false},
{:castore, "~> 1.0", only: [:ci, :test], runtime: false}
]
end
defp aliases do
[integrate: "run integration/tests.exs"]
end
defp dialyzer do
[plt_file: {:no_warn, "priv/plts/dialyzer.plt"}]
end
defp docs do
[
source_url: "https://github.com/ajvondrak/remote_ip",
main: "RemoteIp",
extras: ["extras/algorithm.md"]
]
end
defp test_coverage() do
[tool: ExCoveralls]
end
end