Sha256: fcf7a6a14585e578e3ae3c5d57a2fc7404490e29dd7e7678e6d34114640ec569

Contents?: true

Size: 1.02 KB

Versions: 8

Compression:

Stored size: 1.02 KB

Contents

require "beyond_api/version"

require "beyond_api/connection"
require "beyond_api/request"
require "beyond_api/session"
require "beyond_api/error"

require "beyond_api/ext"
require "beyond_api/utils"

require "logger"

module BeyondApi
  def self.logger
    @@logger ||= defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
  end

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

  class << self
    attr_accessor :configuration
  end

  def self.setup
    self.configuration ||= Configuration.new

    yield configuration
  end

  class Configuration
    attr_accessor :client_id, :client_secret, :open_timeout, :timeout,  :remove_response_links,
                  :remove_response_key_underscores, :object_struct_responses, :raise_error_requests

    def initialize
      @client_id = nil
      @client_secret = nil
      @open_timeout = 2
      @timeout = 5
      @remove_response_links = false
      @remove_response_key_underscores = false
      @object_struct_responses = false
      @raise_error_requests = false
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
beyond_api-0.12.1.pre lib/beyond_api.rb
beyond_api-0.12.0.pre lib/beyond_api.rb
beyond_api-0.11.1.pre lib/beyond_api.rb
beyond_api-0.11.0.pre lib/beyond_api.rb
beyond_api-0.10.0.pre lib/beyond_api.rb
beyond_api-0.9.0.pre lib/beyond_api.rb
beyond_api-0.8.1.pre lib/beyond_api.rb
beyond_api-0.8.0.pre lib/beyond_api.rb