metadata: fix failure to get exif data for compressed SWF files.

Fix Exiftool not being able to get the metadata for compressed SWF
files. Exiftool requires Compress::Zlib as an optional dependency to
decompress compressed SWF files, but it wasn't in the Docker image.

Archive::Zip is required for Zip files and Digest::MD5 for certain other
metadata (see "DEPENDENCIES" in exiftool README).
This commit is contained in:
evazion
2021-09-15 18:28:54 -05:00
parent e16aa7b1c5
commit f359d44763
3 changed files with 18 additions and 5 deletions

View File

@@ -180,6 +180,16 @@ class MediaFileTest < ActiveSupport::TestCase
end
end
context "a compressed SWF file" do
should "get all the metadata" do
@metadata = MediaFile.open("test/files/compressed.swf").metadata
assert_equal(true, @metadata["Flash:Compressed"])
assert_not_equal("Install Compress::Zlib to extract compressed information", @metadata["ExifTool:Warning"])
assert_equal(6, @metadata.count)
end
end
context "a greyscale image without an embedded color profile" do
should "successfully generate a thumbnail" do
@image = MediaFile.open("test/files/test-grey-no-profile.jpg")