Sha256: 08129f1c398e0dae3f71441ffc44d15bb13bdb857cf7364be41415c216e17c6c
Contents?: true
Size: 996 Bytes
Versions: 4
Compression:
Stored size: 996 Bytes
Contents
require 'mcrain' # don't require 'rabbitmq/http/client' here in order to use mcrain without 'rabbitmq_http_api_client' gem # require 'rabbitmq/http/client' module Mcrain class Rabbitmq < Base self.server_name = :rabbitmq self.container_image = "rabbitmq:3.4.4-management" def build_docker_command_options "-d -p #{runtime_port}:5672 -p #{port}:15672 --name #{container_name}" end def runtime_port @runtime_port ||= find_portno end def url "http://#{username}:#{password}@#{host}:#{port}" end def runtime_url "rabbitmq://#{host}:#{runtime_port}" end def username "guest" end def password "guest" end def client_require 'rabbitmq/http/client' end def client_class RabbitMQ::HTTP::Client end def client_init_args ["http://#{host}:#{port}", {username: username, password: password}] end def wait_for_ready client.list_users end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
mcrain-0.1.4 | lib/mcrain/rabbitmq.rb |
mcrain-0.1.3 | lib/mcrain/rabbitmq.rb |
mcrain-0.1.2 | lib/mcrain/rabbitmq.rb |
mcrain-0.1.1 | lib/mcrain/rabbitmq.rb |