Class Chef::CookbookSynchronizer
In: lib/chef/cookbook/synchronizer.rb
Parent: Object

Synchronizes the locally cached copies of cookbooks with the files on the server.

Methods

Constants

EAGER_SEGMENTS = Chef::CookbookVersion::COOKBOOK_SEGMENTS.dup

Public Class methods

Public Instance methods

Iterates over cached cookbooks’ files, removing files belonging to cookbooks that don‘t appear in cookbook_hash

Unconditionally download the file from the given URL. File will be downloaded to the path destination which is relative to the Chef file cache root.

Marks the given file as valid (non-stale).

Sync the eagerly loaded files contained by cookbook

Arguments

cookbook<Chef::Cookbook>:The cookbook to update
valid_cache_entries<Hash>:Out-param; Added to this hash are the files that

were referred to by this cookbook

 Synchronizes all the cookbooks from the chef-server.

)

 === Returns
 true:: Always returns true

Sync an individual file if needed. If there is an up to date copy locally, nothing is done.

Arguments

file_manifest::A Hash of the form {"path" => ‘relative/path’, "url" => "location to fetch the file"}

Returns

Path to the cached file as a String

[Validate]