Skip to content

Commit

Permalink
Release v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
slashdotdash committed May 24, 2020
1 parent a7f2d40 commit 4304a83
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: elixir

elixir:
- 1.9.0
- 1.10.3

otp_release:
- 22.0
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Changelog

## Next release
## v1.1.0

### Enhancements

- Support dynamic event stores ([#6](https://github.com/commanded/commanded-eventstore-adapter/pull/6)).
- Support Commanded v1.1.0 and EventStore v1.1.0

---

## v1.0.0

Expand Down
4 changes: 2 additions & 2 deletions guides/Dynamic Event Store.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dynamic event store

Event Store supports starting multiple instances, each with a unique name. This feature can be used to support multi-tenancy where each tenant's data is stored separately in its own Postgres schema.
EventStore supports starting multiple instances, each with a unique name. This feature can be used to support multi-tenancy where each tenant's data is stored separately in its own Postgres schema.

## Example usage

Expand Down Expand Up @@ -39,4 +39,4 @@ for tenant <- [:tenant1, :tenant2, :tenant3] do
end
```

Each started application will use their own dynamically named event store and separate Postgres schema.
Each started application will use its own dynamically named EventStore and separate Postgres schema.
10 changes: 5 additions & 5 deletions guides/Getting Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The package can be installed from hex as follows.

```elixir
def deps do
[{:commanded_eventstore_adapter, "~> 1.0.0"}]
[{:commanded_eventstore_adapter, "~> 1.1"}]
end
```

Expand Down Expand Up @@ -45,15 +45,15 @@ The package can be installed from hex as follows.
pool_size: 10
```

5. Add your event store to `config/config.exs` to make it easier to use the event store mix tasks:
5. Add your event store to `config/config.exs` to make it easier to use the EventStore mix tasks:

```elixir
# config/config.exs
config :my_app, event_stores: [MyApp.EventStore]
```

6. Create the `eventstore` database and tables using the `mix` task:
6. Create the EventStore database and tables using the `mix` task:

```console
$ mix do event_store.create, event_store.init
```shell
mix do event_store.create, event_store.init
```
14 changes: 5 additions & 9 deletions lib/commanded/event_store/adapters/event_store.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
defmodule Commanded.EventStore.Adapters.EventStore do
@moduledoc false
@moduledoc """
EventStore adapter for Commanded.
Please check the [Getting Started](getting-started.html) guide to learn more.
"""

alias Commanded.EventStore.Adapters.EventStore.Mapper

Expand Down Expand Up @@ -159,14 +163,6 @@ defmodule Commanded.EventStore.Adapters.EventStore do
inspect(application)
end

unless Code.ensure_compiled?(event_store) do
raise ArgumentError,
"event store " <>
inspect(event_store) <>
" was not compiled, " <>
"ensure it is correct and it is included as a project dependency"
end

unless implements?(event_store, EventStore) do
raise ArgumentError,
"module " <>
Expand Down
25 changes: 17 additions & 8 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Commanded.EventStore.Adapters.EventStore.Mixfile do
use Mix.Project

@version "1.0.0"
@version "1.1.0"

def project do
[
Expand All @@ -15,7 +15,8 @@ defmodule Commanded.EventStore.Adapters.EventStore.Mixfile do
package: package(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps()
deps: deps(),
aliases: aliases()
]
end

Expand All @@ -38,18 +39,24 @@ defmodule Commanded.EventStore.Adapters.EventStore.Mixfile do

defp deps do
[
{:commanded, github: "commanded/commanded"},
{:eventstore, github: "commanded/eventstore"},
{:commanded, "~> 1.1"},
{:eventstore, "~> 1.1"},

# Optional dependencies
{:jason, "~> 1.1", optional: true},
{:jason, "~> 1.2", optional: true},

# Build & test tools
{:ex_doc, ">= 0.0.0", only: :dev},
{:mox, "~> 0.5", only: :test}
]
end

defp aliases do
[
reset: ["event_store.drop", "event_store.create", "event_store.init"]
]
end

defp description do
"""
EventStore adapter for Commanded
Expand All @@ -58,12 +65,14 @@ defmodule Commanded.EventStore.Adapters.EventStore.Mixfile do

defp docs do
[
main: "getting-started",
main: "Commanded.EventStore.Adapters.EventStore",
canonical: "http://hexdocs.pm/commanded_eventstore_adapter",
source_ref: "v#{@version}",
extra_section: "GUIDES",
extras: [
{"guides/Getting Started.md", title: "EventStore adapter"},
"CHANGELOG.md"
"CHANGELOG.md",
"guides/Getting Started.md": [filename: "getting-started", title: "EventStore adapter"],
"guides/Dynamic Event Store.md": [filename: "dynamic-event-store", title: "Dynamic EventStore"],
]
]
end
Expand Down
34 changes: 18 additions & 16 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
%{
"commanded": {:git, "https://github.com/commanded/commanded.git", "3b1e8cd6c2a72aa681ec95d1390183ce8f848e88", []},
"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm"},
"db_connection": {:hex, :db_connection, "2.2.0", "e923e88887cd60f9891fd324ac5e0290954511d090553c415fbf54be4c57ee63", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm"},
"decimal": {:hex, :decimal, "1.8.1", "a4ef3f5f3428bdbc0d35374029ffcf4ede8533536fa79896dd450168d9acdf3c", [:mix], [], "hexpm"},
"earmark": {:hex, :earmark, "1.4.3", "364ca2e9710f6bff494117dbbd53880d84bebb692dafc3a78eb50aa3183f2bfd", [:mix], [], "hexpm"},
"elixir_uuid": {:hex, :elixir_uuid, "1.2.1", "dce506597acb7e6b0daeaff52ff6a9043f5919a4c3315abb4143f0b00378c097", [:mix], [], "hexpm"},
"eventstore": {:git, "https://github.com/commanded/eventstore.git", "b640066059cfee6bebcd1f7ed9e6760727bfc526", []},
"ex_doc": {:hex, :ex_doc, "0.21.2", "caca5bc28ed7b3bdc0b662f8afe2bee1eedb5c3cf7b322feeeb7c6ebbde089d6", [:mix], [{:earmark, "~> 1.3.3 or ~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
"fsm": {:hex, :fsm, "0.3.1", "087aa9b02779a84320dc7a2d8464452b5308e29877921b2bde81cdba32a12390", [:mix], [], "hexpm"},
"gen_stage": {:hex, :gen_stage, "0.14.3", "d0c66f1c87faa301c1a85a809a3ee9097a4264b2edf7644bf5c123237ef732bf", [:mix], [], "hexpm"},
"jason": {:hex, :jason, "1.1.2", "b03dedea67a99223a2eaf9f1264ce37154564de899fd3d8b9a21b1a6fd64afe7", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"},
"makeup": {:hex, :makeup, "1.0.0", "671df94cf5a594b739ce03b0d0316aa64312cee2574b6a44becb83cd90fb05dc", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"},
"makeup_elixir": {:hex, :makeup_elixir, "0.14.0", "cf8b7c66ad1cff4c14679698d532f0b5d45a3968ffbcbfd590339cb57742f1ae", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm"},
"mox": {:hex, :mox, "0.5.1", "f86bb36026aac1e6f924a4b6d024b05e9adbed5c63e8daa069bd66fb3292165b", [:mix], [], "hexpm"},
"nimble_parsec": {:hex, :nimble_parsec, "0.5.3", "def21c10a9ed70ce22754fdeea0810dafd53c2db3219a0cd54cf5526377af1c6", [:mix], [], "hexpm"},
"postgrex": {:hex, :postgrex, "0.15.3", "5806baa8a19a68c4d07c7a624ccdb9b57e89cbc573f1b98099e3741214746ae4", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"},
"backoff": {:hex, :backoff, "1.1.6", "83b72ed2108ba1ee8f7d1c22e0b4a00cfe3593a67dbc792799e8cce9f42f796b", [:rebar3], [], "hexpm", "cf0cfff8995fb20562f822e5cc47d8ccf664c5ecdc26a684cbe85c225f9d7c39"},
"commanded": {:hex, :commanded, "1.1.0", "356ad258f844966894fc6dbeb9ac154cbf1791286742f1c170dc8cb7159220a5", [:mix], [{:backoff, "~> 1.1", [hex: :backoff, repo: "hexpm", optional: false]}, {:elixir_uuid, "~> 1.2", [hex: :elixir_uuid, repo: "hexpm", optional: false]}, {:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: true]}], "hexpm", "014e7fe8d0ecebb2d034bd81cd9e52d6eac0510dd78151ab386dadd1ebbf343e"},
"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm", "4a0850c9be22a43af9920a71ab17c051f5f7d45c209e40269a1938832510e4d9"},
"db_connection": {:hex, :db_connection, "2.2.2", "3bbca41b199e1598245b716248964926303b5d4609ff065125ce98bcd368939e", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "642af240d8a8affb93b4ba5a6fcd2bbcbdc327e1a524b825d383711536f8070c"},
"decimal": {:hex, :decimal, "1.8.1", "a4ef3f5f3428bdbc0d35374029ffcf4ede8533536fa79896dd450168d9acdf3c", [:mix], [], "hexpm", "3cb154b00225ac687f6cbd4acc4b7960027c757a5152b369923ead9ddbca7aec"},
"earmark": {:hex, :earmark, "1.4.4", "4821b8d05cda507189d51f2caeef370cf1e18ca5d7dfb7d31e9cafe6688106a4", [:mix], [], "hexpm", "1f93aba7340574847c0f609da787f0d79efcab51b044bb6e242cae5aca9d264d"},
"elixir_uuid": {:hex, :elixir_uuid, "1.2.1", "dce506597acb7e6b0daeaff52ff6a9043f5919a4c3315abb4143f0b00378c097", [:mix], [], "hexpm", "f7eba2ea6c3555cea09706492716b0d87397b88946e6380898c2889d68585752"},
"eventstore": {:hex, :eventstore, "1.1.0", "1f5f20feb343c78cf8a38e8d288f6c7a860056c341dbe1520e6faa728c5e633f", [:mix], [{:elixir_uuid, "~> 1.2", [hex: :elixir_uuid, repo: "hexpm", optional: false]}, {:fsm, "~> 0.3", [hex: :fsm, repo: "hexpm", optional: false]}, {:gen_stage, "~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}, {:highlander, "~> 0.2", [hex: :highlander, repo: "hexpm", optional: false]}, {:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15", [hex: :postgrex, repo: "hexpm", optional: false]}], "hexpm", "0b61fa4972a1521efa9027c3fd3955afac2df396783357ab2295c9d424124046"},
"ex_doc": {:hex, :ex_doc, "0.22.1", "9bb6d51508778193a4ea90fa16eac47f8b67934f33f8271d5e1edec2dc0eee4c", [:mix], [{:earmark, "~> 1.4.0", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "d957de1b75cb9f78d3ee17820733dc4460114d8b1e11f7ee4fd6546e69b1db60"},
"fsm": {:hex, :fsm, "0.3.1", "087aa9b02779a84320dc7a2d8464452b5308e29877921b2bde81cdba32a12390", [:mix], [], "hexpm", "fbf0d53f89e9082b326b0b5828b94b4c549ff9d1452bbfd00b4d1ac082208e96"},
"gen_stage": {:hex, :gen_stage, "1.0.0", "51c8ae56ff54f9a2a604ca583798c210ad245f415115453b773b621c49776df5", [:mix], [], "hexpm", "1d9fc978db5305ac54e6f5fec7adf80cd893b1000cf78271564c516aa2af7706"},
"highlander": {:hex, :highlander, "0.2.0", "216b5cd86caef45fe219462e8906ad3e23d47d517d213777f17c3425ce2e4e4b", [:mix], [], "hexpm", "343f0588f5bf5afa492e94f0017284bdad8b0066634f2a50b5f0c222f0404820"},
"jason": {:hex, :jason, "1.2.1", "12b22825e22f468c02eb3e4b9985f3d0cb8dc40b9bd704730efa11abd2708c44", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "b659b8571deedf60f79c5a608e15414085fa141344e2716fbd6988a084b5f993"},
"makeup": {:hex, :makeup, "1.0.1", "82f332e461dc6c79dbd82fbe2a9c10d48ed07146f0a478286e590c83c52010b5", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "49736fe5b66a08d8575bf5321d716bac5da20c8e6b97714fec2bcd6febcfa1f8"},
"makeup_elixir": {:hex, :makeup_elixir, "0.14.0", "cf8b7c66ad1cff4c14679698d532f0b5d45a3968ffbcbfd590339cb57742f1ae", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "d4b316c7222a85bbaa2fd7c6e90e37e953257ad196dc229505137c5e505e9eff"},
"mox": {:hex, :mox, "0.5.2", "55a0a5ba9ccc671518d068c8dddd20eeb436909ea79d1799e2209df7eaa98b6c", [:mix], [], "hexpm", "df4310628cd628ee181df93f50ddfd07be3e5ecc30232d3b6aadf30bdfe6092b"},
"nimble_parsec": {:hex, :nimble_parsec, "0.5.3", "def21c10a9ed70ce22754fdeea0810dafd53c2db3219a0cd54cf5526377af1c6", [:mix], [], "hexpm", "589b5af56f4afca65217a1f3eb3fee7e79b09c40c742fddc1c312b3ac0b3399f"},
"postgrex": {:hex, :postgrex, "0.15.4", "5d691c25fc79070705a2ff0e35ce0822b86a0ee3c6fdb7a4fb354623955e1aed", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "306515b9d975fcb2478dc337a1d27dc3bf8af7cd71017c333fe9db3a3d211b0a"},
}

0 comments on commit 4304a83

Please sign in to comment.