# File lib/rails-installer.rb, line 554 def sha1_hash_directory_tree(directory, prefix='', hash={}) Dir.entries(directory).each do |file| next if file =~ /^\./ pathname = File.join(directory,file) if File.directory?(pathname) sha1_hash_directory_tree(pathname, File.join(prefix,file), hash) else hash[File.join(prefix,file)] = Digest::SHA1.hexdigest(File.read(pathname)) end end hash end