Sha256: d74fc6923e18decd1e509ae3c319b3ed313bbf37468ddf731ef82e37b3f29940

Contents?: true

Size: 1.01 KB

Versions: 6

Compression:

Stored size: 1.01 KB

Contents

require "beyond_api/version"

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

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

module BeyondApi
  class Error < StandardError; end

  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

6 entries across 6 versions & 1 rubygems

Version Path
beyond_api-0.7.0.pre lib/beyond_api.rb
beyond_api-0.6.0.pre lib/beyond_api.rb
beyond_api-0.5.1.pre lib/beyond_api.rb
beyond_api-0.5.0.pre lib/beyond_api.rb
beyond_api-0.4.0.pre lib/beyond_api.rb
beyond_api-0.3.0.pre lib/beyond_api.rb