Skip to content

Update - #5

Open
asurin wants to merge 1125 commits into
tkwwarchive:0.11-stablefrom
carrierwaveuploader:master
Open

Update#5
asurin wants to merge 1125 commits into
tkwwarchive:0.11-stablefrom
carrierwaveuploader:master

Conversation

@asurin

@asurin asurin commented Nov 14, 2016

Copy link
Copy Markdown

No description provided.

thiagofm and others added 30 commits July 14, 2022 17:25
rails/sprockets already has no master branch.
Restored the condition to execute write_uploader
Co-authored-by: Mitsuhiro Shibuya <mit.shibuya@gmail.com>
…ions

Set `:content_type` in `copy_options` for GCS.
Have RemoteFile raise CarrierWave::DownloadError when the HTTP response
is of a type that has no content, according to the standards.
In those cases, response.body returns nil.

There are 8 response types that have no body, 4 of which we can get, so
just check whether the body was nil.

Fixes #2632
Includes a backwards compatibility mode for SsrfFilter 1.0,
which is needed for Ruby 2.5 and JRuby 9.2.

Also includes a local version constraint for fog-google for
Ruby 2.5 and JRuby 9.2 because of a known but undeclared
incompatibility in that gem. gemfiles/rails-6-1.gemfile
already has this fix.

[Fixes #2625]
chore: minor refactor from select first to detect
Raise DownloadError when no content is returned
…ptions

fix: ruby 2.7 kwarg warning in uploader process
Given that it is not advised to put other stuff in the same directory
as CarrierWave's cache, this fix makes clean_cache! not break then.

Based on the similar fix for the Fog storage clean_cache!.
Local storage clean_cache! fix for off-topic files
Enable to override configurations by 'false' on a per-uploader basis
mshibuya and others added 30 commits December 31, 2024 14:12
These specs originate from this one:
fe90e05#diff-139363042a1d27e5830373d80deb5a2f8e7afcb68e28be55a73ffbd587517c0dR55-R57
But it was implemented in a wrong way (without calling #image=). Also this assumption doesn't hold true after #2658.
While `write_uploader` is aliased to `write_attribute` by default,
it may be overridden in the model. This change ensures that the
override method is called when clearing the attribute.
Fixes #2732

Starting in Alpine Linux 3.19, installing the `imagemagick` package no
longer includes support for JPG, SVG, and other image formats.[1]

This means upgrading Alpine linux on a server can cause Carrierwave to
start failing with CarrierWave::ProcessingError when uploading images.

The root cause isn't obvious from this error.

However when ImageMagick is not installed, Carrierwave raises
MiniMagick::Error instead of CarrierWave::ProcessingError, and includes
the detailed error message.

This fix also raises MiniMagick::Error if ImageMagick is installed but
is missing the delegates required for the image format being
manipulated. This will make it easier to debug when uploads are failing.

[1] https://maxsmolens.org/posts/imagemagick-packaging-change-on-alpine-linux/
mb_chars has been deprecated. and can be replaced rails/rails#54081
…r-on-dup

Fix #dup with custom serialisation
…issing-jpg-svg-delegates-on-alpine

Raise MiniMagick::Error if ImageMagick is missing delegates needed for image formats
Remove use of deprecated mb_chars method
Marking ruby-head as experimental, until cucumber works on it
…}=`, `##{column}_cache=`, and `#remote_#{column}_url=`

Fixes #2778, Fixes #2779
By providing a 'changelog_uri' in the metadata of the gemspec a
'Changelog' link will be shown on https://rubygems.org/gems/carrierwave
which makes it quick and easy for someone to check on the changes
introduced with a new version.

Details of this functionality can be found on https://guides.rubygems.org/specification-reference/#metadata
Adds a commented example of `content_type_allowlist` (/image\//) to the
generated uploader.  It mirrors the existing `extension_allowlist`
comment and helps users mitigate content-type spoofing attacks.
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix "Lint/Void: Variable storage used in void context."

The current logic does nothing. So just add a comment to fix the linter.

* Avoid to test against JRuby 10.1.x

It seems that activerecord-jdbc-adapter doesn't work with the latest
version.
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…ctions/actions/checkout-7

Bump actions/checkout from 6 to 7
* upgrade marcel gem currently locked to '~> 1.0.0', lock to '~> 1.0'

* Bump actions/checkout from 6 to 7

Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* loosen marcel restriction

* fix issue from upgraded MiniMagick

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: RobL <contact@robl.me>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…te!` (#2817)

Previously, when `manipulate!` was called with a block that returned nil
for every frame, the resulting empty frames array caused an
`ArgumentError` in frames.append(true)`. This is because
RMagick's `ImageList#append` does not accept a bare true value on an
empty list.

https://github.com/rmagick/rmagick/blob/9788a6d43b3aebb5a1ad72013f1fe0b3affa300f/ext/RMagick/rmilist.cpp#L143
https://github.com/rmagick/rmagick/blob/9788a6d43b3aebb5a1ad72013f1fe0b3affa300f/ext/RMagick/rmilist.cpp#L877

This made the error hard to diagnose since the root cause
(unsupported format or a block that always returns nil) was not surfaced.

It looks like this happens when an image file isn't supported by
ImageMagick.
(In our case, this happens with HEIC files with unsupported compatible brands)

So this changed to check frames and if it's empty, raises an appropriate error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.