Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix git detection #811

Merged
merged 3 commits into from
Aug 25, 2023
Merged

Fix git detection #811

merged 3 commits into from
Aug 25, 2023

Commits on Aug 25, 2023

  1. (maint) Fix git remote detection

    Previously, this was attempting to determine if a github.com URL was a remote or a media type by inspecting part of the path. However, this was missing paths with 'release' in them. Also, we were never actually using any other return type but :github_remote. This changes the logic to return :github_media if the path contains known media tokens, or if the suffix ends with .tar.gz or .zip. Otherwise, we assume it's a remote.
    
    Ideally, we'd reach out to GitHub to determine if it's a repo, but we're doing this to avoid rate limiting.
    Nick Burgan-Illig committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    c315b8a View commit details
    Browse the repository at this point in the history
  2. (maint) Fix valid_url? check

    Because the 'request' function does NOT return the value the block you pass it returns, this function was always returning a Net::HTTP object. With how this function was being used, it would result in valid_url? always being truthy.  Net::HTTP.start DOES return the value that the block you pass it returns, though, so this simply un-blockifies the processing of the request response.
    Nick Burgan-Illig committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    9995d5e View commit details
    Browse the repository at this point in the history
  3. Changelog update

    Nick Burgan-Illig committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    d57c3d7 View commit details
    Browse the repository at this point in the history