From f953b177b73a44bf9a3ce815667b721648674895 Mon Sep 17 00:00:00 2001 From: arpunk Date: Fri, 6 Apr 2018 14:26:52 -0500 Subject: [PATCH 1/3] Bump Elixir version --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index eab37c4..48adc68 100644 --- a/mix.exs +++ b/mix.exs @@ -7,7 +7,7 @@ defmodule Chronik.Mixfile do [ app: :chronik, version: @version, - elixir: "~> 1.5", + elixir: "~> 1.6", start_permanent: Mix.env == :prod, test_coverage: [tool: ExCoveralls], preferred_cli_env: [coveralls: :test], From 6b04ca52bcba967f63e8633a6b359d0256cbda39 Mon Sep 17 00:00:00 2001 From: arpunk Date: Fri, 6 Apr 2018 14:27:16 -0500 Subject: [PATCH 2/3] Update to use new Elixir child specs --- lib/chronik/aggregate/supervisor.ex | 6 +++--- lib/chronik/application.ex | 4 ++-- lib/chronik/pub_sub/adapters/registry.ex | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/chronik/aggregate/supervisor.ex b/lib/chronik/aggregate/supervisor.ex index 02ecfaf..e984b99 100644 --- a/lib/chronik/aggregate/supervisor.ex +++ b/lib/chronik/aggregate/supervisor.ex @@ -1,7 +1,7 @@ defmodule Chronik.Aggregate.Supervisor do @moduledoc false - use Supervisor + use Supervisor, start: {__MODULE__, :start_link, []} @name __MODULE__ @@ -13,13 +13,13 @@ defmodule Chronik.Aggregate.Supervisor do Supervisor.start_child(__MODULE__, [aggregate, id]) end - def start_link(_opts) do + def start_link do Supervisor.start_link(__MODULE__, [], name: @name) end # Supervisor callbacks - def init(_opts) do + def init([]) do child = worker(Chronik.Aggregate, [], restart: :transient) supervise([child], strategy: :simple_one_for_one) end diff --git a/lib/chronik/application.ex b/lib/chronik/application.ex index 71b134c..e505a2d 100644 --- a/lib/chronik/application.ex +++ b/lib/chronik/application.ex @@ -3,12 +3,12 @@ defmodule Chronik.Application do use Application - @aggregates Chronik.AggregateRegistry + @aggregates Chronik.AggregateRegistry def start(_type, _args) do children = [ spec([keys: :unique, name: @aggregates], @aggregates), - {Chronik.Aggregate.Supervisor, []}, + Chronik.Aggregate.Supervisor, ] opts = [strategy: :one_for_one, name: Chronik.Supervisor] diff --git a/lib/chronik/pub_sub/adapters/registry.ex b/lib/chronik/pub_sub/adapters/registry.ex index 01f410d..5b78202 100644 --- a/lib/chronik/pub_sub/adapters/registry.ex +++ b/lib/chronik/pub_sub/adapters/registry.ex @@ -17,7 +17,7 @@ defmodule Chronik.PubSub.Adapters.Registry do end def start_link(_opts) do - Registry.start_link([keys: :duplicate, name: __MODULE__]) + Registry.start_link([keys: :duplicate, name: @name]) end @spec subscribe(opts :: Keyword.t) :: :ok From 0bcac705f78877e1d522fb991d4abaff39555c73 Mon Sep 17 00:00:00 2001 From: arpunk Date: Fri, 6 Apr 2018 14:32:45 -0500 Subject: [PATCH 3/3] Update TravisCI config --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 79cafac..a0d192c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: elixir sudo: false -elixir: 1.5.1 +elixir: 1.6.4 os: linux otp_release: 20.0 matrix: