Class/Module Index [+]

Quicksearch

Bundler::RubygemsIntegration::Future

Rubygems 2.0

Public Instance Methods

all_specs() click to toggle source
# File lib/bundler/rubygems_integration.rb, line 444
def all_specs
  Gem::Specification.to_a
end
build(spec) click to toggle source
# File lib/bundler/rubygems_integration.rb, line 484
def build(spec)
  require 'rubygems/package'
  Gem::Package.build(spec)
end
fetch_all_remote_specs() click to toggle source
# File lib/bundler/rubygems_integration.rb, line 461
def fetch_all_remote_specs
  # Since SpecFetcher now returns NameTuples, we just fetch directly
  # and unmarshal the array ourselves.
  hash = {}

  Gem.sources.each do |source|
    source = URI.parse(source.to_s) unless source.is_a?(URI)
    hash[source] = fetch_specs(source, "specs")

    pres = fetch_specs(source, "prerelease_specs")
    hash[source].push(*pres) if pres && !pres.empty?
  end

  hash
end
fetch_specs(source, name) click to toggle source
# File lib/bundler/rubygems_integration.rb, line 452
def fetch_specs(source, name)
  path = source + "#{name}.#{Gem.marshal_version}.gz"
  string = Gem::RemoteFetcher.fetcher.fetch_path(path)
  Bundler.load_marshal(string)
rescue Gem::RemoteFetcher::FetchError => e
  # it's okay for prerelease to fail
  raise e unless name == "prerelease_specs"
end
find_name(name) click to toggle source
# File lib/bundler/rubygems_integration.rb, line 448
def find_name(name)
  Gem::Specification.find_all_by_name name
end
gem_from_path(path, policy = nil) click to toggle source
# File lib/bundler/rubygems_integration.rb, line 477
def gem_from_path(path, policy = nil)
  require 'rubygems/package'
  p = Gem::Package.new(path)
  p.security_policy = policy if policy
  return p
end
stub_rubygems(specs) click to toggle source
# File lib/bundler/rubygems_integration.rb, line 436
def stub_rubygems(specs)
  Gem::Specification.all = specs

  Gem.post_reset {
    Gem::Specification.all = specs
  }
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.