From 5b02356d9c401f730fb7e728a2a303d51be0227e Mon Sep 17 00:00:00 2001
From: Katsuya Hidaka <hidakatsuya@gmail.com>
Date: Mon, 23 Sep 2024 02:43:36 +0900
Subject: [PATCH] Update MiniMagick to v5.0.1

---
 Gemfile                      | 2 +-
 lib/redmine/helpers/gantt.rb | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Gemfile b/Gemfile
index 544aa16f0..46eeb9276 100644
--- a/Gemfile
+++ b/Gemfile
@@ -41,7 +41,7 @@ end
 
 # Optional gem for exporting the gantt to a PNG file
 group :minimagick do
-  gem 'mini_magick', '~> 4.13.0'
+  gem 'mini_magick', '~> 5.0.1'
 end
 
 # Optional Markdown support
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index c2fc285a7..1172c3d8c 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -394,11 +394,11 @@ module Redmine
         font_path =
           Redmine::Configuration['minimagick_font_path'].presence ||
             Redmine::Configuration['rmagick_font_path'].presence
-        img = MiniMagick::Image.create(".#{format}", false)
+        img = MiniMagick::Image.create(".#{format}")
         if Redmine::Configuration['imagemagick_convert_command'].present?
           MiniMagick.cli_path = File.dirname(Redmine::Configuration['imagemagick_convert_command'])
         end
-        MiniMagick::Tool::Convert.new do |gc|
+        MiniMagick.convert do |gc|
           gc.size('%dx%d' % [subject_width + g_width + 1, height])
           gc.xc('white')
           gc.font(font_path) if font_path.present?
-- 
2.45.2

