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.1.1'
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
17
18
19
|
# File 'lib/s3_assets_deployer.rb', line 17
def self.config
@config ||= Configuration.new
end
|
21
22
23
|
# File 'lib/s3_assets_deployer.rb', line 21
def self.configure
yield config
end
|
.run ⇒ Object
6
7
8
9
10
11
12
13
14
15
|
# 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,
ignore_paths: config.assets.ignore_paths
)
deployer.run
end
|
.s3 ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'lib/s3_assets_deployer.rb', line 25
def self.s3
@s3 ||= AwsS3.new(
credentials: config.s3.credentials,
bucket: config.s3.bucket,
prefix_key: config.s3.prefix_key,
region: config.s3.region
)
end
|