lapine 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lapine/connection.rb +4 -3
- data/lib/lapine/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: f7e95ed028d5cbadaf4b7fdd8ad5e23999e90abe
|
4
|
+
data.tar.gz: 94963d6e447234a9f769fb5777e0a2dd123ff474
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e69fdf1807c1fd4b22086daf824762c85941b95083c3c05ccbd733a6cf3ed6c73a3ea0da9abac202d1e921d2461752a467ebfab3483dd5c61b5afa8d552149d
|
7
|
+
data.tar.gz: ed3c4fdd7cf66dbc480c2e6c530bda3e12f852ece1ffedca48f75c7a68ff63105511e25f0d555803e3c8a0d3bf42dc0d543d7252c9bc153717bbf097275497ea
|
data/lib/lapine/connection.rb
CHANGED
@@ -2,11 +2,13 @@ require 'bunny'
|
|
2
2
|
|
3
3
|
module Lapine
|
4
4
|
class Connection
|
5
|
-
attr_reader :conn, :name, :props
|
5
|
+
attr_reader :conn, :name, :props, :connection_name, :exchange_type
|
6
6
|
|
7
7
|
def initialize(name, properties)
|
8
8
|
@name = name
|
9
9
|
@props = properties.dup
|
10
|
+
@connection_name = props.delete(:connection)
|
11
|
+
@exchange_type = props.delete(:type)
|
10
12
|
end
|
11
13
|
|
12
14
|
def exchange
|
@@ -15,11 +17,10 @@ module Lapine
|
|
15
17
|
end
|
16
18
|
|
17
19
|
def reconnect
|
18
|
-
connection_props = Lapine.config.connection_properties[
|
20
|
+
connection_props = Lapine.config.connection_properties[connection_name]
|
19
21
|
@conn = Bunny.new(connection_props)
|
20
22
|
conn.start
|
21
23
|
channel = conn.create_channel
|
22
|
-
exchange_type = props.delete(:type)
|
23
24
|
@exchange = Bunny::Exchange.new(channel, exchange_type, name, props)
|
24
25
|
end
|
25
26
|
end
|
data/lib/lapine/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lapine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Saxby
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-11-
|
12
|
+
date: 2014-11-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bunny
|