class ChefCLI::PolicyfileLock
def canonical_revision_string
a particular revision of a PolicyfileLock. It should not be used as a
This format is intended to be used only for generating an identifier for
in the PolicyfileLock's canonical_revision_string.
switching to a github fork at the same revision) will not cause a change
options in a `Policyfile.rb` that yields identical code (such as
included in this format; for example, a modification to the source
that modifies the behavior of a chef-client using the lockfile is
format suitable for generating a checksum of the lock itself. Only data
Generates a string representation of the lock data in a specialized
def canonical_revision_string canonical_rev_text = "" canonical_rev_text << "name:#{name}\n" run_list.each do |item| canonical_rev_text << "run-list-item:#{item}\n" end named_run_lists.each do |name, run_list| run_list.each do |item| canonical_rev_text << "named-run-list:#{name};run-list-item:#{item}\n" end end cookbook_locks_for_lockfile.each do |name, lock| canonical_rev_text << "cookbook:#{name};id:#{lock["identifier"]}\n" end canonical_rev_text << "default_attributes:#{canonicalize(default_attributes)}\n" canonical_rev_text << "override_attributes:#{canonicalize(override_attributes)}\n" canonical_rev_text end