Sha256: 872616e6476637c1691c4d269a3f7a3a12f95c65052d27f483897b21bb83e50c

Contents?: true

Size: 1021 Bytes

Versions: 22

Compression:

Stored size: 1021 Bytes

Contents

require 'gem_config'

require_relative 'services/logger/null'

module Services
  include GemConfig::Base

  BackgroundProcessorNotFound = Class.new(StandardError)
  RedisNotFound               = Class.new(StandardError)

  with_configuration do
    has :logger, default: Services::Logger::Null.new
    has :redis
  end

  def self.redis
    @redis ||= self.configuration.redis || (defined?(Redis.current) && Redis.current) or fail RedisNotFound, 'Redis not configured.'
  end
end

require_relative 'services/version'
require_relative 'services/logger/file'
require_relative 'services/logger/redis'
begin
  require_relative 'services/asyncable'
rescue Services::BackgroundProcessorNotFound
end
require_relative 'services/modules/call_logger'
require_relative 'services/modules/exception_wrapper'
require_relative 'services/modules/object_class'
require_relative 'services/modules/uniqueness_checker'
require_relative 'services/base'
require_relative 'services/query'
require_relative 'services/railtie' if defined?(Rails)

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
services-7.1.2 lib/services.rb
services-7.1.1 lib/services.rb
services-7.1.0 lib/services.rb
services-7.0.3 lib/services.rb
services-7.0.2 lib/services.rb
services-7.0.1 lib/services.rb
services-7.0.0 lib/services.rb
services-6.0.5 lib/services.rb
services-6.0.4 lib/services.rb
services-6.0.3 lib/services.rb
services-6.0.2 lib/services.rb
services-6.0.1 lib/services.rb
services-6.0.0 lib/services.rb
services-5.1.2 lib/services.rb
services-5.1.1 lib/services.rb
services-5.1.0 lib/services.rb
services-5.0.0 lib/services.rb
services-4.3.0 lib/services.rb
services-4.1.4 lib/services.rb
services-4.1.3 lib/services.rb