Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Release preparation (#117)
Browse files Browse the repository at this point in the history
* Format code
* Bump version to 2.2.0
* Update docs
  • Loading branch information
mkorszun authored Oct 14, 2019
1 parent 069a1cd commit fc1b6db
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The project currently provides the following functionality:

~~~elixir
def deps do
[{:gen_rmq, "~> 2.1.0"}]
[{:gen_rmq, "~> 2.2.0"}]
end
~~~

Expand Down
2 changes: 1 addition & 1 deletion lib/publisher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ defmodule GenRMQ.Publisher do
### Optional:
`app_id` - publishing application ID
`app_id` - publishing application ID. By default it is `:gen_rmq`.
`enable_confirmations` - activates publishing confirmations on the channel. Confirmations are disabled by default.
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule GenRMQ.Mixfile do
use Mix.Project

@version "2.1.0"
@version "2.2.0"

def project do
[
Expand Down
30 changes: 16 additions & 14 deletions test/gen_rmq_publisher_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,15 @@ defmodule GenRMQ.PublisherTest do
test "should override standard metadata fields from headers", %{publisher: publisher_pid} = context do
message = %{"msg" => "msg"}

:ok = GenRMQ.Publisher.publish(
publisher_pid,
Jason.encode!(message),
"some.routing.key",
message_id: "message_id_1",
correlation_id: "correlation_id_1",
header1: "value"
)
:ok =
GenRMQ.Publisher.publish(
publisher_pid,
Jason.encode!(message),
"some.routing.key",
message_id: "message_id_1",
correlation_id: "correlation_id_1",
header1: "value"
)

Assert.repeatedly(fn -> assert out_queue_count(context) >= 1 end)
{:ok, received_message, meta} = get_message_from_queue(context)
Expand All @@ -103,12 +104,13 @@ defmodule GenRMQ.PublisherTest do
test "should publish a message with priority", %{publisher: publisher_pid} = context do
message = %{"msg" => "with prio"}

:ok = GenRMQ.Publisher.publish(
publisher_pid,
Jason.encode!(message),
"some.routing.key",
priority: 100
)
:ok =
GenRMQ.Publisher.publish(
publisher_pid,
Jason.encode!(message),
"some.routing.key",
priority: 100
)

Assert.repeatedly(fn -> assert out_queue_count(context) >= 1 end)
{:ok, received_message, meta} = get_message_from_queue(context)
Expand Down

0 comments on commit fc1b6db

Please sign in to comment.