class Bundler::RemoteSpecification

full specification will only be fetched when necesary.
be seeded with what we’re given from the source’s abbreviated index - the
is on the source server in rubygems’ “quick” index. The proxy object is to
Represents a lazily loaded gem specification, where the full specification

def __swap__(spec)

be swapped out.
once the remote gem is donwloaded, the backend specification will
Because Rubyforge cannot be trusted to provide valid specifications
def __swap__(spec)
  @specification = spec
end

def _remote_specification

def _remote_specification
  @specification ||= begin
    deflated = Gem::RemoteFetcher.fetcher.fetch_path(_remote_uri)
    inflated = Gem.inflate(deflated)
    Marshal.load(inflated)
  end
end

def _remote_uri

def _remote_uri
  # "#{@source_uri}/quick/Marshal.4.8/#{@name}-#{@version}.gemspec.rz"
  tuple = [@name, @version, @platform]
  tuple = tuple - [nil, 'ruby', '']
  "#{@source_uri}/quick/Marshal.4.8/#{tuple.join("-")}.gemspec.rz"
end

def full_name

def full_name
  if platform == Gem::Platform::RUBY or platform.nil? then
    "#{@name}-#{@version}"
  else
    "#{@name}-#{@version}-#{platform}"
  end
end

def initialize(name, version, platform, source_uri)

def initialize(name, version, platform, source_uri)
  @name     = name
  @version  = version
  @platform = platform
  @source_uri = source_uri
end

def method_missing(method, *args, &blk)

def method_missing(method, *args, &blk)
  _remote_specification.send(method, *args, &blk)
end