-
Notifications
You must be signed in to change notification settings - Fork 26
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
Update for Shrine 3.0 #37
Conversation
It's not used anymore in Shrine. The downloads should be resumable in Storage#open as well, so we shouldn't be losing anything by having only Storage#open.
I also remembered the Shrine 3.0 requires I initially wanted to still keep allowing Shrine 2.x, but the new |
Thanks @janko! |
5f5e4a7
to
099389d
Compare
Any update on merging this request? I'm ready to upgrade to Shrine 3.0 and this is a blocker. Much appreciated! |
Thanks @janko! |
Thanks! Just a reminder that this PR was still missing detecting unknown file in #open. |
Woops sorry, I missed this and I was minutes away from releasing the new version. I will have a look then :) |
I just opened #40 for this. |
Shrine 3.0 compatibility has just been released in version 3.0.0 🎉 |
In Shrine 2.x we've already stopped using the
#download
storage method (see shrinerb/shrine#331 for the rationale). So we can remove it here. The google client should already be doing resumable downloads in the#open
method as well, so we shouldn't be losing anything by switching to#open
.Shrine 3.0 now requires the
#open
method to accept optional keyword arguments. We add the:rewindable
option to allow people to disableDown::ChunkedIO
's disk caching, which has become a convention across Shrine storages. We also forward any additional optionsGoogle::Cloud::Storage::File#download
, to give people more control over downloading should they want it.Lastly, we relax the
shrine
version constraint to allow Shrine 3.x. Shrine 3.0 isn't officially released yet, but we already have a beta that seems pretty stable, and we'll soon be releasing a RC, so it would be nice if people can already test with GCS.