Add gems remote type for RubyGems (#142)
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:
@@ -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 [
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@ const typeColors: Record<string, 'blue' | 'green' | 'yellow' | 'red' | 'default'
|
||||
terraform: 'blue',
|
||||
goproxy: 'green',
|
||||
cargo: 'yellow',
|
||||
gems: 'red',
|
||||
nuget: 'blue',
|
||||
};
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ const typeColors: Record<string, 'blue' | 'green' | 'yellow' | 'red' | 'default'
|
||||
terraform: 'blue',
|
||||
goproxy: 'green',
|
||||
cargo: 'yellow',
|
||||
gems: 'red',
|
||||
nuget: 'blue',
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user