lib/rrj/janus/transactions/admin.rb in ruby_rabbitmq_janus-2.3.1.pre.201 vs lib/rrj/janus/transactions/admin.rb in ruby_rabbitmq_janus-2.4.0.pre.208
- old
+ new
@@ -23,11 +23,11 @@
raise Errors::Janus::TransactionAdmin::Connect
end
# Write a message in queue in RabbitMQ
def publish_message(type, options = {})
- msg = Janus::Messages::Admin.new(type, opts.merge(options))
+ msg = Janus::Messages::Admin.new(type, options.merge(opts2))
response = read_response(publisher.publish(msg))
Janus::Responses::Admin.new(response)
rescue
raise Errors::Janus::TransactionAdmin::PublishMessage
end
@@ -42,9 +42,13 @@
Tools::Config.instance.options['rabbit']['admin_pass']
end
def opts
{ 'session_id' => session, 'admin_secret' => admin_secret }
+ end
+
+ def opts2
+ session.merge('admin_secret' => admin_secret)
end
end
end
end
end