Sha256: 21be39cbfa139cbe8319ad5372a59b03ede7e08c9b38dc60dc9c4e3c26a20081
Contents?: true
Size: 500 Bytes
Versions: 69
Compression:
Stored size: 500 Bytes
Contents
module Katello module KatelloUrlHelper unless defined? CONSTANTS_DEFINED FILEPREFIX = ['file'].freeze PROTOCOLS = ['http', 'https', 'ftp', 'uln'].freeze CONSTANTS_DEFINED = true end def kurl_valid?(url) return false if (scheme = URI.parse(url).scheme).blank? return true if FILEPREFIX.include?(scheme.downcase) URI.parse(url).host.present? && PROTOCOLS.include?(scheme.downcase) rescue URI::InvalidURIError return false end end end
Version data entries
69 entries across 69 versions & 1 rubygems