Sha256: fc51d16629df07211d5bed680af27744a617358afabe15c78ee666d4c74afe33
Contents?: true
Size: 801 Bytes
Versions: 14
Compression:
Stored size: 801 Bytes
Contents
module Pact module Provider class PactURI attr_reader :uri, :options, :metadata def initialize (uri, options = nil, metadata = nil) @uri = uri @options = options || {} @metadata = metadata || {} # make sure it's not nil if nil is passed in end def == other other.is_a?(PactURI) && uri == other.uri && options == other.options && metadata == other.metadata end def basic_auth? !!username end def username options[:username] end def password options[:password] end def to_s if(basic_auth?) URI(@uri).tap { |x| x.userinfo="#{username}:*****"}.to_s else @uri end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems