#!/bin/sh # Build a minimal, hand-rolled RubyGems package and a full gem repository # index for it (legacy + compact index formats), for integration-testing # the `ruby` module of id-configurator. Uses RubyGems' own `gem build` and # `gem generate_index` (the same tools a real gem server host would use) # rather than hand-rolling the compact index's binary/marshal formats. set -eu PACKAGE=idconfiguratortestpkg VERSION=0.0.1 MARKER="test-only gem served by the id-configurator integration tests" gem install rubygems-generate_index --no-document mkdir -p "/build/${PACKAGE}-${VERSION}" cd "/build/${PACKAGE}-${VERSION}" cat > "${PACKAGE}.gemspec" < marker.txt gem build "${PACKAGE}.gemspec" mkdir -p /srv/gems cp ./*.gem /srv/gems/ gem generate_index -d /srv