lib/omnibus/digestable.rb
def digest(path, type = :md5)
      digest = digest_from_type(type)

      update_with_file_contents(digest, path)
      digest.hexdigest
    end
def digest(path, type = :md5)
      digest = digest_from_type(type)

      update_with_file_contents(digest, path)
      digest.hexdigest
    end
Calculate the digest of the file at the given path. Files are read in
 binary chunks to prevent Ruby from exploding.

 @param [String] path
   the path of the file to digest
 @param [Symbol] type
   the type of digest to use

 @return [String]
   the hexdigest of the file at the path