Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HashDict deprecations for Map (elixir 1.4) #241

Merged
merged 2 commits into from
Jan 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/lib/bamboo/adapters/mandrill_adapter_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ defmodule Bamboo.MandrillAdapterTest do
plug :dispatch

def start_server(parent) do
Agent.start_link(fn -> HashDict.new end, name: __MODULE__)
Agent.update(__MODULE__, &HashDict.put(&1, :parent, parent))
Agent.start_link(fn -> Map.new end, name: __MODULE__)
Agent.update(__MODULE__, &Map.put(&1, :parent, parent))
port = get_free_port()
Application.put_env(:bamboo, :mandrill_base_uri, "http://localhost:#{port}")
Plug.Adapters.Cowboy.http __MODULE__, [], port: port, ref: __MODULE__
Expand Down Expand Up @@ -51,7 +51,7 @@ defmodule Bamboo.MandrillAdapterTest do
end

defp send_to_parent(conn) do
parent = Agent.get(__MODULE__, fn(set) -> HashDict.get(set, :parent) end)
parent = Agent.get(__MODULE__, fn(set) -> Map.get(set, :parent) end)
send parent, {:fake_mandrill, conn}
conn
end
Expand Down
6 changes: 3 additions & 3 deletions test/lib/bamboo/adapters/sendgrid_adapter_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ defmodule Bamboo.SendgridAdapterTest do
plug :dispatch

def start_server(parent) do
Agent.start_link(fn -> HashDict.new end, name: __MODULE__)
Agent.update(__MODULE__, &HashDict.put(&1, :parent, parent))
Agent.start_link(fn -> Map.new end, name: __MODULE__)
Agent.update(__MODULE__, &Map.put(&1, :parent, parent))
port = get_free_port()
Application.put_env(:bamboo, :sendgrid_base_uri, "http://localhost:#{port}")
Plug.Adapters.Cowboy.http __MODULE__, [], port: port, ref: __MODULE__
Expand All @@ -43,7 +43,7 @@ defmodule Bamboo.SendgridAdapterTest do
end

defp send_to_parent(conn) do
parent = Agent.get(__MODULE__, fn(set) -> HashDict.get(set, :parent) end)
parent = Agent.get(__MODULE__, fn(set) -> Map.get(set, :parent) end)
send parent, {:fake_sendgrid, conn}
conn
end
Expand Down