Sha256: e58df15ff8b2af2fc04736ab618727da3661910263ef9caabbe9af9e0c92bcb9

Contents?: true

Size: 639 Bytes

Versions: 39

Compression:

Stored size: 639 Bytes

Contents

module Excon
  class StandardInstrumentor
    def self.instrument(name, params = {}, &block)
      params = params.dup

      # reduce duplication/noise of output
      params.delete(:connection)
      params.delete(:stack)

      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)
      Excon::PrettyPrinter.pp($stderr, params)

      if block_given?
        yield
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 4 rubygems

Version Path
excon-0.51.0 lib/excon/standard_instrumentor.rb
excon-0.50.1 lib/excon/standard_instrumentor.rb
excon-0.50.0 lib/excon/standard_instrumentor.rb
able-neo4j-1.0.0 vendor/bundle/jruby/1.9/gems/excon-0.45.4/lib/excon/standard_instrumentor.rb
excon-0.49.0 lib/excon/standard_instrumentor.rb
excon-0.48.0 lib/excon/standard_instrumentor.rb
excon-0.47.0 lib/excon/standard_instrumentor.rb
excon-0.46.0 lib/excon/standard_instrumentor.rb
framed_rails-0.2.0 vendor/gems/excon-0.45.3/lib/excon/standard_instrumentor.rb
framed_rails-0.1.7 vendor/gems/excon-0.45.3/lib/excon/standard_instrumentor.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/excon-0.45.4/lib/excon/standard_instrumentor.rb
framed_rails-0.1.5 vendor/gems/excon-0.45.3/lib/excon/standard_instrumentor.rb
framed_rails-0.1.4 vendor/gems/excon-0.45.3/lib/excon/standard_instrumentor.rb
framed_rails-0.1.3 vendor/gems/excon-0.45.3/lib/excon/standard_instrumentor.rb
framed_rails-0.1.2 vendor/gems/excon-0.45.3/lib/excon/standard_instrumentor.rb
framed_rails-0.1.0 vendor/gems/excon-0.45.3/lib/excon/standard_instrumentor.rb
excon-0.45.4 lib/excon/standard_instrumentor.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/excon-0.45.3/lib/excon/standard_instrumentor.rb
excon-0.45.3 lib/excon/standard_instrumentor.rb
excon-0.45.2 lib/excon/standard_instrumentor.rb