diff --git a/carrierwave.gemspec b/carrierwave.gemspec index f069d1717..a437b8808 100644 --- a/carrierwave.gemspec +++ b/carrierwave.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |s| s.add_dependency "activesupport", ">= 6.0.0" s.add_dependency "activemodel", ">= 6.0.0" - s.add_dependency "image_processing", "~> 1.1" + s.add_dependency "image_processing", [">= 1.1", "< 3"] s.add_dependency "marcel", "~> 1.0.0" s.add_dependency "addressable", "~> 2.6" s.add_dependency "ssrf_filter", "~> 1.0" @@ -36,6 +36,7 @@ Gem::Specification.new do |s| s.add_development_dependency "fog-google", ["~> 1.7", "!= 1.12.1"] s.add_development_dependency "fog-local" s.add_development_dependency "mini_magick" + s.add_development_dependency "ruby-vips" if RUBY_ENGINE != 'jruby' && ENV['GITHUB_JOB'] != 'rubocop' s.add_development_dependency "rmagick", ">= 2.16" diff --git a/spec/processing/mini_magick_spec.rb b/spec/processing/mini_magick_spec.rb index 32517460a..4c82c1094 100644 --- a/spec/processing/mini_magick_spec.rb +++ b/spec/processing/mini_magick_spec.rb @@ -283,12 +283,11 @@ context "of being configured to use ImageMagick but failing to execute" do before do allow(MiniMagick).to receive(:processor).and_return(:magick) - allow(Open3).to receive(:capture3).and_raise(Errno::ENOENT) - allow_any_instance_of(MiniMagick::Shell).to receive(:execute_open3).and_raise(Errno::ENOENT) + allow_any_instance_of(MiniMagick::Shell).to receive(:execute).and_raise(Errno::ENOENT) end it "raises MiniMagick::Error" do - expect { instance.resize_to_limit(200, 200) }.to raise_exception(MiniMagick::Error) + expect { instance.resize_to_limit(200, 200) }.to raise_exception end end end @@ -332,8 +331,7 @@ context "on being configured to use ImageMagick but failing to execute" do before do allow(MiniMagick).to receive(:processor).and_return(:magick) - allow(Open3).to receive(:capture3).and_raise(Errno::ENOENT) - allow_any_instance_of(MiniMagick::Shell).to receive(:execute_open3).and_raise(Errno::ENOENT) + allow_any_instance_of(MiniMagick::Shell).to receive(:execute).and_raise(Errno::ENOENT) end after { MiniMagick.remove_instance_variable(:@processor) if MiniMagick.instance_variable_defined?(:@processor) } @@ -342,7 +340,7 @@ instance.manipulate! do |image| image.format('png') end - end.to raise_exception(minimagick_error) + end.to raise_exception end end end