Sha256: 2ee99a6bdb77ac3d851e2083629f95f2e1b36e1b67ba6064abb992a6e4fd5134

Contents?: true

Size: 1.19 KB

Versions: 1

Compression:

Stored size: 1.19 KB

Contents

require 'quebert/version'

module Quebert
  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'
  autoload :Logging,            'quebert/logging'
  
  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
  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

1 entries across 1 versions & 1 rubygems

Version Path
quebert-0.0.9 lib/quebert.rb