urabbit 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/urabbit/publisher.rb +4 -4
- data/lib/urabbit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66bbfc244a424c0713452bb7834184d9aa805a5b
|
4
|
+
data.tar.gz: d4de8c0ba2df6fa6cf95395d08612b72a801f421
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ae96242e8595c8509202adda805417d2017620a11ddfa45d9b69974e300dc0f0b34db4b6d269c4d98288218e82b0150b421a491ee47143b0b3a8ef18e53cef9
|
7
|
+
data.tar.gz: 152c2a25a6e6d8d26993232ad7dac51e2a36b771b1469f8b4853c4de18054f9a03b52c823cbe0cc8601515f991c2b0aaa9434340fbddf469c68b37d16c7c1078
|
data/lib/urabbit/publisher.rb
CHANGED
@@ -16,9 +16,9 @@ class Urabbit::Publisher
|
|
16
16
|
def initialize(opts)
|
17
17
|
exchange_type = opts[:exchange_type] || :topic
|
18
18
|
exchange_name = opts[:exchange_name] ||
|
19
|
-
raise(Error.new("Please provide an 'exchange_name'"))
|
19
|
+
raise(Urabbit::Error.new("Please provide an 'exchange_name'"))
|
20
20
|
@routing_key = opts[:routing_key] ||
|
21
|
-
raise(Error.new("Please provide a 'routing_key'"))
|
21
|
+
raise(Urabbit::Error.new("Please provide a 'routing_key'"))
|
22
22
|
|
23
23
|
@channel = Urabbit.create_channel
|
24
24
|
@exchange = Bunny::Exchange.new(
|
@@ -28,12 +28,12 @@ class Urabbit::Publisher
|
|
28
28
|
durable: true
|
29
29
|
)
|
30
30
|
rescue Bunny::Exception
|
31
|
-
raise Error.new("Error connecting to queue")
|
31
|
+
raise Urabbit::Error.new("Error connecting to queue")
|
32
32
|
end
|
33
33
|
|
34
34
|
def publish(message)
|
35
35
|
@exchange.publish(message, routing_key: @routing_key)
|
36
36
|
rescue Bunny::Exception
|
37
|
-
raise Error.new("Error communicating with queue")
|
37
|
+
raise Urabbit::Error.new("Error communicating with queue")
|
38
38
|
end
|
39
39
|
end
|
data/lib/urabbit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urabbit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacek Becela
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|