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.1.0 lib/msgr.rb
msgr-1.0.0.1.b217 lib/msgr.rb
msgr-1.0.0.1.b216 lib/msgr.rb
msgr-1.0.0.1.b215 lib/msgr.rb
msgr-1.0.0.1.b214 lib/msgr.rb
msgr-1.0.0.1.b213 lib/msgr.rb
msgr-1.0.0.1.b212 lib/msgr.rb
msgr-1.0.0.1.b211 lib/msgr.rb
msgr-1.0.0.1.b210 lib/msgr.rb
msgr-1.0.0.1.b209 lib/msgr.rb
msgr-1.0.0.1.b208 lib/msgr.rb
msgr-1.0.0.1.b207 lib/msgr.rb
msgr-1.0.0.1.b206 lib/msgr.rb
msgr-1.0.0.1.b205 lib/msgr.rb
msgr-1.0.0.1.b204 lib/msgr.rb
msgr-1.0.0.1.b203 lib/msgr.rb
msgr-1.0.0.1.b202 lib/msgr.rb
msgr-1.0.0.1.b201 lib/msgr.rb
msgr-1.0.0.1.b200 lib/msgr.rb
msgr-1.0.0.1.b199 lib/msgr.rb