diff --git a/CHANGELOG.md b/CHANGELOG.md index ae49dc0..74087b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ ### Added - Add `smart_subsample` argument to the `webp_options` processing option. +### Fixed + +- Fix `calc_hashsums` info option name. + ## [3.0.0] - 2023-12-28 ⚠️ This is a major release. See [the migration guide](https://github.com/imgproxy/imgproxy.rb/blob/master/UPGRADE.md). ⚠️ diff --git a/docs/info_options.md b/docs/info_options.md index 2e62f43..fbf1985 100644 --- a/docs/info_options.md +++ b/docs/info_options.md @@ -139,11 +139,11 @@ } ``` -### [calc_hashsum](https://docs.imgproxy.net/usage/getting_info#calc_hashsum) +### [calc_hashsums](https://docs.imgproxy.net/usage/getting_info#calc_hashsums) ```ruby { - calc_hashsum: Array[String || Symbol] + calc_hashsums: Array[String || Symbol] } ``` diff --git a/lib/imgproxy/option_aliases/info.rb b/lib/imgproxy/option_aliases/info.rb index b74d684..f30e508 100644 --- a/lib/imgproxy/option_aliases/info.rb +++ b/lib/imgproxy/option_aliases/info.rb @@ -18,7 +18,7 @@ module OptionAliases average: :avg, dominant_colors: :dc, blurhash: :bh, - calc_hashsum: :chs, + calc_hashsums: :chs, page: :pg, video_thumbnail_second: :vts, video_thumbnail_keyframes: :vtk, diff --git a/lib/imgproxy/options_builders/info.rb b/lib/imgproxy/options_builders/info.rb index 0ed6f20..7f457ae 100644 --- a/lib/imgproxy/options_builders/info.rb +++ b/lib/imgproxy/options_builders/info.rb @@ -36,7 +36,7 @@ class Info < Base average: Imgproxy::OptionsCasters::Average, dominant_colors: Imgproxy::OptionsCasters::DominantColors, blurhash: Imgproxy::OptionsCasters::Blurhash, - calc_hashsum: Imgproxy::OptionsCasters::Array, + calc_hashsums: Imgproxy::OptionsCasters::Array, page: Imgproxy::OptionsCasters::Integer, video_thumbnail_second: Imgproxy::OptionsCasters::Integer, video_thumbnail_keyframes: Imgproxy::OptionsCasters::Bool, diff --git a/spec/info_url_for_spec.rb b/spec/info_url_for_spec.rb index f6eb4d7..48c79ab 100644 --- a/spec/info_url_for_spec.rb +++ b/spec/info_url_for_spec.rb @@ -46,7 +46,7 @@ x_components: 4, y_components: 3, }, - calc_hashsum: %w[md5 sha1], + calc_hashsums: %w[md5 sha1], page: 42, video_thumbnail_second: 15, video_thumbnail_keyframes: true, @@ -114,7 +114,7 @@ "average:1:1", "dominant_colors:1:1", "blurhash:4:3", - "calc_hashsum:md5:sha1", + "calc_hashsums:md5:sha1", "page:42", "video_thumbnail_second:15", "video_thumbnail_keyframes:1",