-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade minimagick 5 #132
Upgrade minimagick 5 #132
Conversation
Can we get this merged? |
``` [MiniMagick] MiniMagick::Image#mime_type has been deprecated, because it wasn't returning correct result for all formats ImageMagick supports. Unfortunately, returning the correct MIME type would be very slow, because it would require ImageMagick to read the whole file. It's better to use Marcel and MimeMagic gems, which are able to determine the MIME type just from the image header. ``` This method is removed in v5 of `mini_magick` gem: > Removed deprecated Image#mime_type, as it wasn't accurate. > MIME type from file content should be determined either using Marcel > or MimeMagic, or mime-types or MiniMime using Image#type. Since we depend on it through `image_processing` gem (`mini_magick (>= 4.9.5, < 5)`), while work is being done in janko/image_processing#132 so sooner or later this test will fail.
I'd very much like this to be merged |
I'll try to get this merged this week, thanks for the work. |
``` [MiniMagick] MiniMagick::Image#mime_type has been deprecated, because it wasn't returning correct result for all formats ImageMagick supports. Unfortunately, returning the correct MIME type would be very slow, because it would require ImageMagick to read the whole file. It's better to use Marcel and MimeMagic gems, which are able to determine the MIME type just from the image header. ``` This method is removed in v5 of `mini_magick` gem: > Removed deprecated Image#mime_type, as it wasn't accurate. > MIME type from file content should be determined either using Marcel > or MimeMagic, or mime-types or MiniMime using Image#type. Since we depend on it through `image_processing` gem (`mini_magick (>= 4.9.5, < 5)`), while work is being done in janko/image_processing#132 so sooner or later this test will fail.
@janko do you need someone to test this further? I had this running in a development stack for some time without issues. |
Released 1.14.0 with this change 🚀 |
Using just the specs as a guide, this seems like a fairly minimal set of changes that would permit support for minimagick 5, addressing all deprecation warnings.
It also introduces distinct gemfiles for minimagick v4 and v5 which could both be run in CI. I have not yet modified the Github actions yaml to do that, but should be pretty easy to do.
A couple specs are still failing, related to the
strip
command, but I figured it would be worth posting this to see if it seems like the right direction before spending more time on it.