Sha256: 928bd42daa2c0e9cfc99e551f342a4ac9266b2af4bfeaa4130eefa4b81d90ba7

Contents?: true

Size: 1.08 KB

Versions: 79

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

require 'msgr/version'
require 'active_support'
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/string/inflections'
require 'active_support/core_ext/hash/reverse_merge'
require 'active_support/core_ext/hash/keys'

require 'msgr/logging'
require 'msgr/client'
require 'msgr/binding'
require 'msgr/channel'
require 'msgr/connection'
require 'msgr/consumer'
require 'msgr/dispatcher'
require 'msgr/errors'
require 'msgr/message'
require 'msgr/route'
require 'msgr/routes'
require 'msgr/test_pool'

require 'msgr/railtie' if defined? Rails

module Msgr
  class << self
    attr_writer :client, :config
    delegate :publish, to: :client

    def config
      @config ||= {}
    end

    def client
      @client ||= Msgr::Client.new config
    end

    def logger
      if @logger.nil?
        @logger = Logger.new $stdout
        @logger.level = Logger::Severity::INFO
      end

      @logger
    end

    attr_writer :logger

    def start
      client.start
      client
    end
  end
end

Version data entries

79 entries across 79 versions & 1 rubygems

Version Path
msgr-1.2.0 lib/msgr.rb
msgr-1.1.0.1.b306 lib/msgr.rb
msgr-1.1.0.1.b305 lib/msgr.rb
msgr-1.1.0.1.b302 lib/msgr.rb
msgr-1.1.0.1.b301 lib/msgr.rb
msgr-1.1.0.1.b300 lib/msgr.rb
msgr-1.1.0.1.b297 lib/msgr.rb
msgr-1.1.0.1.b296 lib/msgr.rb
msgr-1.1.0.1.b295 lib/msgr.rb
msgr-1.1.0.1.b292 lib/msgr.rb
msgr-1.1.0.1.b291 lib/msgr.rb
msgr-1.1.0.1.b288 lib/msgr.rb
msgr-1.1.0.1.b285 lib/msgr.rb
msgr-1.1.0.1.b263 lib/msgr.rb
msgr-1.1.0.1.b249 lib/msgr.rb
msgr-1.1.0.1.b248 lib/msgr.rb
msgr-1.1.0.1.b244 lib/msgr.rb
msgr-1.1.0.1.b241 lib/msgr.rb
msgr-1.1.0.1.b240 lib/msgr.rb
msgr-1.1.0.1.b239 lib/msgr.rb