Method: Berkshelf::Berksfile#install
- Defined in:
- lib/berkshelf/berksfile.rb
#install ⇒ Array<CachedCookbook>
Install the dependencies listed in the Berksfile, respecting the locked versions in the Berksfile.lock.
-
Check that a lockfile exists. If a lockfile does not exist, all dependencies are considered to be “unlocked”. If a lockfile is specified, a definition is created via the following algorithm:
-
For each source, see if there exists a locked version that still satisfies the version constraint in the Berksfile. If there exists such a source, remove it from the list of unlocked sources. If not, then either a version constraint has changed, or a new source has been added to the Berksfile. In the event that a locked_source exists, but it no longer satisfies the constraint, this method will raise a OutdatedCookbookSource, and inform the user to run
berks update COOKBOOKto remedy the issue. -
Remove any locked sources that no longer exist in the Berksfile (i.e. a cookbook source was removed from the Berksfile).
-
-
Resolve the collection of locked and unlocked dependencies.
-
Write out a new lockfile.
404 405 406 |
# File 'lib/berkshelf/berksfile.rb', line 404 def install Installer.new(self).run end |