Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refactors Storage#initialize method

  • Loading branch information...
commit a62da482aa026948ea0033b9966b33aeb0ca8629 1 parent 967810d
@mateuszzawisza authored
Showing with 2 additions and 8 deletions.
  1. +2 −8 lib/savior/storage.rb
View
10 lib/savior/storage.rb
@@ -3,14 +3,8 @@
class Savior
class Storage
def initialize(options={})
- default_options = {
- :access_key_id => ENV['AMAZON_ACCESS_KEY_ID'],
- :secret_access_key => ENV['AMAZON_SECRET_ACCESS_KEY'],
- :bucket_name => nil
- }
- options = default_options.merge(options)
- @access_key_id = options[:access_key_id]
- @secret_access_key = options[:secret_access_key]
+ @access_key_id = options[:access_key_id] || ENV['AMAZON_ACCESS_KEY_ID']
+ @secret_access_key = options[:secret_access_key] || ENV['AMAZON_SECRET_ACCESS_KEY']
@bucket_name = options[:bucket_name]
@s3 = AWS::S3.new(
:access_key_id => @access_key_id,
Please sign in to comment.
Something went wrong with that request. Please try again.