mirror of
https://github.com/ditkrg/rabbit_carrots.git
synced 2026-01-22 13:56:41 +00:00
30 lines
663 B
Ruby
30 lines
663 B
Ruby
module RabbitCarrots
|
|
class << self
|
|
attr_accessor :configuration
|
|
end
|
|
|
|
def self.configure
|
|
self.configuration ||= Configuration.new
|
|
yield(configuration)
|
|
end
|
|
|
|
class Configuration
|
|
attr_accessor :rabbitmq_host,
|
|
:rabbitmq_port,
|
|
:rabbitmq_user,
|
|
:rabbitmq_password,
|
|
:rabbitmq_vhost,
|
|
:routing_key_mappings,
|
|
:rabbitmq_exchange_name,
|
|
:automatically_recover,
|
|
:network_recovery_interval,
|
|
:recovery_attempts
|
|
|
|
def orm
|
|
@orm ||= :activerecord
|
|
end
|
|
|
|
attr_writer :orm
|
|
end
|
|
end
|