forked from elixir-geolix/adapter_mmdb2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
120 lines (111 loc) · 3.25 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
defmodule Geolix.Adapter.MMDB2.MixProject do
use Mix.Project
@url_changelog "https://hexdocs.pm/geolix_adapter_mmdb2/changelog.html"
@url_github "https://github.com/elixir-geolix/adapter_mmdb2"
@version "0.7.0-dev"
def project do
[
app: :geolix_adapter_mmdb2,
name: "Geolix Adapter: MMDB2",
version: @version,
elixir: "~> 1.9",
aliases: aliases(),
deps: deps(),
description: "MMDB2 adapter for Geolix",
dialyzer: dialyzer(),
docs: docs(),
elixirc_paths: elixirc_paths(Mix.env()),
package: package(),
preferred_cli_env: [
"bench.lookup": :bench,
coveralls: :test,
"coveralls.detail": :test
],
test_coverage: [tool: ExCoveralls]
]
end
def application do
[
extra_applications: [:inets, :logger, :ssl]
]
end
defp aliases() do
[
"bench.lookup": ["run bench/lookup.exs"]
]
end
defp deps do
[
{:benchee, "~> 1.1", only: :bench, runtime: false},
{:credo, "~> 1.6", only: :dev, runtime: false},
{:dialyxir, "~> 1.2", only: :dev, runtime: false},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:excoveralls, "~> 0.15.0", only: :test, runtime: false},
{:geolix, "~> 2.0"},
{:geolix_testdata, "~> 0.6.0", only: [:bench, :test], runtime: false},
{:mmdb2_decoder, "~> 3.0"}
]
end
defp dialyzer do
[
flags: [
:error_handling,
:underspecs,
:unmatched_returns
],
plt_add_apps: [:inets],
plt_core_path: "plts",
plt_local_path: "plts"
]
end
defp docs do
[
extras: [
"CHANGELOG.md",
LICENSE: [title: "License"],
"README.md": [title: "Overview"]
],
formatters: ["html"],
groups_for_modules: [
"Result Structs (Databases)": [
Geolix.Adapter.MMDB2.Result.ASN,
Geolix.Adapter.MMDB2.Result.AnonymousIP,
Geolix.Adapter.MMDB2.Result.City,
Geolix.Adapter.MMDB2.Result.ConnectionType,
Geolix.Adapter.MMDB2.Result.Country,
Geolix.Adapter.MMDB2.Result.Domain,
Geolix.Adapter.MMDB2.Result.Enterprise,
Geolix.Adapter.MMDB2.Result.ISP
],
"Result Structs (Records)": [
Geolix.Adapter.MMDB2.Record.City,
Geolix.Adapter.MMDB2.Record.Continent,
Geolix.Adapter.MMDB2.Record.Country,
Geolix.Adapter.MMDB2.Record.EnterpriseCity,
Geolix.Adapter.MMDB2.Record.EnterpriseCountry,
Geolix.Adapter.MMDB2.Record.EnterprisePostal,
Geolix.Adapter.MMDB2.Record.EnterpriseSubdivision,
Geolix.Adapter.MMDB2.Record.Location,
Geolix.Adapter.MMDB2.Record.Postal,
Geolix.Adapter.MMDB2.Record.RepresentedCountry,
Geolix.Adapter.MMDB2.Record.Subdivision
]
],
main: "Geolix.Adapter.MMDB2",
source_ref: "v#{@version}",
source_url: @url_github
]
end
defp elixirc_paths(:test), do: ["lib", "test/helpers"]
defp elixirc_paths(_), do: ["lib"]
defp package do
%{
files: ["CHANGELOG.md", "LICENSE", "mix.exs", "README.md", "lib"],
licenses: ["Apache-2.0"],
links: %{
"Changelog" => @url_changelog,
"GitHub" => @url_github
}
}
end
end