Skip to content

Commit

Permalink
Fix calc_hashsums info option name
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthSim committed Feb 20, 2024
1 parent ef83e95 commit 21c3727
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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). ⚠️
Expand Down
4 changes: 2 additions & 2 deletions docs/info_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
```

Expand Down
2 changes: 1 addition & 1 deletion lib/imgproxy/option_aliases/info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/imgproxy/options_builders/info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions spec/info_url_for_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 21c3727

Please sign in to comment.