Sha256: cbf8a5e21d47704ad3659b3efaf1af6257661c56f3da04357b3ee166bc75ec5d

Contents?: true

Size: 310 Bytes

Versions: 3

Compression:

Stored size: 310 Bytes

Contents

# frozen_string_literal: true

module Addressable
  # Patch for Addressable's URI class
  class URI
    def self.canonicalize(uri)
      url = parse(uri).to_s # uri can be anything Addressable::URI can handle
      canonical_url = URLCanonicalize.canonicalize(url)
      parse(canonical_url)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
url_canonicalize-1.0.0 lib/monkey_patches/addressable/uri.rb
url_canonicalize-0.2.1 lib/monkey_patches/addressable/uri.rb
url_canonicalize-0.2.0 lib/monkey_patches/addressable/uri.rb