class Bundler::PubGrub::BasicPackageSource

def initialize

def initialize
  @root_package = Package.root
  @root_version = Package.root_version
  @cached_versions = Hash.new do |h,k|
    if k == @root_package
      h[k] = [@root_version]
    else
      h[k] = all_versions_for(k)
    end
  end
  @sorted_versions = Hash.new { |h,k| h[k] = @cached_versions[k].sort }
  @version_indexes = Hash.new { |h,k| h[k] = @cached_versions[k].each.with_index.to_h }
  @cached_dependencies = Hash.new do |packages, package|
    if package == @root_package
      packages[package] = {
        @root_version => root_dependencies
      }
    else
      packages[package] = Hash.new do |versions, version|
        versions[version] = dependencies_for(package, version)
      end
    end
  end
end