forked from cabol/nebulex_redis_adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
106 lines (90 loc) · 2.4 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
defmodule NebulexRedisAdapter.MixProject do
use Mix.Project
@version "1.1.0"
def project do
[
app: :nebulex_redis_adapter,
version: @version,
elixir: "~> 1.6",
deps: deps(),
# Docs
name: "NebulexRedisAdapter",
docs: docs(),
# Testing
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
# Dialyzer
dialyzer: dialyzer(),
# Hex
package: package(),
description: "Nebulex adapter for Redis"
]
end
def application do
[]
end
defp deps do
[
{:redix, "~> 0.10"},
# This is because the adapter tests need some support modules and shared
# tests from nebulex dependency, and the hex dependency doesn't include
# the test folder. Hence, to run the tests it is necessary to fetch
# nebulex dependency directly from GH.
{:nebulex, nebulex_dep()},
{:nebulex_cluster, "~> 0.1"},
{:jchash, "~> 0.1.1"},
{:crc, "~> 0.9"},
# Test
{:excoveralls, "~> 0.11", only: :test},
{:benchee, "~> 1.0", optional: true, only: :dev},
{:benchee_html, "~> 1.0", optional: true, only: :dev},
# Code Analysis
{:dialyxir, "~> 0.5", optional: true, only: [:dev, :test], runtime: false},
{:credo, "~> 1.0", optional: true, only: [:dev, :test]},
# Docs
{:ex_doc, "~> 0.20", only: :dev, runtime: false},
{:inch_ex, "~> 2.0", only: :docs}
]
end
defp nebulex_dep do
if System.get_env("NBX_TEST") do
[github: "cabol/nebulex", tag: "v1.1.0", override: true]
else
"~> 1.1"
end
end
defp package do
[
name: :nebulex_redis_adapter,
maintainers: ["Carlos Bolanos"],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/cabol/nebulex_redis_adapter"}
]
end
defp docs do
[
main: "NebulexRedisAdapter",
source_ref: "v#{@version}",
canonical: "http://hexdocs.pm/nebulex_redis_adapter",
source_url: "https://github.com/cabol/nebulex_redis_adapter"
]
end
defp dialyzer do
[
plt_add_apps: [:mix, :eex, :nebulex, :shards, :jchash],
flags: [
:unmatched_returns,
:error_handling,
:race_conditions,
:no_opaque,
:unknown,
:no_return
]
]
end
end