-
Notifications
You must be signed in to change notification settings - Fork 106
/
mix.exs
125 lines (120 loc) · 3.56 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
123
124
125
defmodule Cachex.Mixfile do
use Mix.Project
@version "4.0.3"
@url_docs "http://hexdocs.pm/cachex"
@url_github "https://github.com/whitfin/cachex"
def project do
[
app: :cachex,
name: "Cachex",
description: "Powerful in-memory key/value storage for Elixir",
package: %{
files: [
"lib",
"mix.exs",
"LICENSE"
],
licenses: ["MIT"],
links: %{
"Docs" => @url_docs,
"GitHub" => @url_github
},
maintainers: ["Isaac Whitfield"]
},
version: @version,
elixir: "~> 1.7",
deps: deps(),
docs: [
main: "overview",
source_ref: "v#{@version}",
source_url: @url_github,
extra_section: "guides",
extras: [
"docs/extensions/custom-commands.md",
"docs/extensions/execution-lifecycle.md",
"docs/general/batching-actions.md",
"docs/general/local-persistence.md",
"docs/general/streaming-records.md",
"docs/management/limiting-caches.md",
"docs/management/expiring-records.md",
"docs/management/stats-gathering.md",
"docs/migrations/migrating-to-v4.md",
"docs/migrations/migrating-to-v3.md",
"docs/migrations/migrating-to-v2.md",
"docs/routing/cache-routers.md",
"docs/routing/distributed-caches.md",
"docs/warming/reactive-warming.md",
"docs/warming/proactive-warming.md",
"docs/overview.md"
],
groups_for_extras: [
General: Path.wildcard("docs/general/*.md"),
Management: Path.wildcard("docs/management/*.md"),
Routing: Path.wildcard("docs/routing/*.md"),
Warming: Path.wildcard("docs/warming/*.md"),
Extensions: Path.wildcard("docs/extensions/*.md"),
Migration: Path.wildcard("docs/migrations/*.md")
]
],
test_coverage: [
tool: ExCoveralls
],
preferred_cli_env: [
docs: :docs,
bench: :bench,
credo: :lint,
cachex: :test,
coveralls: :cover,
"coveralls.html": :cover,
"coveralls.travis": :cover
],
aliases: [
bench: "run benchmarks/main.exs",
test: [&start_epmd/1, "test"]
]
]
end
# Configuration for the OTP application
#
# Type "mix help compile.app" for more information
def application do
[
mod: {Cachex.Application, []},
extra_applications: [:unsafe]
]
end
# Dependencies can be Hex packages:
#
# {:mydep, "~> 0.3.0"}
#
# Or git/path repositories:
#
# {:mydep, git: "https://github.com/elixir-lang/mydep.git", tag: "0.1.0"}
#
# Type "mix help deps" for more examples and options
defp deps do
[
# Production dependencies
{:eternal, "~> 1.2"},
{:ex_hash_ring, "~> 6.0"},
{:jumper, "~> 1.0"},
{:sleeplocks, "~> 1.1"},
{:unsafe, "~> 1.0"},
# Testing dependencies
{:excoveralls, "~> 0.15", optional: true, only: [:cover]},
{:local_cluster, "~> 2.1", optional: true, only: [:cover, :test]},
# Linting dependencies
{:credo, "~> 1.7", optional: true, only: [:lint]},
# Benchmarking dependencies
{:benchee, "~> 1.1", optional: true, only: [:bench]},
{:benchee_html, "~> 1.0", optional: true, only: [:bench]},
# Documentation dependencies
{:ex_doc, "~> 0.29", optional: true, only: [:docs]}
]
end
# Start epmd before test cases are run.
defp start_epmd(_) do
{_, 0} = System.cmd("epmd", ["-daemon"])
:ok
end
end