class Lono::Template::Upload

Public Class Methods

new(options={}) click to toggle source
Calls superclass method Lono::AbstractBase::new
# File lib/lono/template/upload.rb, line 8
def initialize(options={})
  super
  @checksums = {}
  @prefix = Lono.env # s3://s3-bucket/development
end

Public Instance Methods

run() click to toggle source
# File lib/lono/template/upload.rb, line 14
def run
  puts "Uploading CloudFormation templates..."
  paths = Dir.glob("#{Lono.config.output_path}/#{@blueprint}/templates/**/*")
  paths.select { |p| File.file?(p) }.each do |path|
    Lono::S3::Uploader.new(path).upload
  end
  puts "Templates uploaded to s3."
end