Navigation Menu

Skip to content

Commit

Permalink
Added option to change S3 endpoint/region
Browse files Browse the repository at this point in the history
  • Loading branch information
frane committed Feb 25, 2013
1 parent 00c34a9 commit 58ba1e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/spar/deployers/s3_deployer.rb
Expand Up @@ -6,13 +6,15 @@ def prepare(assets)
@aws_key = Spar.settings['aws_key']
@aws_secret = Spar.settings['aws_secret']
@deploy_bucket = Spar.settings['deploy_bucket']
@s3_endpoint = Spar.settings['s3_endpoint'] || AWS.config.s3_endpoint
unless @aws_key and @aws_secret and @deploy_bucket
raise "ERROR: You should set :aws_key, :aws_secret, and :deploy_bucket in your config.yml file so you can deploy to S3"
end

AWS.config(
:access_key_id => @aws_key,
:secret_access_key => @aws_secret,
:s3_endpoint => @s3_endpoint
)
@s3 = AWS::S3.new
@bucket = @s3.buckets[@deploy_bucket]
Expand Down

0 comments on commit 58ba1e4

Please sign in to comment.