Current section

48 Versions

Jump to

Compare versions

4 files changed
+13 additions
-10 deletions
  @@ -24,4 +24,4 @@
24 24 {<<"optional">>,false},
25 25 {<<"repository">>,<<"hexpm">>},
26 26 {<<"requirement">>,<<"~> 1.1.1">>}]]}.
27 - {<<"version">>,<<"4.0.0">>}.
27 + {<<"version">>,<<"4.0.1">>}.
  @@ -35,10 +35,12 @@ defmodule Amqpx.Consumer do
35 35 def init(opts) do
36 36 state = struct(__MODULE__, opts)
37 37
38 - with :ok <- Process.send(self(), :setup, []) do
39 - {:ok, state}
40 - else
41 - _ -> {:stop, "ERROR"}
38 + case Process.send(self(), :setup, []) do
39 + :ok ->
40 + {:ok, state}
41 +
42 + _ ->
43 + {:stop, "ERROR"}
42 44 end
43 45 end
  @@ -35,9 +35,10 @@ defmodule Amqpx.Producer do
35 35
36 36 @spec publish(String.t(), String.t(), String.t(), Keyword.t()) :: :ok | :error
37 37 def publish(name, routing_key, payload, options \\ []) do
38 - with :ok <- GenServer.call(__MODULE__, {:publish, {name, routing_key, payload, options}}) do
39 - :ok
40 - else
38 + case GenServer.call(__MODULE__, {:publish, {name, routing_key, payload, options}}) do
39 + :ok ->
40 + :ok
41 +
41 42 reason ->
42 43 Logger.error("Error during publish: #{inspect(reason)}")
43 44 :error
  @@ -5,7 +5,7 @@ defmodule Amqpx.MixProject do
5 5 [
6 6 app: :amqpx,
7 7 name: "amqpx",
8 - version: "4.0.0",
8 + version: "4.0.1",
9 9 elixir: "~> 1.8",
10 10 elixirc_paths: elixirc_paths(Mix.env()),
11 11 start_permanent: Mix.env() == :production,
  @@ -53,7 +53,7 @@ defmodule Amqpx.MixProject do
53 53 {:elixir_uuid, "~> 1.1"},
54 54 {:prima_logger_logstash_backend, "~> 1.1.1"},
55 55 {:credo, "~> 1.0", only: [:dev, :test]},
56 - {:dialyxir, "1.0.0-rc.4", only: [:dev, :test], runtime: false},
56 + {:dialyxir, "1.0.0-rc.6", only: [:dev, :test], runtime: false},
57 57 {:ex_doc, ">= 0.0.0", only: :dev},
58 58 {:mock, "~> 0.3.0", only: :test}
59 59 ]