-
Notifications
You must be signed in to change notification settings - Fork 71
/
mix.exs
135 lines (123 loc) · 4.49 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
126
127
128
129
130
131
132
133
134
135
Code.load_file(Path.join([__DIR__, "config", "helpers.exs"]))
defmodule Cog.Mixfile do
use Mix.Project
def project do
[app: :cog,
version: "1.1.0",
elixir: "~> 1.3.2",
erlc_paths: ["emqttd_plugins"],
erlc_options: [:debug_info, :warnings_as_errors],
elixirc_options: [warnings_as_errors: System.get_env("ALLOW_WARNINGS") == nil,
long_compilation_threshold: 50],
consolidate_protocols: Mix.env == :prod,
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps,
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix] ++ Mix.compilers,
aliases: aliases,
test_coverage: [tool: ExCoveralls],
preferred_cli_env: ["coveralls": :test,
"coveralls.html": :test,
"coveralls.post": :test]
]
end
def application do
[applications: started_applications,
included_applications: [:emqttd, :slack, :romeo],
mod: {Cog, []}]
end
defp started_applications do
apps = [:lager,
:logger,
:probe,
:logger_file_backend,
:ibrowse,
:httpotion,
:gproc,
:esockd,
:cowboy,
:phoenix,
:phoenix_ecto,
:postgrex,
:phoenix_html,
:comeonin,
:greenbar_markdown,
:greenbar,
:spanner,
:bamboo]
if System.get_env("COG_SASL_LOG") != nil do
[:sasl|apps]
else
apps
end
end
defp deps do
[
# Operable Code
########################################################################
{:conduit, github: "operable/conduit"},
{:probe, github: "operable/probe"},
{:spanner, github: "operable/spanner"},
{:greenbar, github: "operable/greenbar"},
# Used to model pipelines
{:gen_stage, "~> 0.10.0"},
# MQTT-related
########################################################################
{:emqttc, github: "emqtt/emqttc", branch: "master"},
{:emqttd, github: "emqtt/emqttd", tag: "1.1.2"},
{:esockd, github: "emqtt/esockd", ref: "e6c27801bb5331d064081ef6d6af291a2878038c", override: true},
{:gen_logger, github: "emqtt/gen_logger", branch: "master", override: true},
# Used by cowboy, emqttd, esockd... they don't seem to lock to a
# particular version, though.
{:gproc, "~> 0.5.0", override: true},
{:snappy, github: "fdmanana/snappy-erlang-nif"},
# Logging
########################################################################
# emqttd depends on lager but just points at master. Overriding to the most
# recent version in hex.
{:lager, "~> 3.2.1", override: true},
{:lager_logger, "~> 1.0.3"},
{:logger_file_backend, github: "onkel-dirtus/logger_file_backend"},
# Other Direct Dependencies
########################################################################
{:bamboo_smtp, "~> 1.2.0"},
{:comeonin, "~> 2.5"},
{:cowboy, "~> 1.0.4"},
{:ecto, "~> 2.0.2"},
{:html_entities, "~> 0.3.0"},
# Bamboo depends httpoison 0.9 but slack has the dep locked at
# 0.8.3
{:httpoison, "~> 0.9", override: true},
{:httpotion, "~> 3.0"},
{:phoenix, "~> 1.2"},
{:phoenix_ecto, "~> 3.0"},
{:phoenix_html, "~> 2.6"},
{:poison, "~> 2.0"},
{:postgrex, "~> 0.11.2"},
{:slack, github: "operable/Elixir-Slack"},
{:uuid, "~> 1.1.5"},
{:romeo, github: "operable/romeo", branch: "iq-bodies"},
# The Slack library depends on this Github repo, and not the
# version in Hex. Thus, we need to declare it manually :(
{:websocket_client, github: "jeremyong/websocket_client"},
{:eper, "0.94.0"},
# Test and Development
########################################################################
{:earmark, "~> 1.0", only: :dev},
{:ex_doc, "~> 0.13", only: :dev},
{:excoveralls, "~> 0.5", only: :test},
{:mix_test_watch, "~> 0.2", only: [:dev, :test]},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:meck, "~> 0.8.4", only: [:dev, :test]}
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "web", "test/support"]
defp elixirc_paths(_), do: ["lib", "web"]
defp aliases do
["cog.setup": ["deps.get", "ecto.setup"],
"ecto.setup": ["ecto.create", "ecto.migrate"],
"ecto.reset": ["ecto.drop", "ecto.setup"]]
end
end