Skip to content

Commit

Permalink
use bundler monkey patch from nexus gem to provide mirror support for…
Browse files Browse the repository at this point in the history
… bundler
  • Loading branch information
mkristian committed Jan 24, 2013
1 parent 6e03aaa commit 65ba17f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions bin/jbundle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,23 @@ else
include JBundler::Lazy
end

require 'jbundler/config'
config = JBundler::Config.new
begin
if config.rubygems_mirror
ENV['BUNDLE_MIRROR__HTTP://RUBYGEMS.ORG'] = config.rubygems_mirror
ENV['BUNDLE_MIRROR__HTTPS://RUBYGEMS.ORG'] = config.rubygems_mirror

begin
load Gem.bin_path('nexuss', 'nbundle')
rescue Gem::GemNotFoundException
warn ''
warn 'to use a rubygems mirror you need to install the nexus gem'
warn ' $ gem install nexus'
warn ''
warn 'rubygems mirror ignored !'
end
end
load Gem.bin_path('bundler', 'bundle')
rescue Exception
if ARGV[0] == 'console'
Expand Down

0 comments on commit 65ba17f

Please sign in to comment.