Skip to content

Commit 04c22be

Browse files
committed
Stop testing with GraphicsMagick
1 parent 8185ea6 commit 04c22be

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

doc/minimagick.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ that you want to use it:
6868
```rb
6969
require "image_processing/mini_magick"
7070

71-
MiniMagick.cli = :graphicsmagick
71+
MiniMagick.graphicsmagick = true
7272

7373
processed = ImageProcessing::MiniMagick
7474
.source(image)

test/mini_magick_test.rb

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
require "image_processing/mini_magick"
33
require "pathname"
44

5-
MiniMagick.cli = :graphicsmagick if ENV["GM"]
6-
75
describe "ImageProcessing::MiniMagick" do
86
before do
97
@portrait = fixture_image("portrait.jpg")
@@ -85,7 +83,7 @@
8583
refute_equal 0, File.size(path)
8684
File.delete(path)
8785
end
88-
end unless ENV["GM"]
86+
end
8987

9088
it "allows resizing images without extension" do
9189
result1 = Tempfile.new("image") # no file extension
@@ -105,7 +103,7 @@
105103
it "accepts geometry" do
106104
pipeline = ImageProcessing::MiniMagick.source(@portrait)
107105
assert_dimensions [300, 400], pipeline.loader(geometry: "400x400").call
108-
end unless ENV["GM"]
106+
end
109107

110108
it "auto orients by default" do
111109
result = ImageProcessing::MiniMagick.call(fixture_image("rotated.jpg"))
@@ -120,7 +118,7 @@
120118
assert_type "JPEG", result
121119

122120
result = ImageProcessing::MiniMagick.loader(define: { jpeg: { size: "100x100" } }).call(@portrait)
123-
assert_dimensions [150, 200], result unless ENV["GM"]
121+
assert_dimensions [150, 200], result
124122

125123
result = ImageProcessing::MiniMagick.loader(strip: true).call(@portrait)
126124
assert_empty MiniMagick::Image.new(result.path).exif
@@ -132,15 +130,15 @@
132130
assert_empty MiniMagick::Image.new(result.path).exif
133131

134132
result = ImageProcessing::MiniMagick.loader(colorspace: "Gray").call(@portrait)
135-
assert_equal "Gray", MiniMagick::Image.new(result.path).data["colorspace"] unless ENV["GM"]
133+
assert_equal "Gray", MiniMagick::Image.new(result.path).data["colorspace"]
136134

137135
result = ImageProcessing::MiniMagick.loader(set: ["comment", "This is a comment"]).call(@portrait)
138-
assert_equal "This is a comment", MiniMagick::Image.new(result.path).data["properties"]["comment"] unless ENV["GM"]
136+
assert_equal "This is a comment", MiniMagick::Image.new(result.path).data["properties"]["comment"]
139137
end
140138

141139
it "applies saver options" do
142140
result = ImageProcessing::MiniMagick.saver(define: { jpeg: { fancy_unsampling: "off", extent: "20KB" } }).call(@portrait)
143-
assert_operator result.size, :<, 20*1024 unless ENV["GM"]
141+
assert_operator result.size, :<, 20*1024
144142

145143
result = ImageProcessing::MiniMagick.saver(strip: true).call(@portrait)
146144
assert_empty MiniMagick::Image.new(result.path).exif
@@ -152,10 +150,10 @@
152150
assert_empty MiniMagick::Image.new(result.path).exif
153151

154152
result = ImageProcessing::MiniMagick.saver(colorspace: "Gray").call(@portrait)
155-
assert_equal "Gray", MiniMagick::Image.new(result.path).data["colorspace"] unless ENV["GM"]
153+
assert_equal "Gray", MiniMagick::Image.new(result.path).data["colorspace"]
156154

157155
result = ImageProcessing::MiniMagick.saver(set: ["comment", "This is a comment"]).call(@portrait)
158-
assert_equal "This is a comment", MiniMagick::Image.new(result.path).data["properties"]["comment"] unless ENV["GM"]
156+
assert_equal "This is a comment", MiniMagick::Image.new(result.path).data["properties"]["comment"]
159157
end
160158

161159
it "applies blocks to operations" do
@@ -234,10 +232,10 @@
234232

235233
it "doesn't require both dimensions" do
236234
assert_dimensions [300, 400], @pipeline.resize_to_fit!(300, nil)
237-
assert_dimensions [750, 1000], @pipeline.resize_to_fit!(750, nil) unless ENV["GM"]
235+
assert_dimensions [750, 1000], @pipeline.resize_to_fit!(750, nil)
238236

239237
assert_dimensions [300, 400], @pipeline.resize_to_fit!(nil, 400)
240-
assert_dimensions [750, 1000], @pipeline.resize_to_fit!(nil, 1000) unless ENV["GM"]
238+
assert_dimensions [750, 1000], @pipeline.resize_to_fit!(nil, 1000)
241239
end
242240

243241
it "produces correct image" do
@@ -534,7 +532,7 @@
534532

535533
assert_similar result1, result2
536534
end
537-
end unless ENV["GM"]
535+
end
538536

539537
describe "#define" do
540538
it "adds -define options from a Hash" do

0 commit comments

Comments
 (0)