Skip to content

Commit

Permalink
Prepare for hex.pm
Browse files Browse the repository at this point in the history
  • Loading branch information
pma committed Aug 19, 2014
1 parent 022c09d commit 45bcb38
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
```
18 changes: 17 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 45bcb38

Please sign in to comment.