diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-07-21 17:14:39 -0700 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-07-21 17:14:39 -0700 |
commit | f0a65fea6ba4907a181eae5ede77bc1d74fa7c78 (patch) | |
tree | 1b4704d810d87c0c186b3ee64784cf554a87a385 | |
parent | 627178865a1be31ff59473e01f1fb3634b904179 (diff) | |
download | bundler-f0a65fea6ba4907a181eae5ede77bc1d74fa7c78.tar.gz |
Shim Gem.refresh (fixes a bug involving unicorn)
-rw-r--r-- | lib/bundler/shared_helpers.rb | 1 | ||||
-rw-r--r-- | spec/runtime/setup_spec.rb | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index e15716b008..7bca421e1a 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -118,6 +118,7 @@ module Bundler # OMG more hacks gem_class = (class << Gem ; self ; end) + gem_class.send(:define_method, :refresh) { } gem_class.send(:define_method, :bin_path) do |name, *args| exec_name, *reqs = args diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index 8e53ce6ced..9e3dfdac36 100644 --- a/spec/runtime/setup_spec.rb +++ b/spec/runtime/setup_spec.rb @@ -369,4 +369,19 @@ describe "Bundler.setup" do out.should == "yay" end + it "ignores Gem.refresh" do + system_gems "rack-1.0.0" + + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "activesupport" + G + + run <<-R + Gem.refresh + puts Gem.source_index.find_name("rack").inspect + R + + out.should == "[]" + end end |