From 6e0c9e992a8e65a41e2ab30af639b6274d379371 Mon Sep 17 00:00:00 2001 From: Jon Yurek Date: Fri, 21 Aug 2015 11:41:18 -0400 Subject: [PATCH] Revert "S3 Regions in the cucubmer specs" Turns out it didn't fix test failures like I thought. It only added more! This reverts commit b8221c6b9f9e4c616973b859a8ad0b05f7511372. --- features/basic_integration.feature | 4 ++-- lib/paperclip/storage/s3.rb | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/features/basic_integration.feature b/features/basic_integration.feature index 7fc6560df..0e34456dc 100644 --- a/features/basic_integration.feature +++ b/features/basic_integration.feature @@ -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 diff --git a/lib/paperclip/storage/s3.rb b/lib/paperclip/storage/s3.rb index e3d8d9598..5fa6f6327 100644 --- a/lib/paperclip/storage/s3.rb +++ b/lib/paperclip/storage/s3.rb @@ -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]