Add local gems repositories
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful

Serve gem push/yank and the compact index from local gems repos.
This commit is contained in:
2026-10-18 00:39:16 +11:00
parent 2c671a1be7
commit 38641983e7
10 changed files with 1206 additions and 3 deletions
+20 -1
View File
@@ -2,7 +2,26 @@ import type { PackageTypeUI } from '../types';
const def: PackageTypeUI = {
color: 'red',
snippets: ({ proxy }) => {
snippets: ({ name, url, proxy, isLocal }) => {
if (isLocal) {
const src = `${url}/api/v1/local/${name}`;
return [
{
title: 'Push and yank',
language: 'bash',
code: `GEM_HOST_API_KEY=unused gem push --host ${src} <gem>-<version>.gem
GEM_HOST_API_KEY=unused gem yank <gem> -v <version> --host ${src}`,
note: 'gem push needs an API key; any value works. Pushing an existing version is rejected.',
},
{
title: 'Install',
language: 'bash',
code: `gem install <gem> --source ${src}/
# Gemfile
source "${src}/"`,
},
];
}
return [
{
title: 'Use this remote as the RubyGems source',