def known_https(uri)
      case uri.host
      when HOSTS[:github]
        # remove possible subdomain like 'wiki.github.com'
        URI "https://github.com#{uri.path}"
      when HOSTS[:bitbucket]
        URI "https://#{uri.host}#{uri.path}"
      when HOSTS[:rubygems]
        URI "https://#{uri.host}#{uri.path}"
      else
        uri
      end
    end
def known_https(uri)
      case uri.host
      when HOSTS[:github]
        # remove possible subdomain like 'wiki.github.com'
        URI "https://github.com#{uri.path}"
      when HOSTS[:bitbucket]
        URI "https://#{uri.host}#{uri.path}"
      when HOSTS[:rubygems]
        URI "https://#{uri.host}#{uri.path}"
      else
        uri
      end
    end
Some uris are not https, but we know they should be,
 in which case we have an https redirection
 which is not properly handled by open-uri

 @param uri [URI::HTTP]
 @return [URI::HTTPS|URI::HTTP]