This method is only available on newer versions.
The first available version (v2_6_3) is shown here.
fetch_all_remote_specs(remote)
public
TODO: This is for older versions of RubyGems… should we support the
X-Gemfile-Source header on these old versions? Maybe the newer
implementation will work on older RubyGems? It seems difficult to keep this
implementation and still send the header.
# File lib/bundler/rubygems_integration.rb, line 270
def fetch_all_remote_specs(remote)
old_sources = Bundler.rubygems.sources
Bundler.rubygems.sources = [remote.uri.to_s]
# Fetch all specs, minus prerelease specs
spec_list = fetch_specs(true, false)
# Then fetch the prerelease specs
fetch_prerelease_specs.each {|k, v| spec_list[k].concat(v) }
spec_list.values.first
ensure
Bundler.rubygems.sources = old_sources
end