Represents a lazily loaded gem specification, where the full specification is on the source server in rubygems’ “quick” index. The proxy object is to be seeded with what we’re given from the source’s abbreviated index - the full specification will only be fetched when necesary.
# File lib/bundler/remote_specification.rb, line 15 def initialize(name, version, platform, spec_fetcher) @name = name @version = version @platform = platform @spec_fetcher = spec_fetcher end
Because Rubyforge cannot be trusted to provide valid specifications once the remote gem is downloaded, the backend specification will be swapped out.
# File lib/bundler/remote_specification.rb, line 39 def __swap__(spec) @specification = spec end
Needed before installs, since the arch matters then and quick specs don’t bother to include the arch in the platform string
# File lib/bundler/remote_specification.rb, line 24 def fetch_platform @platform = _remote_specification.platform end
# File lib/bundler/remote_specification.rb, line 28 def full_name if platform == Gem::Platform::RUBY or platform.nil? then "#{@name}-#{@version}" else "#{@name}-#{@version}-#{platform}" end end