oneops-admin/lib/shared/cookbooks/artifact/providers/deploy.rb
def generate_manifest(files_path)
    Chef::Log.info "artifact_deploy[generate_manifest] Generating manifest for files in #{files_path}"
    files_in_release_path = Dir[::File.join(files_path, "**/*")].reject { |file| ::File.directory?(file) || file =~ /manifest.yaml/ || Chef::Artifact.symlink?(file) }

    {}.tap do |map|
      files_in_release_path.each { |file| map[file] = Digest::SHA1.file(file).hexdigest }
    end
  end
# Generates a manifest for all the files underneath the given files_path. SHA1 digests will be
# generated for all files under the given files_path with the exception of directories and the 
# manifest.yaml file itself.
# 
# @param  files_path [String] a path to the files that a manfiest will be generated for
# 
# @return [Hash] a mapping of file_path => SHA1 of that file
Generates a manifest for all the files underneath the given files_path. SHA1 digests will be
generated for all files under the given files_path with the exception of directories and the
manifest.yaml file itself.
Generates a manifest for all the files underneath the given files_path . SHA1 digests will be generated for all files under the given files_path with the exception of directories and the manifest . yaml file itself .
def generate_manifest(files_path)
    Chef::Log.info "artifact_deploy[generate_manifest] Generating manifest for files in #{files_path}"
    files_in_release_path = Dir[::File.join(files_path, "**/*")].reject { |file| ::File.directory?(file) || file =~ /manifest.yaml/ || Chef::Artifact.symlink?(file) }
    {}.tap do |map|
      files_in_release_path.each { |file| map[file] = Digest::SHA1.file(file).hexdigest }
    end
  end
def generate_manifest ( files_path ) Chef :: Log . info "artifact_deploy[generate_manifest] Generating manifest for files in #{files_path}" files_in_release_path = Dir [ :: File . join ( files_path , "**/*" ) ] . reject { | file | :: File . directory? ( file ) || file =~ / manifest.yaml / || Chef :: Artifact . symlink? ( file ) } { } . tap do | map | files_in_release_path . each { | file | map [ file ] = Digest :: SHA1 . file ( file ) . hexdigest } end end
Generates a manifest for all the files underneath the given files_path.
Generates a manifest for all the files underneath the given files_path .
a mapping of file_path => SHA1 of that file
a mapping of file_path = > SHA1 of that file
Hash
files_path
a path to the files that a manfiest will be generated for
a path to the files that a manfiest will be generated for