Sha256: 33927e90ba302b9038c2cb222c58702aed9557ff700f12a08dd68adc40dcdca5

Contents?: true

Size: 1.64 KB

Versions: 1

Compression:

Stored size: 1.64 KB

Contents

require 'active_model'
require 'active_support'
require 'json'
require 'typhoeus'

require 'active_support'
require 'active_support/core_ext/class/attribute_accessors'
require 'active_support/core_ext/class/attribute'
require 'active_support/core_ext/hash/indifferent_access'
require 'active_support/core_ext/hash/reverse_merge'
require 'active_support/core_ext/kernel/reporting'
require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/module/aliasing'
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/object/to_query'
require 'active_support/core_ext/object/duplicable'
require 'set'
require 'uri'

require 'active_support/core_ext/uri'

require 'lazy_resource/version'
require 'lazy_resource/errors'

require 'lazy_resource/log_subscriber'

require 'lazy_resource/ext/typhoeus'

module LazyResource
  extend ActiveSupport::Autoload
  
  autoload :ConfigurationDelegate
  autoload :Attributes
  autoload :Mapping
  autoload :Relation
  autoload :Request
  autoload :Resource
  autoload :ResourceQueue
  autoload :Types
  autoload :UrlGeneration

  def self.configure(&block)
    yield LazyResource::ConfigurationDelegate.new
  end

  def self.logger=(logger)
    @logger = logger
  end

  def self.logger
    @logger
  end

  def self.debug=(debug)
    @debug = debug
  end

  def self.debug
    @debug = @debug.nil? ? false : @debug
  end

  def self.max_concurrency
    @max_concurrency ||= 200
  end

  def self.max_concurrency=(max)
    @max_concurrency = max
  end

  def self.deprecate(message, file, line)
    if self.logger && self.debug
      self.logger.info "#{message} from #{file}##{line}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lazy_resource-0.5.0 lib/lazy_resource.rb