Skip to content

Commit

Permalink
Update docs for MiniMagick 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
janko committed Feb 10, 2025
1 parent ba30289 commit b4daa77
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
source 'https://rubygems.org'

gemspec

gem 'pry'
14 changes: 7 additions & 7 deletions doc/minimagick.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ ImageProcessing::MiniMagick

#### `#method_missing`

Any unknown methods will be delegated to [`MiniMagick::Tool::Convert`]. See the
Any unknown methods will be delegated to [`MiniMagick.convert`]. See the
list of all available options by running `convert -help` and visiting the
[ImageMagick reference].

Expand All @@ -329,10 +329,10 @@ ImageProcessing::MiniMagick

#### `#custom`

Yields the intermediary `MiniMagick::Tool::Convert` object. If the block return
value is a `MiniMagick::Tool::Convert` object it will be used in further
Yields the intermediary `MiniMagick.convert` object. If the block return
value is a `MiniMagick::Tool` object it will be used in further
processing, otherwise if `nil` is returned the original
`MiniMagick::Tool::Convert` object will be used.
`MiniMagick::Tool` object will be used.

```rb
ImageProcessing::MiniMagick
Expand Down Expand Up @@ -407,7 +407,7 @@ If you would like to have more control over loading, you can create the
`MiniMagick::Tool` object directly, and just pass it as the source file.

```rb
magick = MiniMagick::Tool::Convert.new
magick = MiniMagick.convert
magick << "..." << "..." << "..."

ImageProcessing::MiniMagick
Expand Down Expand Up @@ -454,7 +454,7 @@ magick = ImageProcessing::MiniMagick
.resize_to_limit(400, 400)
.call(save: false)

magick #=> #<MiniMagick::Tool::Convert ...>
magick #=> #<MiniMagick::Tool ...>

magick << "output.png"
magick.call
Expand Down Expand Up @@ -520,7 +520,7 @@ ImageProcessing::MiniMagick
[direction]: https://www.imagemagick.org/script/command-line-options.php#gravity
[color]: https://www.imagemagick.org/script/color.php
[ImageMagick reference]: https://www.imagemagick.org/script/command-line-options.php
[`MiniMagick::Tool::Convert`]: https://github.com/minimagick/minimagick#metal
[`MiniMagick.convert`]: https://github.com/minimagick/minimagick#metal
[Reading JPEG Control Options]: http://www.imagemagick.org/Usage/formats/#jpg_read
[Writing JPEG Control Options]: http://www.imagemagick.org/Usage/formats/#jpg_write
[`-limit`]: https://www.imagemagick.org/script/command-line-options.php#limit
Expand Down
2 changes: 1 addition & 1 deletion test/pipeline_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
assert_equal [300, 400], vips_image.size

magick = ImageProcessing::MiniMagick.source(@portrait).resize_to_limit(400, 400).call(save: false)
assert_instance_of MiniMagick::Tool::Convert, magick
assert_kind_of MiniMagick::Tool, magick
assert_includes magick.args, "400x400>"
end

Expand Down

0 comments on commit b4daa77

Please sign in to comment.