-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
99 lines (89 loc) · 2.62 KB
/
mix.exs
File metadata and controls
99 lines (89 loc) · 2.62 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
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 IpAccessControlPlug.MixProject do
@moduledoc false
use Mix.Project
@app :ip_access_control
@project_url "https://github.com/KineticCafe/ip_access_control"
@version "1.2.0"
def project do
[
app: @app,
description: "Restrict access to a Plug-based application using IP and CIDR access lists.",
version: @version,
source_url: @project_url,
name: "IP Access Control Plug",
elixir: "~> 1.15",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
package: package(),
docs: docs(),
test_coverage: test_coverage(),
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [
plt_add_apps: [:mix],
plt_local_path: "priv/plts/project.plt",
plt_core_path: "priv/plts/core.plt"
]
]
end
def application do
[extra_applications: [:logger]]
end
def cli do
[
preferred_envs: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.github": :test,
"coveralls.html": :test,
"coveralls.json": :test
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp package do
[
maintainers: ["Austin Ziegler", "Kinetic Commerce"],
licenses: ["MIT"],
files: ~w(lib .formatter.exs mix.exs *.md licences),
links: %{
"Source" => @project_url,
"Issues" => @project_url <> "/issues"
}
]
end
defp deps do
[
{:bitwise_ip, "~> 1.2"},
{:plug, "~> 1.0"},
{:credo, "~> 1.0", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.18", only: [:test]},
{:ex_doc, "~> 0.29", only: [:dev, :test], runtime: false},
{:quokka, "~> 2.6", only: [:dev, :test], runtime: false}
]
end
defp docs do
[
main: "IpAccessControl",
extras: [
"README.md",
"CONTRIBUTING.md": [filename: "CONTRIBUTING.md", title: "Contributing"],
"CODE_OF_CONDUCT.md": [filename: "CODE_OF_CONDUCT.md", title: "Code of Conduct"],
"CHANGELOG.md": [filename: "CHANGELOG.md", title: "CHANGELOG"],
"LICENCE.md": [filename: "LICENCE.md", title: "Licence"],
"licences/dco.txt": [filename: "dco.txt", title: "Developer Certificate of Origin"],
"SECURITY.md": [filename: "SECURITY.md", title: "Security Policy"]
],
source_ref: "v#{@version}",
source_url: @project_url,
canonical: "https://hexdocs.pm/#{@app}"
]
end
defp test_coverage do
[
tool: ExCoveralls
]
end
end