Sha256: 6dd4dcdffe0c288ebf6acfa3c6d19fed7b56518bf4509d536f393c46c2551536
Contents?: true
Size: 762 Bytes
Versions: 3
Compression:
Stored size: 762 Bytes
Contents
# frozen_string_literal: true 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
url_canonicalize-1.0.0 | lib/url_canonicalize.rb |
url_canonicalize-0.2.1 | lib/url_canonicalize.rb |
url_canonicalize-0.2.0 | lib/url_canonicalize.rb |