Sha256: 3f331defd046973b0e365b2546793067f1a5ab8d58db6d8c800a4a6c69c7b0b3

Contents?: true

Size: 1.02 KB

Versions: 8

Compression:

Stored size: 1.02 KB

Contents

require 'gem_config'
require 'logger'

module Sdk4me
  include GemConfig::Base

  with_configuration do
    has :logger, classes: ::Logger, default: ::Logger.new($stdout)

    has :host, classes: String, default: 'https://api.4me.com'
    has :api_version, values: ['v1'], default: 'v1'
    has :access_token, classes: String
    has :api_token, classes: String

    has :account, classes: String
    has :source, classes: String

    has :max_retry_time, classes: Integer, default: 300
    has :read_timeout, classes: Integer, default: 25
    has :block_at_rate_limit, classes: [TrueClass, FalseClass], default: true
    has :max_throttle_time, classes: Integer, default: 3660
    has :proxy_host, classes: String
    has :proxy_port, classes: Integer, default: 8080
    has :proxy_user, classes: String
    has :proxy_password, classes: String

    has :ca_file, classes: String, default: '../ca-bundle.crt'
  end

  def self.logger
    configuration.logger
  end

  class Exception < ::Exception
  end

  class UploadFailed < Exception
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
4me-sdk-2.0.4 lib/sdk4me.rb
4me-sdk-2.0.3 lib/sdk4me.rb
4me-sdk-2.0.2 lib/sdk4me.rb
4me-sdk-2.0.1 lib/sdk4me.rb
4me-sdk-2.0.0 lib/sdk4me.rb
4me-sdk-2.0.0.pre.rc.3 lib/sdk4me.rb
4me-sdk-2.0.0.pre.rc.2 lib/sdk4me.rb
4me-sdk-2.0.0.pre.rc.1 lib/sdk4me.rb