Project

gemgate

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Host a private gem repository at S3
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

~> 1.5.0
~> 1.3.2
 Project Readme

gemgate

Build Status

gemgate receives built gems and makes them available via S3.

Example use:

$ gem build foobar.gemspec #=> produces foobar-0.0.1.gem
$ curl -F file=@foobar-0.0.1.gem -u foo:bar https://gemgate.herokuapp.com/
$ gem sources -a https://gemgate.s3.amazonaws.com/deadbeef/
$ gem install foobar -v 0.0.1

Running locally

$ cp .env.sample .env
# edit .env
$ foreman start
$ curl -F file=@foobar-0.0.1.gem -u $GEMGATE_AUTH http://localhost:5000/
$ gem sources -a https://gemgate-development.s3.amazonaws.com/$S3_KEY_PREFIX
$ gem install foobar -v 0.0.1

Deployment on Heroku

$ heroku create gemgate-production -s cedar
$ heroku config:add -a gemgate-production \
  AWS_ACCESS_KEY_ID=... \
  AWS_SECRET_ACCESS_KEY=... \
  GEMGATE_AUTH=foo:bar \
  S3_BUCKET=... \
  S3_KEY_PREFIX=...
$ git push heroku master

Configuration

  • GEMGATE_AUTH: User and password to require for basic auth, joined by :
  • AWS_ACCESS_KEY_ID: The AWS access key to use when communicating with S3
  • AWS_SECRET_ACCESS_KEY: The AWS secret access key to use when communicating with S3
  • S3_BUCKET: Name of the S3 bucket to use
  • S3_KEY_PREFIX: Probably random string (eg created with openssl rand -hex 32) to prefix file/directory keys with. Mainly for security.

It's recommended you use IAM credentials with bucket-specific access for S3.