1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-13 22:17:20 +00:00

Improve rubygems package registry (#31357)

To make it work with Bundler:
https://guides.rubygems.org/rubygems-org-compact-index-api/

It only adds 2 new API endpoints and improves some tests, existing logic
is not changed.
This commit is contained in:
wxiaoguang
2024-06-17 16:42:46 +08:00
committed by GitHub
parent 25f3ec5b65
commit 0f09c22663
3 changed files with 345 additions and 107 deletions

View File

@ -588,6 +588,8 @@ func CommonRoutes() *web.Route {
r.Get("/prerelease_specs.4.8.gz", rubygems.EnumeratePackagesPreRelease)
r.Get("/quick/Marshal.4.8/{filename}", rubygems.ServePackageSpecification)
r.Get("/gems/{filename}", rubygems.DownloadPackageFile)
r.Get("/info/{packagename}", rubygems.GetPackageInfo)
r.Get("/versions", rubygems.GetAllPackagesVersions)
r.Group("/api/v1/gems", func() {
r.Post("/", rubygems.UploadPackageFile)
r.Delete("/yank", rubygems.DeletePackage)