An enhanced rubygems server
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
features
lib
tmp
.gitignore
.gitmodules
Gemfile
README.md
Rakefile
config.ru.example
rubygems-source.gemspec

README.md

rubygems-source travis-ci

rubygems-source is a remote source server for Rubygems that implements the core Rubygems gem source web API.

Use it to host private or local dev gem servers.

Usage

Start yr server

Create a config.ru like this (there's an example config.ru.example included):

require "rubygems-source"       

Rubygems::Source::App.public_folder = "/var/gems/" # or wherever
run Rubygems::Source::App

And rack up the config.ru with passenger, thin, unicorn etc.

Ensure public_folder is writeable by the server user.

Adapt config.ru to install Rack middleware if you need HTTP authentication etc.

Configure yr rubygems

You need to configure rubygems wherever you want to use your new source server.

If you use Bundler, add it to the top of your Gemfiles:

source "http://gems.example.com"

To make the new source server available to your entire Rubygems installation:

$ gem sources --add http://gems.example.com

You can also add the new source to your .gemrcs directly.

You can now find and install gems from the new source server.

$ gem list -r mygem
$ gem install mygem

You can also push gems to the server. Be sure to specify the host.

$ gem push pkg/mygem-0.0.2.gem --host http://gems.example.com     

Check out rubygems-source-cli for some patches to gem yank and gem push so they work better with non-Rubygems.org sources.

Requirements

  • Rubygems

Install

  • gem install rubygems-source

or add it to your Gemfile:

  • gem "rubygems-source"

Development

Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.

Roadmap

  • authenticate gem admin actions via API key
  • implement gem dependency resolver
  • show HTML list of gems/versions/links to rdoc at /
  • remove Sintra dependency in favour of plain Rack for smaller footprint
  • support legacy index/spec format?

Testing

$ rake

Related projects

Author

Dave Nolan