class Bundler::Fetcher::CompactIndex
def compact_index_client
def compact_index_client @compact_index_client ||= begin compact_fetcher = lambda do |path, headers| downloader.fetch(fetch_uri + path, headers) end SharedHelpers.filesystem_access(cache_path) do CompactIndexClient.new(cache_path, compact_fetcher) end.tap do |client| client.in_parallel = lambda do |inputs, &blk| func = lambda {|object, _index| blk.call(object) } worker_name = "Compact Index (#{display_uri.host})" worker = Bundler::Worker.new(25, worker_name, func) inputs.each {|input| worker.enq(input) } inputs.map { worker.deq } end end end end