Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
b8221c6b
Commit
b8221c6b
authored
Aug 20, 2015
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S3 Regions in the cucubmer specs
parent
0e8c21b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
features/basic_integration.feature
+2
-2
lib/paperclip/storage/s3.rb
+3
-2
No files found.
features/basic_integration.feature
View file @
b8221c6b
...
...
@@ -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.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
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
lib/paperclip/storage/s3.rb
View file @
b8221c6b
...
...
@@ -209,11 +209,12 @@ module Paperclip
host_name
=
@options
[
:s3_host_name
]
host_name
=
host_name
.
call
(
self
)
if
host_name
.
is_a?
(
Proc
)
host_name
||
s3_credentials
[
:s3_host_name
]
||
"s3.amazonaws.com"
region
=
[
"s3"
,
s3_region
].
compact
.
join
(
"-"
)
host_name
||
s3_credentials
[
:s3_host_name
]
||
"
#{
region
}
.amazonaws.com"
end
def
s3_region
region
=
@options
[
:s3_region
]
region
=
@options
[
:s3_region
]
||
s3_credentials
[
:s3_region
]
region
=
region
.
call
(
self
)
if
region
.
is_a?
(
Proc
)
region
||
s3_credentials
[
:s3_region
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment