From d722ab4b3631a32ed260ac2c0fde877669bbc64b Mon Sep 17 00:00:00 2001 From: Bogdan Rogalski Date: Wed, 28 Oct 2020 16:52:58 -0500 Subject: [PATCH 1/5] Updated how Supervisor and children are started and configured --- lib/hound/connection_server.ex | 1 + lib/hound/session_server.ex | 2 +- lib/hound/supervisor.ex | 14 +++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/hound/connection_server.ex b/lib/hound/connection_server.ex index 8d9c2ff..5db405c 100644 --- a/lib/hound/connection_server.ex +++ b/lib/hound/connection_server.ex @@ -1,5 +1,6 @@ defmodule Hound.ConnectionServer do @moduledoc false + use Agent def start_link(options \\ []) do driver = options[:driver] || Application.get_env(:hound, :driver, "selenium") diff --git a/lib/hound/session_server.ex b/lib/hound/session_server.ex index c8de347..1bf6e42 100644 --- a/lib/hound/session_server.ex +++ b/lib/hound/session_server.ex @@ -4,7 +4,7 @@ defmodule Hound.SessionServer do use GenServer @name __MODULE__ - def start_link do + def start_link(_options) do GenServer.start_link(__MODULE__, %{}, name: @name) end diff --git a/lib/hound/supervisor.ex b/lib/hound/supervisor.ex index 0ba3ca3..9927847 100644 --- a/lib/hound/supervisor.ex +++ b/lib/hound/supervisor.ex @@ -4,18 +4,18 @@ defmodule Hound.Supervisor do use Supervisor def start_link(options \\ []) do - :supervisor.start_link(__MODULE__, [options]) + Supervisor.start_link(__MODULE__, options, name: __MODULE__) end - - def init([options]) do + @impl true + def init(options) do children = [ - worker(Hound.ConnectionServer, [options]), - worker(Hound.SessionServer, []) + {Hound.ConnectionServer, options}, + Hound.SessionServer ] - # See http://elixir-lang.org/docs/stable/Supervisor.Behaviour.html + # See https://hexdocs.pm/elixir/master/Supervisor.html#content # for other strategies and supported options - supervise(children, strategy: :one_for_one) + Supervisor.init(children, strategy: :one_for_one) end end From f368cb113be8dd2448d3efaf2e831b6a1eb7cc81 Mon Sep 17 00:00:00 2001 From: Bogdan Rogalski Date: Wed, 28 Oct 2020 17:12:28 -0500 Subject: [PATCH 2/5] Bump Elixir version to >= 1.5.0 --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index 4831a49..d5590b6 100644 --- a/mix.exs +++ b/mix.exs @@ -6,7 +6,7 @@ defmodule Hound.Mixfile do def project do [ app: :hound, version: @version, - elixir: ">= 1.4.0", + elixir: ">= 1.5.0", description: "Webdriver library for integration testing and browser automation", source_url: "https://github.com/HashNuke/hound", deps: deps(), From fde095985c8af0801a3fe0c253966845619e9139 Mon Sep 17 00:00:00 2001 From: Bogdan Rogalski Date: Sat, 23 Jan 2021 11:01:23 -0600 Subject: [PATCH 3/5] Remove Elixir 1.4 from Travis config --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f1b202b..66eae6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: elixir elixir: - - 1.4 - 1.5 - 1.6 - 1.7 From 37e1aab8a4d99944068e02fa98e3de6ba3dac1c6 Mon Sep 17 00:00:00 2001 From: Bogdan Rogalski Date: Sun, 31 Jan 2021 18:03:17 -0600 Subject: [PATCH 4/5] Removed 1.4 version from exclude matrix --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 66eae6d..e733647 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,6 @@ matrix: otp_release: 19.3 - elixir: 1.8 otp_release: 19.3 - - elixir: 1.4 - otp_release: 21 - elixir: 1.5 otp_release: 21 - elixir: 1.6 From df416ab79badbdee54abd3e6a9f4e989c207e83c Mon Sep 17 00:00:00 2001 From: Bogdan Rogalski Date: Sun, 31 Jan 2021 21:13:00 -0600 Subject: [PATCH 5/5] Include minor version in OTP 21 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e733647..5f2b450 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,9 +20,9 @@ matrix: - elixir: 1.8 otp_release: 19.3 - elixir: 1.5 - otp_release: 21 + otp_release: 21.0 - elixir: 1.6 - otp_release: 21 + otp_release: 21.0 before_script: - "export DISPLAY=:99.0"