Class: Loom::Shell::HarnessCommandBuilder
- Inherits:
-
Object
- Object
- Loom::Shell::HarnessCommandBuilder
- Defined in:
- lib/loom/shell/harness_command_builder.rb
Constant Summary collapse
- SCRIPT =
TODO: Resolve a real script path.
"./scripts/harness.sh"
- DEFAULT_RUN_OPTS =
{ :cmd_shell => "/bin/dash", :record_file => "/opt/loom/commands" }
Instance Method Summary collapse
- #check_cmd ⇒ Object
-
#initialize(harness_blob) ⇒ HarnessCommandBuilder
constructor
A new instance of HarnessCommandBuilder.
- #run_cmd ⇒ Object
Constructor Details
#initialize(harness_blob) ⇒ HarnessCommandBuilder
Returns a new instance of HarnessCommandBuilder.
16 17 18 19 |
# File 'lib/loom/shell/harness_command_builder.rb', line 16 def initialize(harness_blob) @harness_blob = harness_blob @run_opts = DEFAULT_RUN_OPTS.dup end |
Instance Method Details
#check_cmd ⇒ Object
28 29 30 31 32 |
# File 'lib/loom/shell/harness_command_builder.rb', line 28 def check_cmd build_cmd :check, @harness_blob.checksum, { :stdin => @harness_blob.encoded_script } end |
#run_cmd ⇒ Object
21 22 23 24 25 26 |
# File 'lib/loom/shell/harness_command_builder.rb', line 21 def run_cmd build_cmd :run, @harness_blob.checksum, *hash_to_opts_array(@run_opts), { :stdin => @harness_blob.encoded_script } end |