From 84e5b61fcc19a95231f0b578321714ad3937e37b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janko=20Marohni=C4=87?= Date: Sat, 15 Jun 2024 23:19:48 +0200 Subject: [PATCH] Still support `-append` in MiniMagick --- lib/image_processing/mini_magick.rb | 6 +++++- test/mini_magick_test.rb | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/image_processing/mini_magick.rb b/lib/image_processing/mini_magick.rb index 416ddb5..6d1e1a5 100644 --- a/lib/image_processing/mini_magick.rb +++ b/lib/image_processing/mini_magick.rb @@ -157,7 +157,11 @@ def limits(options) # Appends a raw ImageMagick command-line argument to the command. def append(*args) - magick.merge! args + if args.empty? + magick.append + else + magick.merge! args + end end private diff --git a/test/mini_magick_test.rb b/test/mini_magick_test.rb index 123f511..6d82bf3 100644 --- a/test/mini_magick_test.rb +++ b/test/mini_magick_test.rb @@ -597,5 +597,10 @@ assert_similar expected, actual end + + it "still supports -append" do + result = ImageProcessing::MiniMagick.append("wizard:").append.call(@portrait) + assert_dimensions [600, 1440], result + end end end