-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Added support for aws-sdk-s3 gem which is now preferred way to intera… #2481
Conversation
spec/paperclip/storage/s3_spec.rb
Outdated
@@ -1,5 +1,5 @@ | |||
require 'spec_helper' | |||
require 'aws-sdk' | |||
require 'aws-sdk-s3' |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
lib/paperclip/storage/s3.rb
Outdated
e.message << " (You may need to install the aws-sdk gem)" | ||
raise e | ||
begin | ||
require 'aws-sdk' # Fallback to outdated gem |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
lib/paperclip/storage/s3.rb
Outdated
|
||
module S3 | ||
def self.extended base | ||
begin | ||
require 'aws-sdk' | ||
require 'aws-sdk-s3' |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
+1 on this Pull Request to be merged! |
+1 |
@tute Can we merge it and have a new version release, please? |
We could also open up the spec version without changing the gem name, as it says in the linked doc: I don't work on paperclip now. Maybe @jyurek can point us in the right direction. |
Version 3.x depends almost on the whole internet ;-) as you can see in https://rubygems.org/gems/aws-sdk-resources |
+1 |
any updates? |
@jyurek Would be fantastic if you could take a look at this. 🎩 |
Hi, I had some test failures while I was reviewing, so I'm looking into what might be wrong:
|
This looks like it's a little more complicated than it appears at first glance. With the new I think we should drop the fallback to the |
Related: #2484 |
Hi @morgoth we're going to nip this in the bud and drop support for the |
@geoffharcourt I removed it. Not sure why tests are now failing (they pass locally). |
@morgoth I think before the reason was that the I'll take a look at the Travis failures. |
@geoffharcourt CI failures are not related to this changes and are fixed in https://github.com/thoughtbot/paperclip/pull/2488/files |
Could we move this forward, please? |
@morgoth after bundling the version from this PR, I'm presented with the following message:
I think this needs to be updated too, to mention aws-sdk-s3 v3. |
@pjg yes, but I'm not sure if I should do this here. |
I rebased with master, but looks like there is new build error
😞 |
@geoffharcourt Maybe some gem updated in the meantime, thus having a different environment to run the tests as |
Rebased with master, so it's green now |
Any news on this one? :-) |
@morgoth Would you be up for adjusting the PR to make it backwards compatible with aws-sdk < 3 as well as aws-sdk-s3? That would make maintenance and upgrading more forgiving by easing discontinuities. |
@Empact It was like this at the beginning but then I was asked to remove backward compatibility in #2481 (comment) |
@morgoth Fair enough if the maintainers want it that way. I generally like to leave backwards compatibility for at least one release so that users can upgrade the dependency in isolation - i.e. they can upgrade Paperclip without needing to also upgrade aws-sdk; but since the dependency is a different library altogether that doesn't really apply here. |
Any idea when this will get merged? |
Yes, it would be really useful if you could merge this now |
@morgoth THANK YOU for your work on this. Looks fantastic! That being said... Can we please move forward on this? I have a project that is currently stuck in a vulnerable state due to https://nvd.nist.gov/vuln/detail/CVE-2017-0889. I can't upgrade Paperclip due to a newly discovered type of dependency hell enabled by Amazon's bizarre architectural changes from |
@nateemerson Similar issue here. We upgraded to aws-sdk 2.x which enabled a Paperclip upgrade. Does that work for you in the interim? |
@bmulholland No because my project has a feature dependent on a service gem from |
please merge this |
Is there any chance that this will be merged soon? :) |
Please merge this, we don't need aws-iot in our projet.... |
@geoffharcourt 👋 old friend, any chance you could either accept or reject with a reason so I can fix it? |
Hi @woodhull! I'm no longer at thoughtbot, so I'm not in a position to accept or reject. |
Looks like it's @sidraval that's maintaining this repo now. Sid, could this be merged? |
Thanks so much for the PR @morgoth 😄 |
@sidraval Thanks for merging! 👍 |
…ct with s3.
Reference: https://github.com/aws/aws-sdk-ruby/blob/master/V3_UPGRADING_GUIDE.md#library-maintainer
It still should work with
aws-sdk
fine