diff --git a/README.md b/README.md index abbd916..f8f3016 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add AMQP as a dependency in your `mix.exs` file. ```elixir def deps do - [ { :amqp, github: "pma/amqp" } ] + [{:amqp, "0.0.3"}] end ``` @@ -75,12 +75,8 @@ defmodule Consumer do {:ok, chan} end - def handle_info(info, chan) do - case info do - {payload, %{delivery_tag: tag, redelivered: redelivered}} -> - spawn fn -> consume(chan, tag, redelivered, payload) end - _ -> nil - end + def handle_info({payload, %{delivery_tag: tag, redelivered: redelivered}}, chan) do + spawn fn -> consume(chan, tag, redelivered, payload) end {:noreply, chan} end @@ -123,5 +119,5 @@ iex> AMQP.Basic.publish chan, "gen_server_test_exchange", "", "42" iex> AMQP.Basic.publish chan, "gen_server_test_exchange", "", "Hello, World!" :ok Error converting Hello, World! to integer -Error converting Hello, World! to intege +Error converting Hello, World! to integer ``` diff --git a/mix.exs b/mix.exs index 26ccbe6..445a7a4 100644 --- a/mix.exs +++ b/mix.exs @@ -5,7 +5,10 @@ defmodule Amqp.Mixfile do [app: :amqp, version: "0.0.3", elixir: "~> 0.14.3 or ~> 0.15.0", - deps: deps] + description: description, + package: package, + deps: deps, + docs: [readme: true, main: "README"]] end def application do @@ -17,4 +20,17 @@ defmodule Amqp.Mixfile do {:ex_doc, "~> 0.5", only: :docs}, {:amqp_client, "~> 3.0"}] end + + defp description do + """ + Idiomatic Elixir client for RabbitMQ. + """ + end + + defp package do + [files: ["lib", "mix.exs", "README.md", "LICENSE"], + contributors: ["Paulo Almeida", "Eduardo Gurgel"], + licenses: ["MIT"], + links: %{"GitHub" => "https://github.com/pma/amqp"}] + end end