Sha256: b55e4025fa3b560a4bde11bb3e60ffe67337a2134c1e6174a44e8484639548ed

Contents?: true

Size: 391 Bytes

Versions: 8

Compression:

Stored size: 391 Bytes

Contents

module Bundler
  class AnonymizableURI
    attr_reader :original_uri,
                :without_credentials

    def initialize(original_uri)
      @original_uri = original_uri.freeze
      @without_credentials ||=
        if original_uri.userinfo
          original_uri.dup.tap { |uri| uri.user = uri.password = nil }.freeze
        else
          original_uri
        end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bundler-1.7.15 lib/bundler/anonymizable_uri.rb
bundler-1.7.14 lib/bundler/anonymizable_uri.rb
bundler-1.7.13 lib/bundler/anonymizable_uri.rb
bundler-1.7.12 lib/bundler/anonymizable_uri.rb
bundler-1.7.11 lib/bundler/anonymizable_uri.rb
bundler-1.7.10 lib/bundler/anonymizable_uri.rb
bundler-1.7.9 lib/bundler/anonymizable_uri.rb
bundler-1.7.8 lib/bundler/anonymizable_uri.rb