lib/spaceship/du/utilities.rb in spaceship-0.24.1 vs lib/spaceship/du/utilities.rb in spaceship-0.25.0
- old
+ new
@@ -68,8 +68,13 @@
res = video_info.match(/.* ([0-9]+)x([0-9]+),.*/)
raise "Unable to parse resolution information from #{video_info}" if res.count < 3
[res[1].to_i, res[2].to_i]
end
- module_function :content_type, :grab_video_preview, :portrait?, :resolution, :video_resolution
+ # @return (String) md5 checksum of given file
+ def md5digest(file_path)
+ Digest::MD5.hexdigest(File.read(file_path))
+ end
+
+ module_function :content_type, :grab_video_preview, :portrait?, :resolution, :video_resolution, :md5digest
end
end