forked from elixir-plug/plug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
122 lines (114 loc) · 2.79 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
defmodule Plug.MixProject do
use Mix.Project
@version "1.7.0-dev"
@description "A specification and conveniences for composable modules between web applications"
@xref_exclude [:ranch, :cowboy, :cowboy_req, :cowboy_router, :cowboy_stream, :cowboy_stream_h]
def project do
[
app: :plug,
version: @version,
elixir: "~> 1.4",
deps: deps(),
package: package(),
lockfile: lockfile(),
description: @description,
name: "Plug",
xref: [exclude: @xref_exclude],
docs: [
extras: ["README.md"],
main: "readme",
groups_for_modules: groups_for_modules(),
source_ref: "v#{@version}",
source_url: "https://github.com/elixir-plug/plug"
]
]
end
# Configuration for the OTP application
def application do
[
applications: [:crypto, :logger, :mime],
mod: {Plug, []},
env: [validate_header_keys_during_test: true]
]
end
def deps do
[
{:mime, "~> 1.0"},
{:cowboy, "~> 1.0.1 or ~> 1.1 or ~> 2.4", optional: true},
{:ex_doc, "~> 0.19.1", only: :docs},
{:inch_ex, ">= 0.0.0", only: :docs},
{:hackney, "~> 1.2.0", only: :test},
{:kadabra, "~> 0.3.4", only: :test}
]
end
defp lockfile() do
case System.get_env("COWBOY_VERSION") do
"1" <> _ -> "mix-cowboy1.lock"
_ -> "mix.lock"
end
end
defp package do
%{
licenses: ["Apache 2"],
maintainers: ["José Valim"],
links: %{"GitHub" => "https://github.com/elixir-plug/plug"},
files: ["lib", "mix.exs", "README.md", "CHANGELOG.md", "src", ".formatter.exs"]
}
end
defp groups_for_modules do
# Ungrouped Modules
#
# Plug
# Plug.Builder
# Plug.Conn
# Plug.Crypto
# Plug.Debugger
# Plug.ErrorHandler
# Plug.Exception
# Plug.HTML
# Plug.Router
# Plug.Test
# Plug.Upload
[
Plugs: [
Plug.CSRFProtection,
Plug.Head,
Plug.Logger,
Plug.MethodOverride,
Plug.Parsers,
Plug.RequestId,
Plug.SSL,
Plug.Session,
Plug.Static
],
"Plug.Adapters": [
Plug.Adapters.Cowboy,
Plug.Adapters.Cowboy2,
Plug.Adapters.Translator
],
"Plug.Conn": [
Plug.Conn.Adapter,
Plug.Conn.Cookies,
Plug.Conn.Query,
Plug.Conn.Status,
Plug.Conn.Unfetched,
Plug.Conn.Utils
],
"Plug.Crypto": [
Plug.Crypto.KeyGenerator,
Plug.Crypto.MessageEncryptor,
Plug.Crypto.MessageVerifier
],
"Plug.Parsers": [
Plug.Parsers.JSON,
Plug.Parsers.MULTIPART,
Plug.Parsers.URLENCODED
],
"Plug.Session": [
Plug.Session.COOKIE,
Plug.Session.ETS,
Plug.Session.Store
]
]
end
end