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

Commit

Permalink
Revert "S3 Regions in the cucubmer specs"
Browse files Browse the repository at this point in the history
Turns out it didn't fix test failures like I thought. It only added
more!

This reverts commit b8221c6.
  • Loading branch information
Jon Yurek committed Aug 21, 2015
1 parent 5c43151 commit 6e0c9e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions features/basic_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ Feature: Rails integration
And I attach the file "spec/support/fixtures/5k.png" to "Attachment" on S3
And I press "Submit"
Then I should see "Name: something"
And I should see an image with a path of "http://s3-us-west-2.amazonaws.com/paperclip/attachments/original/5k.png"
And the file at "http://s3-us-west-2.amazonaws.com/paperclip/attachments/original/5k.png" should be uploaded to S3
And I should see an image with a path of "http://s3.amazonaws.com/paperclip/attachments/original/5k.png"
And the file at "http://s3.amazonaws.com/paperclip/attachments/original/5k.png" should be uploaded to S3
5 changes: 2 additions & 3 deletions lib/paperclip/storage/s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,11 @@ def s3_host_name
host_name = @options[:s3_host_name]
host_name = host_name.call(self) if host_name.is_a?(Proc)

region = ["s3", s3_region].compact.join("-")
host_name || s3_credentials[:s3_host_name] || "#{region}.amazonaws.com"
host_name || s3_credentials[:s3_host_name] || "s3.amazonaws.com"
end

def s3_region
region = @options[:s3_region] || s3_credentials[:s3_region]
region = @options[:s3_region]
region = region.call(self) if region.is_a?(Proc)

region || s3_credentials[:s3_region]
Expand Down

0 comments on commit 6e0c9e9

Please sign in to comment.