This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
forked from akira/exq_ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
69 lines (63 loc) · 1.71 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
defmodule ExqUi.Mixfile do
use Mix.Project
def project do
[ app: :exq_ui,
version: "0.11.0",
elixir: "~> 1.3",
elixirc_paths: ["lib", "web"],
package: [
maintainers: ["Alex Kira", "Justin McNally", "Nick Sanders"],
links: %{"GitHub" => "https://github.com/akira/exq_ui"},
licenses: ["Apache2.0"],
files: ~w(lib priv test web) ++
~w(LICENSE mix.exs README.md)
],
description: """
Exq UI is the UI component for Exq, a job processing library. Exq UI provides the UI dashboard
to display stats on job processing.
""",
deps: deps(),
test_coverage: [tool: ExCoveralls]
]
end
# Configuration for the OTP application
def application do
[
mod: { ExqUi, [] },
applications: [:redix],
extra_applications: [:plug, :logger]
]
end
# Returns the list of dependencies in the format:
# { :foobar, "0.1", git: "https://github.com/elixir-lang/foobar.git" }
defp deps do
[
{ :exq, ">= 0.9.0"},
{ :poison, ">= 1.2.0 or ~> 2.0"}, # Take out after #83
{ :excoveralls, "~> 0.3", only: :test },
{ :ex_doc, "~> 0.19", only: :dev }
] ++ cowboy_deps()
end
def cowboy_deps do
case otp_version() >= 19 && minor_elixir_version() >= 4 do
true -> [
{ :plug, "~> 1.6"},
{ :cowboy, "~> 2.4" }
]
_ -> [
{ :plug, "< 1.0.3" },
{ :cowboy, "~> 1.0" }
]
end
end
# elixir/otp version helpers
def minor_elixir_version do
{_, version} = Version.parse(System.version)
version.minor
end
def otp_version do
:erlang.system_info(:otp_release)
|> to_string()
|> String.to_integer()
end
end