A script that extends rubygems-mirror
to download only parts of Rubygems. It uses the bundler API to resolve all dependencies of the intended gems and completely mirrors those.
Run:
$ gem install gem-sparse-mirror
Like https://github.com/rubygems/rubygems-mirror, this reads .gems/mirrorrc
, with 2 additional attributes, only
and except
:
---
- from: http://rubygems.org/
to: /path/to/your/sync-directory
parallelism: 10
except:
- mail
only:
- rake
- rails
And then run:
$ gem-sparse-mirror
This will resolve all dependencies of rails
and rake
and sync all of them, but never sync mail
(for example, if you ship your own version).
This script syncs all versions of the found gems.
gem-sparse-mirror
does not create or update a gem index. This can be done using rubygems generate_index
command:
$ cd /path/to/your/sync-directory
$ gem generate_index --no-legacy --modern --update gems/
This does not supply a gem server. You will have to manage that server yourself.
MIT, see LICENSE.txt
To the rubygems team for running rubygems and implementing rubygems-mirror in the first place.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request