Module: RabbitMQHttpAuthBackend

Defined in:
lib/rabbitmq_http_auth_backend.rb,
lib/rabbitmq_http_auth_backend/app.rb,
lib/rabbitmq_http_auth_backend/config.rb,
lib/rabbitmq_http_auth_backend/service.rb,
lib/rabbitmq_http_auth_backend/version.rb,
lib/rabbitmq_http_auth_backend/resolver.rb,
lib/rabbitmq_http_auth_backend/basic_resolver.rb,
lib/rabbitmq_http_auth_backend/config/runtime.rb,
lib/rabbitmq_http_auth_backend/resolver/runtime.rb,
lib/rabbitmq_http_auth_backend/app/response_formatter.rb

Defined Under Namespace

Modules: Version Classes: App, BasicResolver, Config, Error, Resolver, Service

Constant Summary collapse

VERSION =
Version.to_s

Class Method Summary collapse

Class Method Details

.app(version = nil) ⇒ Object



14
15
16
17
18
# 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) ⇒ Object



6
7
8
9
10
11
12
# 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