|
14 | 14 | it "applies imagemagick operations" do
|
15 | 15 | actual = ImageProcessing::MiniMagick.flip.call(@portrait)
|
16 | 16 | expected = Tempfile.new(["result", ".jpg"], binmode: true).tap do |tempfile|
|
17 |
| - MiniMagick::Tool::Convert.new do |cmd| |
| 17 | + ImageProcessing::MiniMagick.convert_shim do |cmd| |
18 | 18 | cmd << @portrait.path
|
19 | 19 | cmd.flip
|
20 | 20 | cmd << tempfile.path
|
|
37 | 37 | it "applies macro operations" do
|
38 | 38 | actual = ImageProcessing::MiniMagick.resize_to_limit(400, 400).call(@portrait)
|
39 | 39 | expected = Tempfile.new(["result", ".jpg"], binmode: true).tap do |tempfile|
|
40 |
| - MiniMagick::Tool::Convert.new do |cmd| |
| 40 | + ImageProcessing::MiniMagick.convert_shim do |cmd| |
41 | 41 | cmd << @portrait.path
|
42 | 42 | cmd.resize("400x400")
|
43 | 43 | cmd << tempfile.path
|
|
55 | 55 |
|
56 | 56 | it "accepts page" do
|
57 | 57 | tiff = Tempfile.new(["file", ".tiff"])
|
58 |
| - MiniMagick::Tool::Convert.new do |convert| |
| 58 | + ImageProcessing::MiniMagick.convert_shim do |convert| |
59 | 59 | convert.merge! [@portrait.path, @portrait.path, @portrait.path]
|
60 | 60 | convert << tiff.path
|
61 | 61 | end
|
|
70 | 70 |
|
71 | 71 | it "disallows split layers by default" do
|
72 | 72 | tiff = Tempfile.new(["file", ".tiff"])
|
73 |
| - MiniMagick::Tool::Convert.new do |convert| |
| 73 | + ImageProcessing::MiniMagick.convert_shim do |convert| |
74 | 74 | convert.merge! [@portrait.path, @portrait.path, @portrait.path]
|
75 | 75 | convert << tiff.path
|
76 | 76 | end
|
|
168 | 168 | end
|
169 | 169 |
|
170 | 170 | it "accepts magick object as source" do
|
171 |
| - magick = MiniMagick::Tool::Convert.new |
| 171 | + magick = ImageProcessing::MiniMagick.convert_shim |
172 | 172 | magick << fixture_image("rotated.jpg").path
|
173 | 173 | result = ImageProcessing::MiniMagick.source(magick).call
|
174 | 174 | assert_dimensions [600, 800], result
|
|
568 | 568 | it "appends CLI arguments" do
|
569 | 569 | actual = ImageProcessing::MiniMagick.append("-resize", "400x400").call(@portrait)
|
570 | 570 | expected = Tempfile.new(["result", ".jpg"], binmode: true).tap do |tempfile|
|
571 |
| - MiniMagick::Tool::Convert.new do |cmd| |
| 571 | + ImageProcessing::MiniMagick.convert_shim do |cmd| |
572 | 572 | cmd << @portrait.path
|
573 | 573 | cmd.resize("400x400")
|
574 | 574 | cmd << tempfile.path
|
|
0 commit comments