diff --git a/CHANGELOG.md b/CHANGELOG.md index 25e3ff5..741829b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,17 @@ # Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## v1.2.1 - 2020-12-03 +## 1.2.1 - Allow exceptions to be rescued by Commanded's event handler ([#37](https://github.com/commanded/commanded-ecto-projections/pull/37)). -## v1.2.0 - 2020-08-18 +## 1.2.0 - Support runtime projector names ([#32](https://github.com/commanded/commanded-ecto-projections/pull/32)). - Support `schema_prefix/2` function ([#33](https://github.com/commanded/commanded-ecto-projections/pull/33)). --- -## v1.1.0 - 2020-05-25 +## 1.1.0 ### Enhancements @@ -25,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- -## v1.0.0 - 2019-11-21 +## 1.0.0 ### Enhancements @@ -35,7 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- -## v0.8.0 - 2019-01-23 +## 0.8.0 ### Enhancements @@ -62,13 +57,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- -## v0.7.1 - 2018-07-24 +## 0.7.1 ### Bug fixes - Ensure errors encountered while building the `Ecto.Multi` data structure within a `project` function are caught and passed to the `error/3` callback. -## v0.7.0 - 2018-07-22 +## 0.7.0 ### Enhancements @@ -76,7 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- -## v0.6.0 - 2017-09-29 +## 0.6.0 ### Enhancements @@ -85,7 +80,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- -## v0.5.0 - 2017-09-15 +## 0.5.0 ### Enhancements @@ -93,7 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- -## v0.4.0 - 2017-08-03 +## 0.4.0 ### Enhancements diff --git a/README.md b/README.md index eb199dd..1d12f1e 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,24 @@ # Commanded Ecto Projections -[![Build Status](https://travis-ci.com/commanded/commanded-ecto-projections.svg?branch=master)](https://travis-ci.com/commanded/commanded-ecto-projections) -[![Module Version](https://img.shields.io/hexpm/v/commanded_ecto_projections.svg)](https://hex.pm/packages/commanded_ecto_projections) -[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/commanded_ecto_projections/) -[![Total Download](https://img.shields.io/hexpm/dt/commanded_ecto_projections.svg)](https://hex.pm/packages/commanded_ecto_projections) -[![License](https://img.shields.io/hexpm/l/commanded_ecto_projections.svg)](https://github.com/commanded/commanded-ecto-projections/blob/master/LICENSE) -[![Last Updated](https://img.shields.io/github/last-commit/commanded/commanded-ecto-projections.svg)](https://github.com/commanded/commanded-ecto-projections/commits/master) - -> This README and the following guides follow the `master` branch which may not be the currently published version. - -Model projections for [Commanded](https://github.com/commanded/commanded) CQRS/ES applications using [Ecto](https://github.com/elixir-ecto/ecto) for persistence. +Read model projections for [Commanded](https://github.com/commanded/commanded) CQRS/ES applications using [Ecto](https://github.com/elixir-ecto/ecto) for persistence. Read the [Changelog](CHANGELOG.md) for recent changes and the [Hex Docs](https://hexdocs.pm/commanded_ecto_projections/) on API usage. +> This README and the following guides follow the `master` branch which may not be the currently published version. + ### Overview -- [Getting started](guides/getting_started.md) -- [Usage](guides/usage.md) - - [Creating a read model](guides/usage.md#creating-a-read-model) - - [Creating a projector](guides/usage.md#creating-a-projector) - - [Supervision](guides/usage.md#supervision) - - [Error handling](guides/usage.md#error-handling) - - [`error/3` callback](guides/usage.md#error3-callback) - - [Error handling example](guides/usage.md#error-handling-example) - - [`after_update/3` callback](guides/usage.md#after_update3-callback) - - [Schema prefix](guides/usage.md#schema-prefix) - - [Rebuilding a projection](guides/usage.md#rebuilding-a-projection) +- [Getting started](guides/Getting%20Started.md) +- [Usage](guides/Usage.md) + - [Creating a read model](guides/Usage.md#creating-a-read-model) + - [Creating a projector](guides/Usage.md#creating-a-projector) + - [Supervision](guides/Usage.md#supervision) + - [Error handling](guides/Usage.md#error-handling) + - [`error/3` callback](guides/Usage.md#error3-callback) + - [Error handling example](guides/Usage.md#error-handling-example) + - [`after_update/3` callback](guides/Usage.md#after_update3-callback) + - [Schema prefix](guides/Usage.md#schema-prefix) + - [Rebuilding a projection](guides/Usage.md#rebuilding-a-projection) ### Example projector @@ -77,5 +70,4 @@ For commercial support, and consultancy, please contact [Ben Smith](mailto:ben@1 Copyright (c) 2017 Ben Smith -This library is released under the MIT License. See the [LICENSE.md](./LICENSE.md) file -for further details. +This library is released under the MIT License. See the [LICENSE.md](./LICENSE.md) file for further details. diff --git a/guides/getting_started.md b/guides/Getting Started.md similarity index 71% rename from guides/getting_started.md rename to guides/Getting Started.md index ae18f6f..6d35dfb 100644 --- a/guides/getting_started.md +++ b/guides/Getting Started.md @@ -2,7 +2,7 @@ You should already have [Ecto](https://github.com/elixir-ecto/ecto) installed and configured before proceeding. Please follow Ecto's [Getting Started](https://hexdocs.pm/ecto/getting-started.html) guide to get going first. -1. Add `:commanded_ecto_projections` to your list of dependencies in `mix.exs`: +1. Add `:commanded_ecto_projections` to your list of dependencies in `mix.exs`: ```elixir def deps do @@ -12,14 +12,13 @@ You should already have [Ecto](https://github.com/elixir-ecto/ecto) installed an end ``` -2. Generate an Ecto migration in your app: +2. Generate an Ecto migration in your app: ```console $ mix ecto.gen.migration create_projection_versions ``` -3. Modify the generated migration, in `priv/repo/migrations`, to create the - `projection_versions` table: +3. Modify the generated migration, in `priv/repo/migrations`, to create the `projection_versions` table: ```elixir defmodule CreateProjectionVersions do @@ -36,13 +35,13 @@ You should already have [Ecto](https://github.com/elixir-ecto/ecto) installed an end ``` -5. Run the Ecto migration: +5. Run the Ecto migration: ```console $ mix ecto.migrate ``` -6. Define your first read model projector: +6. Define your first read model projector: ```elixir defmodule MyApp.ExampleProjector do @@ -53,5 +52,4 @@ You should already have [Ecto](https://github.com/elixir-ecto/ecto) installed an end ``` -Refer to the [Usage guide](./guides/usage.md) for more detail on how to -configure and use a read model projector. +Refer to the Usage guide for more detail on how to configure and use a read model projector. diff --git a/guides/usage.md b/guides/Usage.md similarity index 100% rename from guides/usage.md rename to guides/Usage.md diff --git a/mix.exs b/mix.exs index 652a03d..c53a916 100644 --- a/mix.exs +++ b/mix.exs @@ -66,15 +66,16 @@ defmodule Commanded.Projections.Ecto.Mixfile do extra_section: "GUIDES", extras: [ "CHANGELOG.md", - {:"LICENSE.md", [title: "License"]}, - {:"README.md", [title: "Overview"]}, - "guides/getting_started.md", - "guides/usage.md" + "guides/Getting Started.md", + "guides/Usage.md" ], groups_for_extras: [ - Introduction: Path.wildcard("guides/*.md") + Introduction: [ + "guides/Getting Started.md", + "guides/Usage.md" + ] ], - main: "readme", + main: "Commanded.Projections.Ecto", canonical: "http://hexdocs.pm/commanded_ecto_projections", source_url: @source_url, source_ref: "v#{@version}",