jerryluk-rabbitmq-jruby-client 0.1.3 → 0.1.4

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.
Binary file
@@ -38,7 +38,7 @@ class RabbitMQClient
38
38
  end
39
39
 
40
40
  def bind(exchange, routing_key=nil)
41
- @routing_key = routing_key || "#{@name}_#{Time.new.to_i.to_s}_#{rand(100).to_s}"
41
+ @routing_key = routing_key || "#{@name}_#{Time.now.to_i.to_s}_#{rand(1<<64).to_s}"
42
42
  @exchange = exchange
43
43
  @channel.queue_bind(@name, @exchange.name, @routing_key)
44
44
  self
@@ -73,7 +73,7 @@ class RabbitMQClient
73
73
  protected
74
74
  def auto_bind
75
75
  unless @exchange
76
- exchange = Exchange.new("@name_exchange", 'fanout', @channel)
76
+ exchange = Exchange.new("#{@name}_exchange", 'fanout', @channel)
77
77
  self.bind(exchange)
78
78
  end
79
79
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jerryluk-rabbitmq-jruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerry Luk
@@ -29,6 +29,7 @@ files:
29
29
  - lib/rabbitmq-client.jar
30
30
  - lib/junit.jar
31
31
  - lib/rabbitmq_client.rb
32
+ - spec/rabbitmq_client_spec.rb
32
33
  has_rdoc: false
33
34
  homepage: http://www.linkedin.com/in/jerryluk
34
35
  post_install_message: