Sha256: eb960be6c584c45380ca1f966cb97c2ebae59b49331786b0a72655a42c34d987

Contents?: true

Size: 309 Bytes

Versions: 7

Compression:

Stored size: 309 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

7 entries across 7 versions & 1 rubygems

Version Path
url_canonicalize-0.1.15 lib/monkey_patches/addressable/uri.rb
url_canonicalize-0.1.14 lib/monkey_patches/addressable/uri.rb
url_canonicalize-0.1.13 lib/monkey_patches/addressable/uri.rb
url_canonicalize-0.1.12 lib/monkey_patches/addressable/uri.rb
url_canonicalize-0.1.11 lib/monkey_patches/addressable/uri.rb
url_canonicalize-0.1.10 lib/monkey_patches/addressable/uri.rb
url_canonicalize-0.1.9 lib/monkey_patches/addressable/uri.rb