def opts_from_url(url)
      url = URI.parse(url) unless url.is_a?(URI)
      opts_from_non_params(url).merge opts_from_params(url.query)
    rescue URI::InvalidURIError
      {}
    end
def opts_from_url(url)
      url = URI.parse(url) unless url.is_a?(URI)
      opts_from_non_params(url).merge opts_from_params(url.query)
    rescue URI::InvalidURIError
      {}
    end
merges URI options into opts