lib/bundler/source/rubygems.rb in bundler-1.8.0 vs lib/bundler/source/rubygems.rb in bundler-1.8.1

- old
+ new

@@ -3,12 +3,14 @@ require 'rubygems/spec_fetcher' module Bundler class Source class Rubygems < Source - # threshold for switching back to the modern index instead of fetching every spec - API_REQUEST_LIMIT = 100 + # Use the API when installing less than X gems + API_REQUEST_LIMIT = 500 + # Ask for X gems per API request + API_REQUEST_SIZE = 50 attr_reader :remotes, :caches def initialize(options = {}) @options = options @@ -147,9 +149,12 @@ end raise GemNotFound, "Missing gem file '#{spec.full_name}.gem'." unless cached_path return if File.dirname(cached_path) == Bundler.app_cache.to_s Bundler.ui.info " * #{File.basename(cached_path)}" FileUtils.cp(cached_path, Bundler.app_cache(custom_path)) + rescue Errno::EACCES => e + Bundler.ui.debug(e) + raise InstallError, e.message end def cached_built_in_gem(spec) cached_path = cached_path(spec) if cached_path.nil?