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
36b48d05
Commit
36b48d05
authored
Jan 31, 2013
by
Menno van der Sman
Committed by
Jon Yurek
Feb 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accept and pass :credential_provider option to AWS-SDK
parent
5261670b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletions
+18
-1
lib/paperclip/storage/s3.rb
+1
-1
test/storage/s3_test.rb
+17
-0
No files found.
lib/paperclip/storage/s3.rb
View file @
36b48d05
...
...
@@ -212,7 +212,7 @@ module Paperclip
config
[
:proxy_uri
]
=
URI
::
HTTP
.
build
(
proxy_opts
)
end
[
:access_key_id
,
:secret_access_key
].
each
do
|
opt
|
[
:access_key_id
,
:secret_access_key
,
:credential_provider
].
each
do
|
opt
|
config
[
opt
]
=
s3_credentials
[
opt
]
if
s3_credentials
[
opt
]
end
...
...
test/storage/s3_test.rb
View file @
36b48d05
...
...
@@ -720,6 +720,23 @@ class S3Test < Test::Unit::TestCase
end
end
context
"An attachment with S3 storage and S3 credentials with a :credential_provider"
do
setup
do
class
DummyCredentialProvider
;
end
rebuild_model
:storage
=>
:s3
,
:bucket
=>
"testing"
,
:s3_credentials
=>
{
:credential_provider
=>
DummyCredentialProvider
.
new
}
@dummy
=
Dummy
.
new
end
should
"set the credential-provider"
do
assert_kind_of
DummyCredentialProvider
,
@dummy
.
avatar
.
s3_bucket
.
config
.
credential_provider
end
end
context
"An attachment with S3 storage and specific s3 headers set"
do
setup
do
rebuild_model
:storage
=>
:s3
,
...
...
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