Sha256: f1466022e48bed5e9c93e0012412957a52330483c811273066234e6b6f1255c3
Contents?: true
Size: 760 Bytes
Versions: 2
Compression:
Stored size: 760 Bytes
Contents
# encoding: utf-8 require 'java' require 'ext/commons-io' require 'ext/rabbitmq-client' module HotBunnies import com.rabbitmq.client.ConnectionFactory import com.rabbitmq.client.Connection import com.rabbitmq.client.Channel import com.rabbitmq.client.DefaultConsumer import com.rabbitmq.client.QueueingConsumer CONNECTION_PROPERTIES = [:host, :port, :virtual_host, :connection_timeout, :username, :password] def self.connect(options={}) cf = ConnectionFactory.new CONNECTION_PROPERTIES.each do |property| if options[property] cf.send("#{property}=".to_sym, options[property]) end end cf.new_connection end end require 'hot_bunnies/channel' require 'hot_bunnies/queue' require 'hot_bunnies/exchange'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hot_bunnies-1.1.3-java | lib/hot_bunnies.rb |
hot_bunnies-1.1.2-java | lib/hot_bunnies.rb |