prometheus-splash 0.4.4 → 0.4.5
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/CHANGELOG.md +8 -1
- data/lib/splash/constants.rb +1 -1
- data/lib/splash/transports/rabbitmq.rb +14 -17
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f4ea7ed10be999a00e43e04651616be5db143bbc0d85c11a1ca7126ad68aa33
|
4
|
+
data.tar.gz: dd66e18d9c1633033142b94852f3af61b066dd3dbc80de451f733b379e797203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d923826528d62549cf890121e20474d13e5b88e1d8da3e8bf3136ef3232dd4a92b0bf11a6b4d07817786f192dc7e50e6f018d0611e544fafd906d7b7f8e9f79d
|
7
|
+
data.tar.gz: 3fec4f6263749824d308f1bbbeabf7dbd7ab5bef5f025ec921f0cef0f2ebd0b32584a117550091344b26dcf257cf0ed10fb7d6dbfd887ff8502468595d5ca578
|
data/CHANGELOG.md
CHANGED
data/lib/splash/constants.rb
CHANGED
@@ -11,17 +11,16 @@ module Splash
|
|
11
11
|
|
12
12
|
def initialize(options = {})
|
13
13
|
@config = get_config.transports
|
14
|
-
|
14
|
+
|
15
15
|
host = @config[:rabbitmq][:host]
|
16
16
|
port = @config[:rabbitmq][:port]
|
17
|
-
vhost = @config[:rabbitmq][:vhost]
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
@url << "#{host}:#{port}#{vhost}"
|
17
|
+
vhost = (@config[:rabbitmq][:vhost])? @config[:rabbitmq][:vhost] : '/'
|
18
|
+
passwd = (@config[:rabbitmq][:passwd])? @config[:rabbitmq][:passwd] : 'guest'
|
19
|
+
user = (@config[:rabbitmq][:user])? @config[:rabbitmq][:user] : 'guest'
|
20
|
+
conf = { :host => host, :vhost => vhost, :user => user, :password => passwd, :port => port.to_i}
|
21
|
+
|
23
22
|
begin
|
24
|
-
@connection = Bunny.new
|
23
|
+
@connection = Bunny.new conf
|
25
24
|
@connection.start
|
26
25
|
@channel = @connection.create_channel
|
27
26
|
@queue = @channel.queue options[:queue]
|
@@ -41,21 +40,19 @@ module Splash
|
|
41
40
|
|
42
41
|
def initialize
|
43
42
|
@config = get_config.transports
|
44
|
-
@url = "amqp://"
|
45
43
|
host = @config[:rabbitmq][:host]
|
46
44
|
port = @config[:rabbitmq][:port]
|
47
|
-
vhost = @config[:rabbitmq][:vhost]
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
@url << "#{host}:#{port}#{vhost}"
|
45
|
+
vhost = (@config[:rabbitmq][:vhost])? @config[:rabbitmq][:vhost] : '/'
|
46
|
+
passwd = (@config[:rabbitmq][:passwd])? @config[:rabbitmq][:passwd] : 'guest'
|
47
|
+
user = (@config[:rabbitmq][:user])? @config[:rabbitmq][:user] : 'guest'
|
48
|
+
conf = { :host => host, :vhost => vhost, :user => user, :password => passwd, :port => port.to_i}
|
49
|
+
|
53
50
|
begin
|
54
|
-
@connection = Bunny.new
|
51
|
+
@connection = Bunny.new conf
|
55
52
|
@connection.start
|
56
53
|
@channel = @connection.create_channel
|
57
54
|
rescue Bunny::Exception
|
58
|
-
|
55
|
+
splash_exit case: :service_dependence_missing, more: "RabbitMQ Transport not available."
|
59
56
|
end
|
60
57
|
end
|
61
58
|
|