add mirror support. #2062

Closed
wants to merge 2 commits into
from

4 participants

@mkristian

each uri to a repository can be replaced by an mirror uri via the bundler configuration. add mirrors like this

bundle config mirror.http://rubygems.org http://localhost:8081/nexus/content/repositories/rubygems.org
@mkristian

I am currently working on some ruby support for nexus https://github.com/sonatype/nexus-ruby-support

this plugin allows to mirror/proxy the gem repository from rubygems.org - that works fine with gem command itself, just replace rubygems.org with the mirror with gem sources. but with bundler there is no way to use that nexus-proxy without changing the Gemfile. this patch allows to tell bundler to use a mirror-uri instead of the uri from the Gemfile. that works fine with current state of the nexus-plugin (via the full index fallback) with keeping the Gemfile as it is.

this patch is also useful for other project setting up an mirror of rubygems.org and for the nexus plugin it feels essential to be able to use bundler with mirrors/proxies.

any thoughts ?

@mkristian

hoops - no tests/specs. they will come !

@travisbot

This pull request passes (merged b31f8371 into 8acc82f).

@trhodeos

Recently started using the nexus rubygems proxy. It would be awesome to get this merged!

@indirect
Bundler member

@tylerrhodes want to write specs for it? :)

mkristian added some commits Aug 13, 2012
@mkristian mkristian add mirror support. each uri to a repository can be replaced by an
mirror uri via the bundler configuration. add mirrors like this
$ bundle config mirror.http://rubygems.org http://localhost:8081/nexus/content/repositories/rubygems.org
7f1f861
@mkristian mkristian specs for mirror config 06073a4
@mkristian

#2366 seems to be more "refined" to conventions. did not see it before I pushed my recent changes. but it would be nice to get the pull request in. currently I am using the monkey-patched version of bundler from https://github.com/sonatype/nexus-ruby-support/tree/master/nexus-gem - it is really hard to switch from "bundle install" to "nbundle install" (old habits die hard). the nexus gem proxy is getting close to a working state, too.

@mkristian

my specs fail on ruby18 - I stop this here in favour of #2366

@mkristian mkristian closed this Mar 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment