diff --git a/.gitignore b/.gitignore index 69d2f68..f972b5c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,6 @@ erl_crash.dump # Ignore package tarball (built via "mix hex.build"). ecto_diff-*.tar -# ignore local plts +# Ignore local plts. /priv/plts/*.plt /priv/plts/*.plt.hash diff --git a/LICENSE.md b/LICENSE.md index f1e8d16..48d1dbc 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ -The MIT License (MIT) +# The MIT License (MIT) -Copyright 2019 Peek Travel, Inc. +Copyright (c) 2019 Peek Travel, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index 6f71b6e..a973f42 100644 --- a/README.md +++ b/README.md @@ -2,18 +2,19 @@ [![CI Status](https://github.com/peek-travel/ecto_diff/workflows/CI/badge.svg)](https://github.com/peek-travel/ecto_diff/actions) [![codecov](https://codecov.io/gh/peek-travel/ecto_diff/branch/master/graph/badge.svg)](https://codecov.io/gh/peek-travel/ecto_diff) -[![SourceLevel](https://app.sourcelevel.io/github/peek-travel/ecto_diff.svg)](https://app.sourcelevel.io/github/peek-travel/ecto_diff) -[![Hex.pm Version](https://img.shields.io/hexpm/v/ecto_diff.svg?style=flat)](https://hex.pm/packages/ecto_diff) -[![License](https://img.shields.io/hexpm/l/ecto_diff.svg)](LICENSE.md) -[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=peek-travel/ecto_diff)](https://dependabot.com) +[![Module Version](https://img.shields.io/hexpm/v/ecto_diff.svg)](https://hex.pm/packages/ecto_diff) +[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/ecto_diff/) +[![Total Download](https://img.shields.io/hexpm/dt/ecto_diff.svg)](https://hex.pm/packages/ecto_diff) +[![License](https://img.shields.io/hexpm/l/ecto_diff.svg)](https://github.com/peek-travel/ecto_diff/blob/master/LICENSE.md) +[![Last Updated](https://img.shields.io/github/last-commit/peek-travel/ecto_diff.svg)](https://github.com/peek-travel/ecto_diff/commits/master) -Generates a data structure that describes the differences between two [ecto](https://github.com/elixir-ecto/ecto) structs. +Generates a data structure that describes the differences between two [Ecto](https://github.com/elixir-ecto/ecto) structs. The primary use-case is to track what changed after calling `Repo.insert` or `Repo.update`, especially in conjunction with complex or deeply nested `cast_assoc` associations. ## Installation -The package can be installed by adding `ecto_diff` to your list of dependencies in `mix.exs`: +The package can be installed by adding `:ecto_diff` to your list of dependencies in `mix.exs`: ```elixir def deps do @@ -134,3 +135,11 @@ iex> EctoDiff.diff(initial_pet, updated_pet) ``` Detailed documentation can be found at [https://hexdocs.pm/ecto_diff](https://hexdocs.pm/ecto_diff). + + +## Copyright and License + +Copyright (c) 2019 Peek Travel, Inc. + +This work is free. You can redistribute it and/or modify it under the +terms of the MIT License. See the [LICENSE.md](./LICENSE.md) file for more details. diff --git a/lib/ecto_diff.ex b/lib/ecto_diff.ex index b0e6571..1bdb7b3 100644 --- a/lib/ecto_diff.ex +++ b/lib/ecto_diff.ex @@ -1,6 +1,6 @@ defmodule EctoDiff do @moduledoc """ - Generates a data structure describing the difference between two ecto structs. + Generates a data structure describing the difference between two Ecto structs. For details on how to generate an `t:EctoDiff.t/0` struct, see: `diff/2`. diff --git a/mix.exs b/mix.exs index 39a334b..232a55a 100644 --- a/mix.exs +++ b/mix.exs @@ -51,10 +51,15 @@ defmodule EctoDiff.MixProject do defp docs do [ - main: "EctoDiff", + extras: [ + "CHANGELOG.md": [], + "LICENSE.md": [title: "License"], + "README.md": [title: "Overview"] + ], + main: "readme", source_ref: @version, source_url: @source_url, - extras: ["README.md", "CHANGELOG.md", "LICENSE.md"] + formatters: ["html"] ] end