Method: Zine::UploaderAWS#initialize
- Defined in:
- lib/zine/uploader_aws.rb
#initialize(build_dir, options, credentials, delete_file_array, upload_file_array) ⇒ UploaderAWS
Returns a new instance of UploaderAWS.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/zine/uploader_aws.rb', line 12 def initialize(build_dir, , credentials, delete_file_array, upload_file_array) return unless ['method'] == 'aws' @build_dir = build_dir ENV['AWS_REGION'], @bucket_name = ['host'].split(':') @path = ['path_or_repo'] @cf_distribution_id = ['cloudfront_distrib'] @verbose = ['verbose'] store_credentials credentials @delete_file_array = Set.new(delete_file_array).to_a @upload_file_array = Set.new(upload_file_array).to_a @s3 = Aws::S3::Client.new @cf = Aws::CloudFront::Client.new end |