Class: PackageCloud::Util

Inherits:
Object
  • Object
show all
Defined in:
lib/package_cloud/util.rb

Class Method Summary collapse

Class Method Details

.compute_url(base_url, path) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/package_cloud/util.rb', line 6

def compute_url(base_url, path)
  url = base_url + path
  proxy_uri = URI.parse(url).find_proxy()
  if proxy_uri
    RestClient.proxy = proxy_uri.to_s
  end

  url
end