Sha256: d3260c3b1ff4257c8131529c295a43349ee45db898467d077eee6ecef95e5cb0

Contents?: true

Size: 507 Bytes

Versions: 1

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

module Excon
  module Addressable
    # Parser
    #
    # Parses a url using `Addressable`, setting the port to the inferred_port.
    #
    # @see : https://github.com/excon/excon/issues/384#issuecomment-42645517
    # @see : https://github.com/excon/excon/issues/384#issuecomment-362618298
    #
    class Parser < ::Addressable::URI
      def self.parse(url)
        uri = super
        uri.port = uri.inferred_port unless uri.port
        uri
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
excon-addressable-0.4.1 lib/excon/addressable/parser.rb