• Stars
    star
    268
  • Rank 147,472 (Top 3 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 14 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The `gem mirror` RubyGems command, creates local mirrors of all gems from a remote gem source.

rubygems-mirror

github.com/rubygems/rubygems-mirror

<img src=“https://badge.fury.io/rb/rubygems-mirror.svg” alt=“Gem Version” />

DESCRIPTION:

This is an update to the old ‘gem mirror` command. It uses net/http/persistent and threads to grab the mirror set a little faster than the original. Eventually it will replace `gem mirror` completely. Right now the API is not completely stable (it will change several times before release); however, I will maintain stability in master.

FEATURES/PROBLEMS:

  • Fast mirroring

  • Limited tests - just functional

REQUIREMENTS:

  • rubygems

  • net/http/persistent

  • builder

  • webrick

USAGE

  • In a file at ~/.gem/.mirrorrc add a config that looks like the following:

    ---
    - from: http://rubygems.org
      to: /data/rubygems
      parallelism: 10
      retries: 3
      delete: false
      skiperror: true
      hashdir: false
  • Either install the gem, then run ‘gem mirror`, or

  • Clone then run ‘rake mirror:update`

  • With the environment variable ‘RUBYGEMS_MIRROR_ONLY_LATEST=TRUE`, rubygems-mirror fetches only the latest release of each gem

Apache configuration for hashdir

When rubygem-mirror is configured with hashdir: true, additional configuration for your web server will be required. Below are the Apache2 RewriteRules you may need:

RewriteEngine On

# Rubygem's URLs are:
# /gem/gems/foobar-1.0.0.gem
RewriteCond %{REQUEST_URI} ^/gem/gems/([^/])([^/])([^/]*)
RewriteCond %{DOCUMENT_ROOT}/gem/gems/$1/$1$2/ -d
RewriteRule ^/gem/gems/([^/])([^/])([^/]*)?$ /gem/gems/$1/$1$2/$1$2$3 [L]

# Rubygem's URLs are:
# /gem/quick/Marshal.4.8/foobar-1.0.0.gemspec.rz
RewriteCond %{REQUEST_URI} ^/gem/quick/([^/]+)/([^/])([^/])([^/]*)
RewriteCond %{DOCUMENT_ROOT}/gem/quick/$1/$2/$2$3/ -d
RewriteRule ^/gem/quick/([^/]+)/([^/])([^/])([^/]*)?$ /gem/quick/$1/$2/$2$3/$2$3$4 [L]

INSTALL:

  • gem install rubygems-mirror

RESOURCES

LICENSE:

(The MIT License)

Copyright © 2010 James Tucker, The RubyGems Team

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

bundler

Manage your Ruby application's gem dependencies
Ruby
4,865
star
2

rubygems

Library packaging and distribution for Ruby.
Ruby
3,401
star
3

rubygems.org

The Ruby community's gem hosting service.
Ruby
2,209
star
4

gemstash

A RubyGems.org cache and private gem server
Ruby
736
star
5

guides

An effort to provide awesome documentation for the RubyGems ecosystem.
SCSS
149
star
6

gems

Ruby wrapper for the RubyGems.org API
Ruby
124
star
7

bundler-site

The Bundler documentation website
Haml
108
star
8

rubygems-aws

DEPRECATED: Chef repo for running RubyGems.org on AWS.
Ruby
102
star
9

gemcutter

The gemcutter gem, the rails app has been moved to http://github.com/rubygems/rubygems.org
Ruby
65
star
10

rubygems-test

An attempt to replace the testing facility in rubygems via a test plugin.
Ruby
48
star
11

bundler-api

Bundler 1.1+ API
Ruby
46
star
12

rubygems-chef

The new RubyGems.org infrastructure.
Perl
41
star
13

rfcs

RubyGems + Bundler RFCs
40
star
14

rubygems-status

DEPRECATED 1/7/2016 A simple rails app to show the status of rubygems.org infrastructure
CSS
37
star
15

ruby-ssl-check

Ruby
34
star
16

rubygems.org-configs

The config files used to run rubygems.org
Ruby
30
star
17

bundler-features

Bundler feature requests and discussion
28
star
18

rubygems.github.io

the blog, for rubygems!
SCSS
20
star
19

bundler-compose

A bundler plugin to allow composing new gems into an existing bundle
Ruby
18
star
20

adoption-center

The RubyGems Adoption Center - RGSoC 2015
HTML
17
star
21

gemx

Ruby
15
star
22

bundler-graph

Ruby
14
star
23

new-index

Prototype and documentation of the new gem index format
Ruby
12
star
24

postit

A Bundler Version Manager
Ruby
11
star
25

rubygems-server

Ruby
10
star
26

rubygems-verification

Tools and data used to verify gems on rubygems.org
Ruby
10
star
27

compact_index

implements the response logic for the compact index format and to manage the versions file
Ruby
8
star
28

cacache-rb

Ruby
7
star
29

install

A simple remote eval installer with tarball unpacker (the easy way to install/update RubyGems)
Ruby
7
star
30

shipit

Ruby
6
star
31

stat-update

A very fast libev+libebb+hiredis server to update rubygems stats on the fly
C
6
star
32

meg

Quick commands to help administer and support RubyGems.org.
Shell
6
star
33

contribute

One site to show all related RubyGems ecosystem projects and help developers get involved
Ruby
6
star
34

bundlerbot

A bot that loves to help
JavaScript
5
star
35

bundler.github.io

The Bundler website, generated by https://github.com/rubygems/bundler-site
HTML
5
star
36

docs

RubyGems Manuals.
Ruby
5
star
37

search

DEPRECATED
Ruby
3
star
38

issue-triage

issue triage bot
Ruby
3
star
39

rubygems.org-backup

This is a BACKUP repo for rubygems.org before the history rewrite. Do not use. No pull requests please.
Ruby
3
star
40

rubygems.org-vendor

Submodule cache of gems to make RubyGems.org development easier!
3
star
41

rubygems-lita

A Lita chat bot for RubyGems/Bundler
Ruby
2
star
42

bundler-changelog

Ruby
1
star
43

compact_index_client

Ruby
1
star
44

apt-tools

Scripts for managing the apt repositories used for RubyGems.org machines.
Shell
1
star
45

bundler-gem

The Bundler gem creator
1
star
46

configure-rubygems-credentials

Configure rubygems.org credential environment variables for use in other GitHub Actions.
TypeScript
1
star
47

bundler-slackin

The Bundler Slack inviter
JavaScript
1
star