New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade carrierwave to version 2.1 #7213
Upgrade carrierwave to version 2.1 #7213
Conversation
Bump develop to next release version
@@ -50,6 +58,7 @@ def attributes | |||
.merge(highlighted_content_banner_attributes) | |||
.merge(omnipresent_banner_attributes) | |||
.merge(colors_attributes) | |||
.delete_if { |_k, val| val.is_a?(Decidim::ApplicationUploader) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because in the class initializer we assign the object logo to the form. We assign it, as if we do not perform that step, the images in the form will be lost when updating other fields.
In this particular case we delete the file to prevent multiple processing of the same file. This is a workaround that i have found in decidim codebase, added via: #7026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks!
Also, @alecslupu I see some code that seems to be unrelated to the upgrade to carrierwave 2, but related to #7189 and #7191. Could you split that into different PRs, please? Thanks! |
Hello @mrcasals, Indeed, i see there are few changes related to #7211. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @alecslupu! There's still some code unrelated to the carrierwave upgrade, can you move it to another PR please?
decidim-conferences/app/commands/decidim/conferences/admin/update_partner.rb
Outdated
Show resolved
Hide resolved
4b759c0
to
e57d7e0
Compare
…rade-carierwave2.1
e57d7e0
to
3e1b6a7
Compare
35b19a3
to
ff2d91a
Compare
…rade-carierwave2.1
…rade-carierwave2.1
…rade-carierwave2.1
…rade-carierwave2.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now, thanks!
🎩 What? Why?
Upgrade the carrierwave version from 1.3.1 to 2.1 in order to fix the deprecation warnings regarding Ruby 2.7 upgrade
📌 Related Issues
Link your PR to an issue
Testing
This PR does not add any functionality to main Decidim Application. Is targeting Carrierwave upgrade to reduce the number of deporecations generated by Ruby 2.7 upgrade.
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/
.📷 Screenshots
Please add screenshots of the changes you're proposing
Carrierwave change log
2.1.0 - 2020-02-16
Added
Fixed
2.0.2 - 2019-09-28
Fixed
2.0.1 - 2019-08-31
Fixed
#{column}_cache
unintentionally removing files on assigning empty string(@mshibuya 22e8005e, #2412)2.0.0 - 2019-08-18
No changes.
2.0.0.rc - 2019-06-23
Added
Changed
storage
configuration also forcache_storage
unless explicitly specified(@mshibuya 629afecb)#remote_#{column}_urls=
was changed to preserve precedent updates(@mshibuya 8f18a95b)#serializable_hash
now returns string for version keys(@schovi #2246)content_type_whitelist
(@locriani #1934)Deprecated
fog_provider
configuration was deprecated and has no effect, just adding fog providers toGemfile
will load them(@mshibuya ca201ee2)CarrierWave::Uploader::Base#sanitized_file
was deprecated, use#file
instead(@mshibuya 28190e99)Removed
Fixed
uploader.cache!
loads entire contents of file into memory(@mshibuya #2136)#clean_cache!
breaking with old format of cache id(@mshibuya aab402fb)#exists?
returning true after Fog file deletion(@mshibuya #2387)#identifier
available for a retrieved file(@mshibuya #1581)#reload
or#initialize_dup
are overridden in model(@mshibuya #2379)#content_type
returning false, instead of nil(@longkt90 #2384)#recreate_versions!
ignored:from_version
when versions to recreate are given(@hedgesky #1879 #1164)