Only apply mimemagick fixes if it is defined which in the current situation is true for paperclip dependency

This commit is contained in:
2019-05-08 11:04:24 -05:00
parent c68d3d8b86
commit 9d06b6cf6c
+2
View File
@@ -76,6 +76,7 @@ module Dunlop
#FIXES
if defined?(MimeMagic)
#A CSV FILE STARTING WITH MZ IS RECOGNIZED AS X-MS-DOS-EXECUTABLE
# https://github.com/minad/mimemagic/issues/67
if mime_magic_ms_dos_index = MimeMagic::MAGIC.index{|r| r == ['application/x-ms-dos-executable', [[0, 'MZ']]]}
@@ -89,4 +90,5 @@ module Dunlop
end
end
end
end
end