module RabbitMQHttpAuthBackend

Constants

VERSION

Public Class Methods

app(version = nil) click to toggle source
# File lib/rabbitmq_http_auth_backend.rb, line 14
def self.app(version = nil)
  version ||= RabbitMQHttpAuthBackend::Config.default_configuration_key
  config = RabbitMQHttpAuthBackend::Config.new(version)
  RabbitMQHttpAuthBackend::App.new(config).generate
end
configure!(version = nil, &block) click to toggle source
# File lib/rabbitmq_http_auth_backend.rb, line 6
def self.configure!(version = nil, &block)
  version ||= RabbitMQHttpAuthBackend::Config.default_configuration_key
  RabbitMQHttpAuthBackend::Config.configuration[version] ||= {}
  cfg = RabbitMQHttpAuthBackend::Config.configuration[version]
  RabbitMQHttpAuthBackend::Config::Runtime.new(cfg).instance_eval(&block)
  RabbitMQHttpAuthBackend::Config.version(version)
end