Sha256: d3d8463d5dd5424a6a6b491399fbc4e3f7ba332d0309223232402b3a1e817d64

Contents?: true

Size: 1001 Bytes

Versions: 11

Compression:

Stored size: 1001 Bytes

Contents

require 'gem_config'
require 'logger'

module Itrp
  include GemConfig::Base

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

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

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

    has :max_retry_time, classes: Fixnum, default: 5400
    has :read_timeout, classes: Fixnum, default: 25
    has :block_at_rate_limit, classes: [TrueClass, FalseClass], default: false

    has :proxy_host, classes: String
    has :proxy_port, classes: Fixnum, 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 # ::Itrp::Exception class

  class UploadFailed < Exception; end # ::Itrp::UploadFailed class

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
itrp-client-1.1.2 lib/itrp.rb
itrp-client-1.1.1 lib/itrp.rb
itrp-client-1.1.0 lib/itrp.rb
itrp-client-1.0.14 lib/itrp.rb
itrp-client-1.0.13 lib/itrp.rb
itrp-client-1.0.12 lib/itrp.rb
itrp-client-1.0.11 lib/itrp.rb
itrp-client-1.0.10 lib/itrp.rb
itrp-client-1.0.9 lib/itrp.rb
itrp-client-1.0.8 lib/itrp.rb
itrp-client-1.0.7 lib/itrp.rb