Skip to content

Commit

Permalink
Use "gem" instead of "rubygems" to match purl spec
Browse files Browse the repository at this point in the history
  • Loading branch information
juspence committed Feb 15, 2023
1 parent 905c89b commit 5ff0ee3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/packageurl/contrib/purl2url.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def build_gitlab_repo_url(purl):


@repo_router.route("pkg:rubygems/.*")
@repo_router.route("pkg:gem/.*")
def build_rubygems_repo_url(purl):
"""
Return a rubygems repo URL from the `purl` string.
Expand Down
2 changes: 1 addition & 1 deletion src/packageurl/contrib/url2purl.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def build_rubygems_purl(uri):
rubygems_pattern = (
r"^https?://rubygems.org/(downloads|gems)/(?P<name>.+)-(?P<version>.+)(\.gem)$"
)
return purl_from_pattern("rubygems", rubygems_pattern, uri)
return purl_from_pattern("gem", rubygems_pattern, uri)


# https://pypi.python.org/packages/source/a/anyjson/anyjson-0.3.3.tar.gz
Expand Down

0 comments on commit 5ff0ee3

Please sign in to comment.