Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# MMDB2 File Format Decoder

[![Test](https://github.com/elixir-geolix/mmdb2_decoder/actions/workflows/test.yml/badge.svg)](https://github.com/elixir-geolix/mmdb2_decoder/actions/workflows/test.yml)
[![Module Version](https://img.shields.io/hexpm/v/mmdb2_decoder.svg)](https://hex.pm/packages/mmdb2_decoder)
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/mmdb2_decoder/)
[![Total Downloads](https://img.shields.io/hexpm/dt/mmdb2_decoder.svg)](https://hex.pm/packages/mmdb2_decoder)
[![License](https://img.shields.io/hexpm/l/mmdb2_decoder.svg)](https://github.com/elixir-geolix/mmdb2_decoder/blob/master/LICENSE)
[![Last Updated](https://img.shields.io/github/last-commit/elixir-geolix/mmdb2_decoder.svg)](https://github.com/elixir-geolix/mmdb2_decoder/commits/master)

## Setup

Add the module as a dependency to your `mix.exs` file:
Expand Down Expand Up @@ -40,9 +47,17 @@ MMDB2Decoder.lookup(ip, meta, tree, data)

## Benchmark

Several (minimal) benchmark scripts are included. Please refer to the Mixfile or `mix help` output for their names.
Several (minimal) benchmark scripts are included as shown below:

```bash
$ mix bench.database
$ mix bench.lookup
$ mix bench.parse
```

## Copyright and License

## License
Copyright (c) 2017 Marc Neudert

[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)

Expand Down
25 changes: 18 additions & 7 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ defmodule MMDB2Decoder.MixProject do
use Mix.Project

@url_github "https://github.com/elixir-geolix/mmdb2_decoder"
@url_changelog "https://hexdocs.pm/mmdb2_decoder/changelog.html"
@version "3.1.0-dev"

def project do
[
app: :mmdb2_decoder,
name: "MMDB2 Decoder",
version: "3.1.0-dev",
description: "MMDB2 File Format Decoder",
version: @version,
elixir: "~> 1.7",
aliases: aliases(),
deps: deps(),
description: "MMDB2 File Format Decoder",
dialyzer: dialyzer(),
docs: docs(),
elixirc_paths: elixirc_paths(Mix.env()),
Expand Down Expand Up @@ -60,20 +62,29 @@ defmodule MMDB2Decoder.MixProject do

defp docs do
[
extras: [
"CHANGELOG.md",
LICENSE: [title: "License"],
"README.md": [title: "Overview"]
],
main: "MMDB2Decoder",
source_ref: "master",
source_url: @url_github
source_url: @url_github,
formatters: ["html"]
]
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: %{"GitHub" => @url_github}
}
licenses: ["Apache-2.0"],
links: %{
"Changelog" => @url_changelog,
"GitHub" => @url_github
}
]
end
end