Sha256: 87c6ddb320a2a70d4314f9bb6183a4f64d5a58dcf455a835f6b9b4e8d386fe5a

Contents?: true

Size: 1.35 KB

Versions: 9

Compression:

Stored size: 1.35 KB

Contents

require 'quebert/version'

module Quebert
  autoload :Logging,            'quebert/logging'
  autoload :Serializer,         'quebert/serializer'
  autoload :Configuration,      'quebert/configuration'
  autoload :Job,                'quebert/job'
  autoload :Controller,         'quebert/controller'
  autoload :Backend,            'quebert/backend'
  autoload :Support,            'quebert/support'
  autoload :Worker,             'quebert/worker'
  autoload :CommandLineRunner,  'quebert/command_line_runner'
  autoload :AsyncSender,        'quebert/async_sender'

  class << self
    def configuration
      @configuration ||= Configuration.new
    end
    alias_method :config, :configuration

    # Registry for quebert backends
    def backends
      @backends ||= Support::Registry.new
    end

    def serializers
      @serializers ||= Support::ClassRegistry.new
    end

    # Make this easier for elsewhere in the app
    def logger
      config.logger
    end

    # Deprecation notice for code within block.
    def deprecate(message, &block)
      logger.warn "Quebert Deprecation Notice: #{message}"
      block.call
    end
  end

  # Register built-in Quebert backends
  Quebert.backends.register :beanstalk,       Backend::Beanstalk
  Quebert.backends.register :in_process,      Backend::InProcess
  Quebert.backends.register :sync,            Backend::Sync
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
quebert-3.3.0 lib/quebert.rb
quebert-3.2.1 lib/quebert.rb
quebert-3.2.0 lib/quebert.rb
quebert-3.0.3 lib/quebert.rb
quebert-3.0.2 lib/quebert.rb
quebert-3.0.1 lib/quebert.rb
quebert-3.0.0 lib/quebert.rb
quebert-2.0.4 lib/quebert.rb
quebert-2.0.3 lib/quebert.rb