Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

The long awaited AWS v2 support PR #1903

Closed
wants to merge 9 commits into from
Closed

Conversation

betesh
Copy link
Contributor

@betesh betesh commented Jun 17, 2015

Thank you to @davetchen, who really did most of the work here.

def assert_forbidden_response(url)
Net::HTTP.get_response(URI.parse(url)) do |response|
assert_equal "403", response.code,
"Expected HTTP response code 403, got #{response.code}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align the parameters of a method call if they span more than one line.

@tute
Copy link
Contributor

tute commented Jun 18, 2015

I was about to release v4.3, but this should part of the release, right @jyurek?

@tute
Copy link
Contributor

tute commented Jun 18, 2015

I'd love if we could use an adapter instead of adding conditionals everywhere we use AWS in the code.

@tute tute mentioned this pull request Jun 18, 2015
@tute
Copy link
Contributor

tute commented Jun 18, 2015

There's too many releases in 4.3, will release anyway, and we can add this in 4.4.


object.expects((defined?(::Aws) ? :upload_file : :write))
.with(anything,
content_type: 'image/png',

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.

@maclover7 maclover7 modified the milestone: v4.4.0 Jun 18, 2015

object.expects((defined?(::Aws) ? :upload_file : :write))
.with(anything,
content_type: 'image/png',

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.

@tute
Copy link
Contributor

tute commented Aug 3, 2015

cc @jyurek to merge this PR

@jyurek
Copy link

jyurek commented Aug 20, 2015

I had some local failures related to regions, so I put in a fix for them, but this is merged. There are things I would clean up in the code, but I can't let that stop this PR at this point. We can fix them in the future. Thank you very much for working on this.

@jyurek jyurek closed this Aug 20, 2015
@tute
Copy link
Contributor

tute commented Aug 20, 2015

Yay! 🎉 🎈 👏

Gonna go out in 4.4.

@jyurek
Copy link

jyurek commented Aug 21, 2015

@betesh There are failures on Travis. Can you take a look at them and see if there's anything that jumps out at you? https://travis-ci.org/thoughtbot/paperclip/jobs/76525495

@tute That sounds good, but I want to handle these errors first, of course.

@betesh betesh deleted the aws_v2 branch August 21, 2015 14:16
@betesh
Copy link
Contributor Author

betesh commented Aug 21, 2015

@jyurek What was the goal of b8221c6? If I understand correctly, it's to make the attachment URL use :s3_domain_url by default if an s3_region has been defined. s3_region is required for AWS v2, so we need either:

  1. if-then logic within each test to handle AWS v2 differently than v1 -- I just pushed a commit attempting this, we'll see if it works...

OR

  1. to consider those tests inapplicable to AWS v2, and just wrap the whole thing if an if defined(::AWS)

@jyurek
Copy link

jyurek commented Aug 21, 2015

The goal was to get my local tests passing, but turns out I was wrong. I reverted and it's all good now. My bad. :)

@betesh
Copy link
Contributor Author

betesh commented Aug 21, 2015

Just curious, do you mean tests in a rails app that uses paperclip, or the S3 Live specs?

@jyurek
Copy link

jyurek commented Aug 22, 2015

I mean the Paperclip specs themselves. Though the failure I saw was in the feature specs, so technically it was an app that uses paperclip. But that's nitpicking.

@nickrivadeneira
Copy link
Contributor

@tute Looks like v4.4 is being skipped - will this officially be released in v5?

@tute
Copy link
Contributor

tute commented Apr 27, 2016

@tute Looks like v4.4 is being skipped - will this officially be released in v5?

Yes. If you are on Rails 4.2 you can grab the latest v5 beta.

bheeshmar added a commit to bloomfire/paperclip that referenced this pull request Apr 18, 2017
curl -L https://github.com/thoughtbot/paperclip/pull/1903.patch > 1903.patch
git apply --3way 1903.patch

Fixed conflict in lib/papeclip/storage/s3.rb by adding .freeze to string
literals in http/https prefixing.
bheeshmar added a commit to bloomfire/paperclip that referenced this pull request Apr 18, 2017
curl -L https://github.com/thoughtbot/paperclip/pull/1903.patch > 1903.patch
git apply --3way 1903.patch

Fixed conflict in lib/papeclip/storage/s3.rb by adding .freeze to string
literals in http/https prefixing.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants