Sha256: f0ed0be056c5d211cb01c294e0f621a59e30d14fd7e19e79799cfd440d032a6e

Contents?: true

Size: 507 Bytes

Versions: 28

Compression:

Stored size: 507 Bytes

Contents

module Excon
  class StandardInstrumentor
    def self.instrument(name, params = {}, &block)
      params = params.dup
      if params.has_key?(:headers) && params[:headers].has_key?('Authorization')
        params[:headers] = params[:headers].dup
        params[:headers]['Authorization'] = REDACTED
      end
      if params.has_key?(:password)
        params[:password] = REDACTED
      end
      $stderr.puts("#{name}  #{params.inspect}")
      if block_given?
        yield
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
excon-0.33.0 lib/excon/standard_instrumentor.rb
excon-0.32.1 lib/excon/standard_instrumentor.rb
excon-0.32.0 lib/excon/standard_instrumentor.rb
excon-0.31.0 lib/excon/standard_instrumentor.rb
excon-0.30.0 lib/excon/standard_instrumentor.rb
excon-0.29.0 lib/excon/standard_instrumentor.rb
excon-0.28.0 lib/excon/standard_instrumentor.rb
excon-0.27.6 lib/excon/standard_instrumentor.rb
excon-0.27.5 lib/excon/standard_instrumentor.rb
excon-0.27.4 lib/excon/standard_instrumentor.rb
excon-0.27.3 lib/excon/standard_instrumentor.rb
excon-0.27.2 lib/excon/standard_instrumentor.rb
excon-0.27.1 lib/excon/standard_instrumentor.rb
excon-0.27.0 lib/excon/standard_instrumentor.rb
excon-0.26.0 lib/excon/standard_instrumentor.rb
excon-0.25.3 lib/excon/standard_instrumentor.rb
excon-0.25.2 lib/excon/standard_instrumentor.rb
excon-0.25.1 lib/excon/standard_instrumentor.rb
excon-0.25.0 lib/excon/standard_instrumentor.rb
excon-0.24.0 lib/excon/standard_instrumentor.rb