Class Bundler::Definition
In: lib/bundler/definition.rb
Parent: Object

Methods

Included Modules

GemHelpers

Attributes

dependencies  [R] 
locked_deps  [R] 
platforms  [R] 
ruby_version  [R] 
sources  [R] 

Public Class methods

Given a gemfile and lockfile creates a Bundler definition

@param gemfile [Pathname] Path to Gemfile @param lockfile [Pathname,nil] Path to Gemfile.lock @param unlock [Hash, Boolean, nil] Gems that have been requested

  to be updated or true if all gems should be updated

@return [Bundler::Definition]

How does the new system work?

  • Load information from Gemfile and Lockfile
  • Invalidate stale locked specs
 * All specs from stale source are stale
 * All specs that are reachable only through a stale
   dependency are stale.
  • If all fresh dependencies are satisfied by the locked
 specs, then we can try to resolve locally.

@param lockfile [Pathname] Path to Gemfile.lock @param dependencies [Array(Bundler::Dependency)] array of dependencies from Gemfile @param sources [Array(Bundler::Source::Rubygems)] @param unlock [Hash, Boolean, nil] Gems that have been requested

  to be updated or true if all gems should be updated

@param ruby_version [Bundler::RubyVersion, nil] Requested Ruby Version

Public Instance methods

Resolve all the dependencies specified in Gemfile. It ensures that dependencies that have been already resolved via locked file and are fresh are reused when resolving dependencies

@return [SpecSet] resolved dependencies

used when frozen is enabled so we can find the bundler spec, even if (say) a git gem is not checked out.

For given dependency list returns a SpecSet with Gemspec of all the required dependencies.

 1. The method first resolves the dependencies specified in Gemfile
 2. After that it tries and fetches gemspec of resolved dependencies

@return [Bundler::SpecSet]

[Validate]