class DakeProtocol::Protocol
Constants
- EXT_NAME
Attributes
exec_path[R]
script_stderr[R]
script_stdout[R]
Public Class Methods
new(step, analyzer, dake_db, dry_run)
click to toggle source
# File lib/dake/protocol.rb, line 5 def initialize(step, analyzer, dake_db, dry_run) @step = step @analyzer = analyzer @dake_db = dake_db date = DAKE_EXEC_TIME.strftime('%Y%m%d') time = DAKE_EXEC_TIME.strftime('%H_%M_%S') @exec_path = "#{@dake_db.database_path}/#{date}/#{time}_#{DAKE_EXEC_PID}" @script_stdout = "#{@exec_path}/step.#{@step.object_id}.out" @script_stderr = "#{@exec_path}/step.#{@step.object_id}.err" FileUtils.mkdir_p(@exec_path) if not dry_run and not File.exist? @exec_path end
Public Instance Methods
create_script()
click to toggle source
# File lib/dake/protocol.rb, line 21 def create_script file = File.open(script_file, 'w') file.write @step.cmd_text file.close file end
execute_step(log=false)
click to toggle source
# File lib/dake/protocol.rb, line 28 def execute_step(log=false) end
script_file()
click to toggle source
# File lib/dake/protocol.rb, line 17 def script_file "#{@exec_path}/step.#{@step.object_id}.#{self.class::EXT_NAME}" end