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.23.0 lib/excon/standard_instrumentor.rb
excon-0.22.1 lib/excon/standard_instrumentor.rb
excon-0.22.0 lib/excon/standard_instrumentor.rb
vagrant-shell-0.2.6 vendor/bundle/gems/excon-0.20.1/lib/excon/standard_instrumentor.rb
vagrant-shell-0.2.5 vendor/bundle/gems/excon-0.20.1/lib/excon/standard_instrumentor.rb
excon-0.21.0 lib/excon/standard_instrumentor.rb
excon-0.20.1 lib/excon/standard_instrumentor.rb
excon-0.20.0 lib/excon/standard_instrumentor.rb