Add gems remote type for RubyGems (#142)
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful

Ruby builds fetch gems from rubygems.org directly because artifactapi has no RubyGems remote type.

- add `gems` package type proxying `https://rubygems.org`-style sources
- treat `versions`, `names`, `info/*` and `*specs.4.8.gz` as mutable, `gems/*.gem` and `quick/Marshal.4.8/*.gemspec.rz` as immutable
- serve `api/v1/*.json` as `application/json`
- add a gem/bundler usage snippet to the UI and a gems e2e caching case

Requires unkin/artifactapi#148 (HEAD route; RubyGems probes `HEAD /versions`).

Reviewed-on: #142
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
This commit was merged in pull request #142.
This commit is contained in:
2026-10-17 13:19:01 +11:00
committed by BenVincent
parent 7769902530
commit 9387bce560
12 changed files with 143 additions and 1 deletions
+2
View File
@@ -17,6 +17,7 @@ const (
PackageTerraform PackageType = "terraform"
PackageGoProxy PackageType = "goproxy"
PackageCargo PackageType = "cargo"
PackageGems PackageType = "gems"
PackageNuGet PackageType = "nuget"
PackageGitHubRPM PackageType = "github_rpm"
PackageGitHubDeb PackageType = "github_deb"
@@ -36,6 +37,7 @@ var validPackageTypes = map[PackageType]bool{
PackageTerraform: true,
PackageGoProxy: true,
PackageCargo: true,
PackageGems: true,
PackageNuGet: true,
PackageGitHubRPM: true,
PackageGitHubDeb: true,
+1
View File
@@ -19,6 +19,7 @@ func TestPackageTypeValid(t *testing.T) {
models.PackageTerraform,
models.PackageGoProxy,
models.PackageCargo,
models.PackageGems,
models.PackageNuGet,
models.PackageGitHubRPM,
models.PackageGitHubDeb,