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
+10
View File
@@ -243,6 +243,16 @@ index = "sparse+${proxy}/"`,
},
];
case 'gems':
return [
{
title: 'Use this remote as the RubyGems source',
language: 'bash',
code: `gem sources --clear-all --add ${proxy}/
bundle config mirror.https://rubygems.org ${proxy}`,
},
];
case 'nuget':
return [
{
+1
View File
@@ -18,6 +18,7 @@ const typeColors: Record<string, 'blue' | 'green' | 'yellow' | 'red' | 'default'
terraform: 'blue',
goproxy: 'green',
cargo: 'yellow',
gems: 'red',
nuget: 'blue',
};
+1
View File
@@ -18,6 +18,7 @@ const typeColors: Record<string, 'blue' | 'green' | 'yellow' | 'red' | 'default'
terraform: 'blue',
goproxy: 'green',
cargo: 'yellow',
gems: 'red',
nuget: 'blue',
};