Sha256: e06c958bd020520a6fda596e930014b9cfb0dbb7690fa138f876b6776f318502
Contents?: true
Size: 1.14 KB
Versions: 3
Compression:
Stored size: 1.14 KB
Contents
module Forger class Script autoload :Compile, "forger/script/compile" autoload :Compress, "forger/script/compress" autoload :Upload, "forger/script/upload" def initialize(options={}) @options = options end def add_to_user_data!(user_data) user_data end def auto_terminate_after_timeout load_template("auto_terminate_after_timeout.sh") end def auto_terminate # set variables for the template @ami_name = @options[:ami_name] load_template("auto_terminate.sh") end def cloudwatch load_template("cloudwatch.sh") end def create_ami # set variables for the template @ami_name = @options[:ami_name] @region = 'us-east-1' if ENV['TEST'] @region ||= `aws configure get region`.strip rescue 'us-east-1' load_template("ami_creation.sh") end def extract_forger_scripts load_template("extract_forger_scripts.sh") end private def load_template(name) template = IO.read(File.expand_path("script/templates/#{name}", File.dirname(__FILE__))) text = ERB.new(template, nil, "-").result(binding) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
forger-1.6.0 | lib/forger/script.rb |
forger-1.5.4 | lib/forger/script.rb |
forger-1.5.3 | lib/forger/script.rb |