jerryluk-rabbitmq-jruby-client 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. data/lib/rabbitmq_client.rb +3 -3
  2. metadata +1 -1
@@ -64,7 +64,7 @@ class RabbitMQClient
64
64
  message_body
65
65
  end
66
66
 
67
- def persistent_publish(message_body, props=MessageProperties::PERSISTENT_BASIC)
67
+ def persistent_publish(message_body, props=MessageProperties::PERSISTENT_TEXT_PLAIN)
68
68
  raise RabbitMQClientError, "can only publish persistent message to durable queue" unless @durable
69
69
  publish(message_body, props)
70
70
  end
@@ -119,7 +119,7 @@ class RabbitMQClient
119
119
  attr_reader :connection
120
120
 
121
121
  # Instance Methods
122
- def initialize(options={:auto_connect => true})
122
+ def initialize(options={})
123
123
  # server address
124
124
  @host = options[:host] || '127.0.0.1'
125
125
  @port = options[:port] || 5672
@@ -133,7 +133,7 @@ class RabbitMQClient
133
133
  @queues = {}
134
134
  @exchanges = {}
135
135
 
136
- connect if options[:auto_connect]
136
+ connect unless options[:no_auto_connect]
137
137
  # Disconnect before the object is destroyed
138
138
  define_finalizer(self, lambda {|id| self.disconnect if self.connected? })
139
139
  self
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.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerry Luk