Module: S3Dir

Defined in:
lib/s3_dir.rb,
lib/s3_dir/version.rb

Overview

S3Dir uploads files to S3

S3Dir assumes your credentials are in ‘~/.fog`. Pass the credential argument with the namespace of your credentials in the `.fog` file.

## Usage:

require 's3_dir'

dir = '/path/to/upload'
bucket = 's3-website.com'

S3Dir.upload(dir, bucket, credential: :s3-website)

Options include:

`credential` default ENV['FOG_CREDENTIAL']
  Namespace for AWS credentials in the `.fog` file

`private` default false
  Setting private to true will make the bucket and all
  of its contents not public.

Defined Under Namespace

Classes: Uploader

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.upload(dir, key, options = {}) ⇒ Object

Upload files to S3



32
33
34
35
# File 'lib/s3_dir.rb', line 32

def self.upload dir, key, options={}
  uploader = Uploader.new(dir, key, options)
  uploader.upload
end