Skip to content

Commit

Permalink
Improve md5 checksum calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilja Bobkevic committed May 18, 2015
1 parent 5863c92 commit e6444fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet_forge_server/backends/directory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_file_metadata(file_name, options)
Dir["#{@module_dir}/**/#{file_name}"].map do |path|
{
:metadata => parse_dependencies(PuppetForgeServer::Models::Metadata.new(read_metadata(path))),
:checksum => options[:with_checksum] == true ? Digest::MD5.hexdigest(File.read(path)) : nil,
:checksum => options[:with_checksum] == true ? Digest::MD5.file(path).hexdigest : nil,
:path => "/#{Pathname.new(path).relative_path_from(Pathname.new(@module_dir))}"
}
end
Expand Down

0 comments on commit e6444fe

Please sign in to comment.