forked from cyrylas/activestorage-openstack
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Merge coming from upstream #2
Open
ShamoX
wants to merge
23
commits into
master
Choose a base branch
from
develop
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
first -shamox version
This plugin now fully supports rails 6, with updates such as : - Raising `ActiveStorage::FileNotFoundError` when a key does not exist - Updated method signatures to reflect the newest `ActiveStorage::Service` interface Additionally, with the new fog-openstack version, the filename can be sent when requesting the object's URL. Tests have been updated accordingly.
Remove unnecessary warning, as this gem now supports fog-openstack ~ 1.0 and rails 6
Rails 6.0.1 now aliases `create_after_upload` to `create_and_upload` forcing the creation of the blob before uplaoding to the blob provider. This causes a bug with this plugin since we add a after_commit hook when a blob is created that updates the metadata(content type) of the blob on the openstack provider assuming the blob had already been uploaded beforehand. An `ActiveStorage::FileNotFound` error is then raised because it tries to update the metadata of a file that does not exist yet. This hook is now totally removed. However for versions that are inferior to rails 6.0.1, and starting from `5.2.1.1`, Rails has added native support for a method called `update_metadata` that calls the service and tries to update the blob in case it has not been identified yet. To make this plugin work for all versions, the `update_metadata` method has been implemetend replacing the current non standard method "change_content_type". Aliasing the old method to the newer one and deprecating the old method won't work since the method signatures are not the same. Plus it was used as a hack/non standard method workaround. Misc changes: - Rubocop cleanup + test updates. - Content type is now only guessed if rails does not send it as a meta parameter. However guessing content type inside the provider class is unnecessary starting from version 5.2.1.1. Will consider removing this altogether in a future release - Update tests accordingly. - Send Content-Disposition header in #upload definition if filename and disposition are passed as params.
- Add support for rails 6.1 - Add public/private url support ( Co-Authored with @jplot ) - Add more test coverage for new API/behaviour - Update `#url_for_direct_upload` to accept `filename:` as allowed by `fog-openstack` libray - Add appraisal to handle multiple rails versions including rails master support - Rubocop fixes - Update README with rails 6.1 config examples - Code cleaning
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.