-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy pathmix.exs
89 lines (80 loc) · 2.08 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
defmodule ExTwitter.Mixfile do
use Mix.Project
@source_url "https://github.com/parroty/extwitter"
@version "0.14.0"
def project do
[
app: :extwitter,
version: @version,
elixir: ">= 1.12.0",
deps: deps(),
docs: docs(),
package: package(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env:
cli_env_for(:test, [
"coveralls",
"coveralls.detail",
"coveralls.post",
"vcr",
"vcr.delete",
"vcr.check",
"vcr.show"
]),
]
end
defp cli_env_for(env, tasks) do
Enum.reduce(tasks, [], fn key, acc -> Keyword.put(acc, :"#{key}", env) end)
end
def application do
[
mod: {ExTwitter, []},
applications: [:inets, :ssl, :crypto, :logger, :oauther, :jason],
extra_applications: extra_applications(Mix.env())
]
end
defp extra_applications(:test), do: common_extra_applications()
defp extra_applications(:dev), do: common_extra_applications()
defp extra_applications(_), do: []
defp common_extra_applications do
[:exvcr, :mock]
end
def deps do
[
{:oauther, "~> 1.3"},
{:jason, "~> 1.1"},
{:castore, "~> 1.0"},
{:exvcr, "~> 0.14", only: :test},
{:excoveralls, "~> 0.18", only: :test},
{:meck, "~> 0.9", only: [:dev, :test]},
{:mock, "~> 0.3", only: [:dev, :test]},
{:ex_doc, ">= 0.0.0", only: [:dev, :docs], runtime: false},
{:inch_ex, "~> 2.0", only: :docs},
{:benchfella, "~> 0.3.3", only: :dev}
]
end
defp docs do
[
extras: [
"CHANGELOG.md": [],
"LICENSE.md": [title: "License"],
"README.md": [title: "Overview"]
],
main: "readme",
source_url: @source_url,
source_ref: "v#{@version}",
formatters: ["html"]
]
end
defp package do
[
description: "Twitter client library for Elixir.",
maintainers: ["parroty"],
licenses: ["MIT"],
links: %{
"Changelog" => "https://hexdocs.pm/extwitter/changelog.html",
"GitHub" => @source_url
}
]
end
end