gems: update chunky_png

And pass it a proper IO object, to avoid "Undefined method
`set_encoding`" errors.
This commit is contained in:
Pierre de La Morinerie 2021-02-16 11:02:53 +00:00 committed by Pierre de La Morinerie (Rebase PR Action)
parent b04afed20e
commit aae452cc67
2 changed files with 2 additions and 2 deletions

View file

@ -165,7 +165,7 @@ GEM
chartkick (3.4.0)
childprocess (3.0.0)
choice (0.2.0)
chunky_png (1.3.11)
chunky_png (1.4.0)
clamav-client (3.2.0)
coderay (1.1.3)
coercible (1.0.0)

View file

@ -60,7 +60,7 @@ module NewAdministrateur
def uninterlaced_png(uploaded_file)
if uploaded_file&.content_type == 'image/png'
chunky_img = ChunkyPNG::Image.from_io(uploaded_file)
chunky_img = ChunkyPNG::Image.from_io(uploaded_file.to_io)
chunky_img.save(uploaded_file.tempfile.to_path, interlace: false)
uploaded_file.tempfile.reopen(uploaded_file.tempfile.to_path, 'rb')
end