class Deployinator::Deploy
Public: this class represents the Deploy
object with all the properties the different helper and stack methods need to do the deploy. It is basically an almost empty class and gets all of its functionality by the modules it includes/extends based on the stack we are deploying.
Public Class Methods
new(args)
click to toggle source
Public: initialize the deploy class with instance variables that are needed by the deploy methods, runlog helpers and all that
Params:
args - hash which at least has the following fields: { :username => "name of the person that is deploying", :stack => "the name of the stack to deploy", :stage => "stage of the stack to deploy" }
Returns the runlog filename
# File lib/deployinator/controller.rb, line 28 def initialize(args) @deploy_start_time = Time.now.to_i @start_time = Time.now.to_i @username = args[:username] @groups = args[:groups] @host = `hostname -s` @stack = args[:stack] @method = args[:method] @filename = "#{@deploy_start_time}-#{@username}-#{args[:method]}.html" @deploy_time = Time.now.to_i # This gets the runlog output on the console; is used by log_and_stream @block = args[:block] || Proc.new do |output| $stdout.write output.gsub!(/(<[^>]*>)|\n|\t/m) {" "} $stdout.write "\n" end end
Public Instance Methods
get_deploy_time()
click to toggle source
# File lib/deployinator/controller.rb, line 50 def get_deploy_time @deploy_time end
get_filename()
click to toggle source
# File lib/deployinator/controller.rb, line 46 def get_filename @filename end