Class: Bundler::RubygemsIntegration::Future

### Home Classes Methods

### In Files

- lib/bundler/rubygems_integration.rb

### Parent

Bundler::RubygemsIntegration

### Methods

- #all_specs
- #build
- #fetch_all_remote_specs
- #fetch_specs
- #find_name
- #gem_from_path
- #stub_rubygems

### Files

- bundle
- bundle-config
- bundle-config.txt
- bundle-exec
- bundle-exec.txt
- bundle-install
- bundle-install.txt
- bundle-package
- bundle-package.txt
- bundle-platform
- bundle-platform.txt
- bundle-update
- bundle-update.txt
- bundle.txt
- gemfile.5.txt
- Executable
- Gemfile

### Class/Module Index

Quicksearch

- Bundler
- Bundler::BundlerError
- Bundler::CLI
- Bundler::Definition
- Bundler::DepProxy
- Bundler::Dependency
- Bundler::Deployment
- Bundler::Deprecate
- Bundler::DeprecatedError
- Bundler::Dsl
- Bundler::EndpointSpecification
- Bundler::Env
- Bundler::Environment
- Bundler::Fetcher
- Bundler::Fetcher::CertificateFailureError
- Bundler::Fetcher::FallbackError
- Bundler::Fetcher::SSLError
- Bundler::GemHelper
- Bundler::GemHelpers
- Bundler::GemInstaller
- Bundler::GemNotFound
- Bundler::GemfileError
- Bundler::GemfileNotFound
- Bundler::GemspecError
- Bundler::GitError
- Bundler::Graph
- Bundler::Graph::GraphVizClient
- Bundler::HTTPError
- Bundler::Index
- Bundler::Injector
- Bundler::InstallError
- Bundler::InstallHookError
- Bundler::Installer
- Bundler::InvalidOption
- Bundler::InvalidSpecSet
- Bundler::LazySpecification
- Bundler::LockfileError
- Bundler::LockfileParser
- Bundler::MarshalError
- Bundler::MatchPlatform
- Bundler::PathError
- Bundler::ProductionError
- Bundler::RemoteSpecification
- Bundler::Resolver
- Bundler::Resolver::SpecGroup
- Bundler::RubyDsl
- Bundler::RubyVersion
- Bundler::RubyVersionMismatch
- Bundler::RubygemsIntegration
- Bundler::RubygemsIntegration::AlmostModern
- Bundler::RubygemsIntegration::Ancient
- Bundler::RubygemsIntegration::Future
- Bundler::RubygemsIntegration::Gem
- Bundler::RubygemsIntegration::Gem::SourceIndex
- Bundler::RubygemsIntegration::Legacy
- Bundler::RubygemsIntegration::Modern
- Bundler::RubygemsIntegration::Transitional
- Bundler::Runtime
- Bundler::SecurityError
- Bundler::Settings
- Bundler::SharedHelpers
- Bundler::SimilarityDetector
- Bundler::Source
- Bundler::Source::Git
- Bundler::Source::Git::GitProxy
- Bundler::Source::Path
- Bundler::Source::Path::Installer
- Bundler::Source::Rubygems
- Bundler::SpecSet
- Bundler::SystemRubyVersion
- Bundler::UI
- Bundler::UI::RGProxy
- Bundler::UI::Shell
- Bundler::VersionConflict
- Gem
- Gem::Dependency
- Gem::Platform
- Gem::Requirement
- Gem::Specification
- Object

No matching classes.

# 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.