require 'bearcat/version' require 'bearcat/client' module Bearcat class << self require 'logging' attr_writer :enforce_rate_limits, :rate_limit_min, :rate_limits, :max_sleep_seconds, :min_sleep_seconds, :logger, :master_rate_limit, :master_mutex, :rate_limit_threshold def configure yield self if block_given? end def rate_limit_min @rate_limit_min ||= 175 end def enforce_rate_limits @enforce_rate_limits ||= false end def rate_limits @rate_limits ||= {} end def max_sleep_seconds @max_sleep_seconds ||= 60 end def master_rate_limit @master_rate_limit ||= false end def master_mutex @master_mutex ||= Mutex.new end def rate_limit_threshold @rate_limit_threshold ||= 125 end def logger return @logger if defined? @logger @logger = Logging.logger(STDOUT) @logger.level = :debug @logger end def min_sleep_seconds @min_sleep_seconds ||= 5 end end end