-
Notifications
You must be signed in to change notification settings - Fork 32
/
mix.exs
119 lines (111 loc) · 3.37 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
defmodule Cloak.Ecto.MixProject do
use Mix.Project
@version "1.3.0"
@source_url "https://github.com/danielberkompas/cloak_ecto"
def project do
[
app: :cloak_ecto,
version: @version,
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
source_url: @source_url,
description: "Encrypted fields for Ecto",
package: package(),
deps: deps(),
docs: docs(),
elixirc_paths: elixirc_paths(Mix.env()),
aliases: aliases()
]
end
def application do
[
extra_applications: [:logger]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_env), do: ["lib"]
defp deps do
[
{:cloak, "~> 1.1.1"},
{:ecto, "~> 3.0"},
# Must use a forked version of pbkdf2 to support Erlang 24. Because Hex only
# allows hex packages to be dependencies, this dep cannot be listed as an
# optional dependency anymore.
#
# See https://github.com/basho/erlang-pbkdf2/pull/12
{:pbkdf2, "~> 2.0", github: "miniclip/erlang-pbkdf2", only: [:dev, :test]},
{:ex_doc, ">= 0.0.0", only: :dev},
{:excoveralls, ">= 0.0.0", only: :test},
{:castore, "~> 1.0", only: :test},
{:ecto_sql, ">= 0.0.0", only: [:dev, :test]},
{:postgrex, ">= 0.0.0", only: [:dev, :test]},
{:jason, ">= 0.0.0", only: [:dev, :test]},
{:inch_ex, ">= 0.0.0", only: :test}
]
end
defp package do
[
files: ["lib", "mix.exs", "README.md", "CHANGELOG.md", "LICENSE"],
maintainers: ["Daniel Berkompas"],
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/danielberkompas/cloak_ecto"
}
]
end
defp docs do
[
main: "readme",
extras: [
"README.md",
"guides/how_to/install.md": [title: "Install Cloak"],
"guides/how_to/generate_keys.md": [title: "Generate Encryption Keys"],
"guides/how_to/encrypt_existing_data.md": [title: "Encrypt Existing Data"],
"guides/how_to/rotate_keys.md": [title: "Rotate Keys"],
"guides/how_to/troubleshooting.md": [title: "Troubleshooting"],
"guides/how_to/closure_wrapping.md": [title: "Closure Wrapping"],
"guides/how_to/troubleshooting.md": [title: "Troubleshooting"],
"guides/upgrading/0.9.x_to_1.0.x.md": [title: "0.9.x to 1.0.x"]
],
extra_section: "GUIDES",
groups_for_extras: [
"How To": ~r/how_to/,
Upgrading: ~r/upgrading/
],
groups_for_modules: [
Behaviours: [
Cloak.Ecto.CustomCursor
],
"Ecto Types": [
Cloak.Ecto.Binary,
Cloak.Ecto.Date,
Cloak.Ecto.DateTime,
Cloak.Ecto.Decimal,
Cloak.Ecto.Float,
Cloak.Ecto.HMAC,
Cloak.Ecto.Integer,
Cloak.Ecto.IntegerList,
Cloak.Ecto.Map,
Cloak.Ecto.NaiveDateTime,
Cloak.Ecto.PBKDF2,
Cloak.Ecto.SHA256,
Cloak.Ecto.StringList,
Cloak.Ecto.Time
]
]
]
end
defp aliases do
[
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
"ecto.reset": ["ecto.drop", "ecto.create", "ecto.migrate"]
]
end
end