lib/url_canonicalize/uri.rb in url_canonicalize-0.1.15 vs lib/url_canonicalize/uri.rb in url_canonicalize-0.2.0
- old
+ new
@@ -1,6 +1,7 @@
# frozen_string_literal: true
+
module URLCanonicalize
# Manage the URL into a URI with local exception handling
class URI
class << self
def parse(url)
@@ -24,9 +25,9 @@
return url if url.include? COLON
"http://#{url}" # Add protocol if we just receive a host name
end
VALID_CLASSES = [::URI::HTTP, ::URI::HTTPS].freeze
- COLON = ':'
+ COLON = ':'.freeze
end
end
end