# File lib/premailer/rails/css_loaders/network_loader.rb, line 12 def uri_for_url(url) uri = URI(url) if uri.host.present? return uri if uri.scheme.present? URI("http:#{uri}") elsif asset_host_present? scheme, host = asset_host(url).split(%r{:?//}) scheme, host = host, scheme if host.nil? scheme = 'http' if scheme.blank? path = url URI(File.join("#{scheme}://#{host}", path)) end end