add mirror support. #2062

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
4 participants
@mkristian
Contributor

mkristian commented Aug 14, 2012

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

This comment has been minimized.

Show comment Hide comment
@mkristian

mkristian Aug 14, 2012

Contributor

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 ?

Contributor

mkristian commented Aug 14, 2012

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

This comment has been minimized.

Show comment Hide comment
@mkristian

mkristian Aug 14, 2012

Contributor

hoops - no tests/specs. they will come !

Contributor

mkristian commented Aug 14, 2012

hoops - no tests/specs. they will come !

@travisbot

This comment has been minimized.

Show comment Hide comment
@travisbot

travisbot Aug 14, 2012

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

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

@trhodeos

This comment has been minimized.

Show comment Hide comment
@trhodeos

trhodeos Feb 11, 2013

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

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

@indirect

This comment has been minimized.

Show comment Hide comment
@indirect

indirect Feb 11, 2013

Owner

@tylerrhodes want to write specs for it? :)

Owner

indirect commented Feb 11, 2013

@tylerrhodes want to write specs for it? :)

mkristian added some commits Aug 13, 2012

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
@mkristian

This comment has been minimized.

Show comment Hide comment
@mkristian

mkristian Mar 7, 2013

Contributor

#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](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.

Contributor

mkristian commented Mar 7, 2013

#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](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

This comment has been minimized.

Show comment Hide comment
@mkristian

mkristian Mar 7, 2013

Contributor

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

Contributor

mkristian commented Mar 7, 2013

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