Sha256: b20a120b0a7b7105c4d1b9fd8748511e6cd6d1729c614d9d79ae7e8122017ec9

Contents?: true

Size: 731 Bytes

Versions: 5

Compression:

Stored size: 731 Bytes

Contents

require 'uri'
require 'addressable/uri'
require 'net/http'
require 'nokogiri'

autoload :OpenSSL, 'openssl'

# Core methods
module URLCanonicalize
  autoload :Exception, 'url_canonicalize/exception'
  autoload :HTTP, 'url_canonicalize/http'
  autoload :Request, 'url_canonicalize/request'
  autoload :Response, 'url_canonicalize/response'
  autoload :URI, 'url_canonicalize/uri'
  autoload :VERSION, 'url_canonicalize/version'

  class << self
    def canonicalize(url)
      fetch(url).url
    end

    def fetch(url)
      URLCanonicalize::HTTP.new(url).fetch
    end
  end
end

require 'monkey_patches/uri'
require 'monkey_patches/string'
require 'monkey_patches/addressable/uri'
require 'English' # Needed for $LAST_MATCH_INFO

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
url_canonicalize-0.1.5 lib/url_canonicalize.rb
url_canonicalize-0.1.4 lib/url_canonicalize.rb
url_canonicalize-0.1.2 lib/url_canonicalize.rb
url_canonicalize-0.1.1 lib/url_canonicalize.rb
url_canonicalize-0.1.0 lib/url_canonicalize.rb