def get_proxy_options(url=nil)
      options = {}
      if url = url || ENV['HTTPS_PROXY'] || ENV['https_proxy'] || ENV['HTTP_PROXY'] || ENV['http_proxy']
        proxy_uri = URI.parse(url)
        options[:http_proxyaddr] = proxy_uri.host
        options[:http_proxyport] = proxy_uri.port
        options[:http_proxyuser] = proxy_uri.user
        options[:http_proxypass] = proxy_uri.password
      end
      options
    end
def get_proxy_options(url=nil)
      options = {}
      if url = url || ENV['HTTPS_PROXY'] || ENV['https_proxy'] || ENV['HTTP_PROXY'] || ENV['http_proxy']
        proxy_uri = URI.parse(url)
        options[:http_proxyaddr] = proxy_uri.host
        options[:http_proxyport] = proxy_uri.port
        options[:http_proxyuser] = proxy_uri.user
        options[:http_proxypass] = proxy_uri.password
      end
      options
    end
Get the proxy options for HTTParty

 @return [Hash] the proxy options