Deprecation Warning about Gem.source_index.all_gems #1151

mikehoward opened this Issue May 6, 2011 · 1 comment


None yet

2 participants


bundler 1.0.13 & rubygems 1.7.2 issues annoying Deprecation warning when calling 'all_specs' .

rubygems 1.7.2 does not respond_to? :all=, so traps to RubygemsIntegration::Transitional - which calls Gem.source_index.all_gems.values.

This patch fixes it:

diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 57ef1b9..e63e4ef 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -265,6 +265,10 @@ module Bundler
       def stub_rubygems(specs)
+      def all_specs
+ { |x| x[1] }
+      end


two tests fail, but I don't think they are significant:

  1. bundle install with git sources catches git errors and spits out useful output
    Failure/Error: err.should include("fatal: The remote end hung up unexpectedly")
    expected "fatal: repository 'omgomg' does not exist" to include "fatal: The remote end hung up unexpectedly"

  2. bundle help simply outputs the txt file when there is no groff on the path
    Failure/Error: out.should =~ /BUNDLE-INSTALL/
    expected: /BUNDLE-INSTALL/
    got: "" (using =~)
    @@ -1,2 +1 @@


Fixed by 9ad9d00.

@indirect indirect closed this May 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment