Upgrading mini_magick 4 to 5
Breaking4.13.2 → 5.4.0Breaking12Platform1Deprecated1New5Changed8Fixed9
BreakingUpgrade verdict
12 breaking changes and a platform requirement change.
In plain terms
- GraphicsMagick is no longer officially supported. You can still use it by setting cli_prefix to "gm", but some features will not work.
- Two configuration options for choosing the command line tool and processor are gone.
- The old posix-spawn option for running commands is removed, along with its configuration setting.
- The run_command method on images no longer exists.
Must act Top 5 of 14 that need code or config changes
Ruby requirement changed in 5.3.0: >= 2.3 → >= 2.5.
What you must change
Breaking12
Removes official GraphicsMagick support; it can be used by setting cli_prefix, with some features unsupported.
cli_prefixMiniMagick.timeoutImage#dataImage#exifRemoves MiniMagick.cli and MiniMagick.processor configuration as a result of dropping GraphicsMagick support.
MiniMagick.cliMiniMagick.processorRemoves the deprecated posix-spawn shell backend and the MiniMagick.shell_api configuration.
posix-spawnMiniMagick.shell_apiRemoves the obsolete Image#run_command method.
Image#run_commandRemoves deprecated Image#mime_type; use Marcel, MimeMagic, mime-types or MiniMime with Image#type instead.
Image#mime_typeImage#typeRenames the MiniMagick.whiny configuration to MiniMagick.errors.
MiniMagick.whinyMiniMagick.errorsRemoves deprecated Image#details in favor of the more reliable Image#data.
Image#detailsImage#dataRemoves Image#respond_to_missing?, so Image#respond_to? returns false for ImageMagick option methods; also removes MiniMagick::Tool.option_methods and MiniMagick.reload_tools.
Image#respond_to_missing?Image#respond_to?MiniMagick::Tool.option_methodsMiniMagick.reload_toolsRemoves the obsolete MiniMagick.processor_path configuration, mostly an alias for MiniMagick.cli_path.
MiniMagick.processor_pathMiniMagick.cli_pathRemoves deprecated MiniMagick.debug in favor of MiniMagick.logger.level = Logger::DEBUG.
MiniMagick.debugMiniMagick.logger.levelLogger::DEBUGRemoves the unused MiniMagick.validate_on_write configuration.
MiniMagick.validate_on_writeAdditional Pathname#open or URI#open options for Image.open must now be passed as keyword arguments instead of a hash.
Image.openPathname#openURI#openPlatform1
Actually requires Ruby 2.5+ in the gemspec.
Deprecations to plan for
Deprecated1
Deprecates the MiniMagick::Tool::* classes in favor of the class-level interface.
MiniMagick::Tool::*