class ChefCLI::Policyfile::Uploader

def cookbook_versions_to_upload

def cookbook_versions_to_upload
  cookbook_versions_for_policy.inject([]) do |versions_to_upload, cookbook_with_lock|
    cb = cookbook_with_lock.cookbook
    # When we abandon custom identifier support in favor of the one true
    # hash, identifier generation code can be moved into chef proper and
    # this can be removed.
    cb.identifier = cookbook_with_lock.lock.identifier
    versions_to_upload << cb unless remote_already_has_cookbook?(cb)
    versions_to_upload
  end
end