gorg_message_sender 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gorg_message_sender/version.rb +1 -1
- data/lib/gorg_message_sender.rb +1 -8
- 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: 1589a3a3e3e27df4069f5315c51cfcccae14630a
|
4
|
+
data.tar.gz: 42c3f6b42a6e89c1b87c2f78be0bf460adedb4c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5618c4afeb9d68019681762a649a9319b504484466ecfcaf7928d0f9828319402ee818a7547911738c6ae9dd08b282454c39e0e1473d2efa573da7262daeebac
|
7
|
+
data.tar.gz: dc611eb9a68d474eb2e75514608ec30e101e5ff55b2469e4ab890514739f23f4127cf9d1ed18b7688b0cdd62864c235168025681fb1e6e4876aef8434a1ed090
|
data/lib/gorg_message_sender.rb
CHANGED
@@ -43,7 +43,6 @@ class GorgMessageSender
|
|
43
43
|
msg=message(data,routing_key,opts)
|
44
44
|
@x.publish(msg, p_opts)
|
45
45
|
puts " [#] Message sent to exchange '#{@r_exchange}' (#{@r_durable ? "" : "not "}durable) with routing key '#{routing_key}'" if opts[:verbose]
|
46
|
-
self.stop(verbose: opts[:verbose])
|
47
46
|
msg
|
48
47
|
end
|
49
48
|
|
@@ -53,7 +52,6 @@ class GorgMessageSender
|
|
53
52
|
p_opts[:routing_key]= routing_key if routing_key
|
54
53
|
@x.publish(msg, p_opts)
|
55
54
|
puts " [#] Message sent to exchange '#{@r_exchange}' (#{@r_durable ? "" : "not "}durable) with routing key '#{routing_key}'" if opts[:verbose]
|
56
|
-
self.stop(verbose: opts[:verbose])
|
57
55
|
msg
|
58
56
|
end
|
59
57
|
|
@@ -67,7 +65,7 @@ class GorgMessageSender
|
|
67
65
|
:pass => @r_pass,
|
68
66
|
:vhost => @r_vhost
|
69
67
|
)
|
70
|
-
@conn.start unless @
|
68
|
+
@conn.start unless @conn.connected?
|
71
69
|
@conn
|
72
70
|
end
|
73
71
|
|
@@ -79,9 +77,4 @@ class GorgMessageSender
|
|
79
77
|
@x = ch.topic(@r_exchange, :durable => @r_durable)
|
80
78
|
puts " [#] Connected as user '#{@r_user}' to #{@r_host}:#{@r_port} on vhost '#{@r_vhost}'" if opts[:verbose]
|
81
79
|
end
|
82
|
-
|
83
|
-
def stop(opts)
|
84
|
-
@conn.close
|
85
|
-
puts " [#] Connection closed" if opts[:verbose]
|
86
|
-
end
|
87
80
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gorg_message_sender
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Narbonne
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|