Sha256: 5f296379cde783f52758aa2dc6c4a19510bfab64812e55e8ee5d2e6ce5fbab04

Contents?: true

Size: 750 Bytes

Versions: 2

Compression:

Stored size: 750 Bytes

Contents

module Sentry
  class Transport
    class Configuration
      attr_accessor :timeout, :open_timeout, :proxy, :ssl, :ssl_ca_file, :ssl_verification, :encoding, :http_adapter, :faraday_builder, :transport_class

      def initialize
        @ssl_verification = true
        @open_timeout = 1
        @timeout = 2
        @encoding = 'gzip'
      end

      def encoding=(encoding)
        raise(Error, 'Unsupported encoding') unless %w(gzip json).include? encoding

        @encoding = encoding
      end

      def transport_class=(klass)
        unless klass.is_a?(Class)
          raise Sentry::Error.new("config.transport.transport_class must a class. got: #{klass.class}")
        end

        @transport_class = klass
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sentry-ruby-0.1.2 lib/sentry/transport/configuration.rb
sentry-ruby-0.1.1 lib/sentry/transport/configuration.rb