forked from elixir-plug/plug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
117 lines (109 loc) · 2.54 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
defmodule Plug.MixProject do
use Mix.Project
@version "1.11.1"
@description "A specification and conveniences for composable modules between web applications"
@xref_exclude [Plug.Cowboy, :telemetry]
def project do
[
app: :plug,
version: @version,
elixir: "~> 1.7",
deps: deps(),
package: package(),
description: @description,
name: "Plug",
xref: [exclude: @xref_exclude],
consolidate_protocols: Mix.env() != :test,
docs: [
extras: [
"README.md",
"guides/https.md"
],
main: "readme",
groups_for_modules: groups_for_modules(),
groups_for_extras: groups_for_extras(),
source_ref: "v#{@version}",
source_url: "https://github.com/elixir-plug/plug"
]
]
end
# Configuration for the OTP application
def application do
[
extra_applications: [:logger, :eex],
mod: {Plug.Application, []},
env: [validate_header_keys_during_test: true]
]
end
def deps do
[
{:mime, "~> 1.0"},
{:plug_crypto, "~> 1.1.1 or ~> 1.2"},
{:telemetry, "~> 0.4"},
{:ex_doc, "~> 0.21", only: :docs}
]
end
defp package do
%{
licenses: ["Apache-2.0"],
maintainers: ["Gary Rennie", "José Valim"],
links: %{"GitHub" => "https://github.com/elixir-plug/plug"},
files: ["lib", "mix.exs", "README.md", "CHANGELOG.md", "LICENSE", "src", ".formatter.exs"]
}
end
defp groups_for_modules do
# Ungrouped Modules
#
# Plug
# Plug.Builder
# Plug.Conn
# Plug.HTML
# Plug.Router
# Plug.Test
# Plug.Upload
[
Plugs: [
Plug.BasicAuth,
Plug.CSRFProtection,
Plug.Head,
Plug.Logger,
Plug.MethodOverride,
Plug.Parsers,
Plug.RequestId,
Plug.RewriteOn,
Plug.SSL,
Plug.Session,
Plug.Static,
Plug.Telemetry
],
"Error handling": [
Plug.Debugger,
Plug.ErrorHandler,
Plug.Exception
],
"Plug.Conn": [
Plug.Conn.Adapter,
Plug.Conn.Cookies,
Plug.Conn.Query,
Plug.Conn.Status,
Plug.Conn.Unfetched,
Plug.Conn.Utils
],
"Plug.Parsers": [
Plug.Parsers.JSON,
Plug.Parsers.MULTIPART,
Plug.Parsers.URLENCODED
],
"Plug.Session": [
Plug.Session.COOKIE,
Plug.Session.ETS,
Plug.Session.Store
]
]
end
defp groups_for_extras do
[
Guides: ~r/guides\/[^\/]+\.md/
]
end
end