class Bundler::RubygemsIntegration::Legacy

def stub_rubygems(specs)

def stub_rubygems(specs)
  # Rubygems versions lower than 1.7 use SourceIndex#from_gems_in
  source_index_class = (class << Gem::SourceIndex ; self ; end)
  source_index_class.send(:define_method, :from_gems_in) do |*args|
    source_index = Gem::SourceIndex.new
    source_index.spec_dirs = *args
    source_index.add_specs(*specs)
    source_index
  end
end