Module: S3AssetsDeployer

Defined in:
lib/s3_assets_deployer.rb,
lib/s3_assets_deployer/aws_s3.rb,
lib/s3_assets_deployer/engine.rb,
lib/s3_assets_deployer/version.rb,
lib/s3_assets_deployer/deployer.rb,
lib/s3_assets_deployer/asset_file.rb,
lib/s3_assets_deployer/configuration.rb

Defined Under Namespace

Classes: AssetFile, AwsS3, Configuration, Deployer, Engine

Constant Summary collapse

VERSION =
'0.2.1'

Class Method Summary collapse

Class Method Details

.configObject



16
17
18
# File 'lib/s3_assets_deployer.rb', line 16

def self.config
  @config ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Yields:



20
21
22
# File 'lib/s3_assets_deployer.rb', line 20

def self.configure
  yield config
end

.runObject



6
7
8
9
10
11
12
13
14
# File 'lib/s3_assets_deployer.rb', line 6

def self.run
  deployer = Deployer.new(
    storage: s3,
    root_path: config.assets.root_path,
    prefix_paths: config.assets.prefix_paths,
  )

  deployer.run
end

.s3Object



24
25
26
27
28
29
# File 'lib/s3_assets_deployer.rb', line 24

def self.s3
  @s3 ||= AwsS3.new(
    bucket: config.s3.bucket,
    prefix_key: config.s3.prefix_key,
  )
end