Skip to content

Commit

Permalink
Move list wrapper to child_spec declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadyan committed Mar 10, 2020
1 parent 5acdbe9 commit 223078d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/concentrate/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule Concentrate.Supervisor do
%{
type: :supervisor,
id: __MODULE__,
start: {__MODULE__, :start_link, opts}
start: {__MODULE__, :start_link, [opts]}
}
end
end
12 changes: 5 additions & 7 deletions lib/realtime/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ defmodule Realtime.Supervisor do
{Realtime.DataStatusPubSub, name: Realtime.DataStatusPubSub.default_name()},
{Concentrate.Supervisor,
[
[
busloc_url: Application.get_env(:skate, :busloc_url),
swiftly_authorization_key: Application.get_env(:skate, :swiftly_authorization_key),
swiftly_realtime_vehicles_url:
Application.get_env(:skate, :swiftly_realtime_vehicles_url),
trip_updates_url: Application.get_env(:skate, :trip_updates_url)
]
busloc_url: Application.get_env(:skate, :busloc_url),
swiftly_authorization_key: Application.get_env(:skate, :swiftly_authorization_key),
swiftly_realtime_vehicles_url:
Application.get_env(:skate, :swiftly_realtime_vehicles_url),
trip_updates_url: Application.get_env(:skate, :trip_updates_url)
]}
]

Expand Down
2 changes: 1 addition & 1 deletion test/concentrate/supervisor_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule Concentrate.SupervisorTest do
test "defines a supervisor spec, passing along the given opts" do
assert %{
type: :supervisor,
start: {Concentrate.Supervisor, :start_link, @opts}
start: {Concentrate.Supervisor, :start_link, [@opts]}
} = Concentrate.Supervisor.child_spec(@opts)
end
end
Expand Down

0 comments on commit 223078d

Please sign in to comment.