apollo-tools 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de86c4160c1878e13b0b2f92adc85c690de01f69
4
- data.tar.gz: 99a9c0747e0d6a3da2b18b23b884245108eefba1
3
+ metadata.gz: dad0a81ddb78aa0caeb2fc24b57dcc6fef939632
4
+ data.tar.gz: 41333fbf3c7cbb2476fb4e474818c78f8e44a0c0
5
5
  SHA512:
6
- metadata.gz: 884df5e67cac47c5b03154c4f559bbaebdee889352b5bb9de94d3706e600ba3b5aa39cce678f59c327f3a3331316eb1398f495fc6f26cbbdd989f4901c153a5b
7
- data.tar.gz: 01bf9ff656c94c9ed207abe1944d9df56f8dcde06874cda384c5a8ec4ecbc57aa9d76b16189e3742894b0116e96ade8b50a7bcad9062d9aa05b96c5a6659adbc
6
+ metadata.gz: 067d2d43fb6857d9028e723309b4972bbef86579d97ed3fada1a13691dacde8cdad85e75f4937ca86f87d0bfe7e5c90500cc010c0712204611b243df8a0754b2
7
+ data.tar.gz: 67bed98e61298663404bcb84c5897b6d962fb858228f1bc83e7bdbbb30a29d6ac9e17909b2aaac1b3433860bf843e33b142d05aaa21ecd740a75208eef639d48
@@ -12,13 +12,15 @@ module Apollo
12
12
  # @option opts [String] :rmq_username The username to connect to the rabbitmq server
13
13
  # @option opts [String] :rmq_password The password to connect to the rabbitmq server
14
14
  # @option opts [String] :address the hostname or ip to connect to the rabbitmq server
15
+ # @option opts [String] :vhost the vhost to connect to
15
16
  # @option opts [Integer] :port the port to connect to the rabbitmq server
16
17
  def initialize(exchange, key, opts = {})
17
18
  username = CGI.escape opts.fetch(:rmq_username, 'guest')
18
19
  password = CGI.escape opts.fetch(:rmq_password, 'guest')
19
20
  host = opts.fetch(:ip, opts.fetch(:hostname, '127.0.0.1'))
20
21
  port = opts.fetch(:port, 5672)
21
- @conn = Bunny.new("amqp://#{username}:#{password}@#{host}:#{port}")
22
+ vhost = opts.fetch(:vhost, '/')
23
+ @conn = Bunny.new("amqp://#{username}:#{password}@#{host}:#{port}#{vhost}")
22
24
  @conn.start
23
25
  raise 'connection is nil' if @conn.nil?
24
26
  @ch = @conn.create_channel
@@ -1,3 +1,3 @@
1
1
  module Apollo
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apollo-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brendan Tobolaski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-04-15 00:00:00.000000000 Z
11
+ date: 2015-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler