diff --git a/.formatter.exs b/.formatter.exs new file mode 100644 index 0000000..d2cda26 --- /dev/null +++ b/.formatter.exs @@ -0,0 +1,4 @@ +# Used by "mix format" +[ + inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] +] diff --git a/.gitignore b/.gitignore index a0c4068..88d3d6a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,27 @@ -/_build -/deps -/bench +# The directory Mix will write compiled artifacts to. +/_build/ + +# If you run "mix test --cover", coverage assets end up here. +/cover/ + +# The directory Mix downloads your dependencies sources to. +/deps/ + +# Where third-party dependencies like ExDoc output generated docs. +/doc/ + +# Ignore .fetch files in case you like to edit your project deps locally. +/.fetch + +# If the VM crashes, it generates a dump, let's ignore it too. erl_crash.dump + +# Also ignore archive artifacts (built via "mix archive.build"). *.ez + +# Ignore package tarball (built via "mix hex.build"). +simetric-*.tar + + +# Temporary files for e.g. tests +/tmp diff --git a/LICENSE b/LICENSE.md similarity index 100% rename from LICENSE rename to LICENSE.md diff --git a/README.md b/README.md index 7ab917d..5fba080 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ # Simetric [![Build Status](https://travis-ci.org/lexmag/simetric.svg "Build Status")](https://travis-ci.org/lexmag/simetric) -[![Hex Version](https://img.shields.io/hexpm/v/simetric.svg "Hex Version")](https://hex.pm/packages/simetric) +[![Module Version](https://img.shields.io/hexpm/v/simetric.svg)](https://hex.pm/packages/simetric) +[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/simetric/) +[![Total Download](https://img.shields.io/hexpm/dt/simetric.svg)](https://hex.pm/packages/simetric) +[![License](https://img.shields.io/hexpm/l/simetric.svg)](https://github.com/lexmag/simetric/blob/master/LICENSE) +[![Last Updated](https://img.shields.io/github/last-commit/lexmag/simetric.svg)](https://github.com/lexmag/simetric/commits/master) Simetric provides facilities to perform approximate string matching and measurement of string similarity/distance. The library is focusing on speed and completeness. @@ -14,11 +18,13 @@ The library is focusing on speed and completeness. ## Installation -Add Simetric as a dependency to your `mix.exs` file: +Add `:simetric` as a dependency to your `mix.exs` file: ```elixir defp deps do - [{:simetric, "~> 0.2.0"}] + [ + {:simetric, "~> 0.2.0"} + ] end ``` @@ -39,6 +45,8 @@ Simetric.Levenshtein.compare("gumbo", "gambol") # => 2 Simetric.Levenshtein.compare("kitten", "sitting") # => 3 ``` -## License +## Copyright and License -Simetric is released under [the ISC license](LICENSE). +Copyright (c) 2014, Aleksei Magusev + +Simetric is released under [the ISC license](./LICENSE.md). diff --git a/mix.exs b/mix.exs index 4dd8388..9d85581 100644 --- a/mix.exs +++ b/mix.exs @@ -1,26 +1,47 @@ defmodule Simetric.Mixfile do use Mix.Project + @source_url "https://github.com/lexmag/simetric" + @version "0.2.0" + def project() do - [app: :simetric, - version: "0.2.0", - elixir: "~> 1.3", - description: description(), - package: package()] + [ + app: :simetric, + version: @version, + elixir: "~> 1.3", + package: package(), + deps: deps(), + docs: docs() + ] end def application() do [applications: []] end - defp description() do - "This library provides facilities to perform approximate string matching " <> - "and measurement of string similarity/distance." + defp package() do + [ + description: "This library provides facilities to perform approximate string matching " + <> "and measurement of string similarity/distance.", + maintainers: ["Aleksei Magusev"], + licenses: ["ISC"], + links: %{"GitHub" => @source_url} + ] end - defp package() do - [maintainers: ["Aleksei Magusev"], - licenses: ["ISC"], - links: %{"GitHub" => "https://github.com/lexmag/simetric"}] + defp deps do + [ + {:ex_doc, ">= 0.0.0", only: :dev, runtime: false}, + ] + end + + defp docs do + [ + extras: [{:"LICENSE.md", [title: "License"]}, "README.md"], + main: "readme", + source_url: @source_url, + source_ref: "#{@version}", + formatters: ["html"] + ] end end diff --git a/mix.lock b/mix.lock new file mode 100644 index 0000000..0808273 --- /dev/null +++ b/mix.lock @@ -0,0 +1,8 @@ +%{ + "earmark_parser": {:hex, :earmark_parser, "1.4.13", "0c98163e7d04a15feb62000e1a891489feb29f3d10cb57d4f845c405852bbef8", [:mix], [], "hexpm", "d602c26af3a0af43d2f2645613f65841657ad6efc9f0e361c3b6c06b578214ba"}, + "ex_doc": {:hex, :ex_doc, "0.24.2", "e4c26603830c1a2286dae45f4412a4d1980e1e89dc779fcd0181ed1d5a05c8d9", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "e134e1d9e821b8d9e4244687fb2ace58d479b67b282de5158333b0d57c6fb7da"}, + "makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.15.1", "b5888c880d17d1cc3e598f05cdb5b5a91b7b17ac4eaf5f297cb697663a1094dd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "db68c173234b07ab2a07f645a5acdc117b9f99d69ebf521821d89690ae6c6ec8"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"}, +}