summaryrefslogtreecommitdiff
path: root/lib/mixlib/shellout.rb
diff options
context:
space:
mode:
authorHo-Sheng Hsiao <hosheng.hsiao@gmail.com>2012-03-26 14:52:35 -0400
committerHo-Sheng Hsiao <hosheng.hsiao@gmail.com>2012-03-26 14:54:48 -0400
commit318c5572bc6cd1f3452760558bbb9da8b3b6dc9d (patch)
tree6915e8b3b6d5740f40215073f33d7bdc33b38ac0 /lib/mixlib/shellout.rb
parent724419d3d443ccf58075ef803b9aaf028ce2a4ee (diff)
downloadmixlib-shellout-318c5572bc6cd1f3452760558bbb9da8b3b6dc9d.tar.gz
[CHEF-2994][STDIN] ShellOut.new should accept input as an option
Diffstat (limited to 'lib/mixlib/shellout.rb')
-rw-r--r--lib/mixlib/shellout.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/mixlib/shellout.rb b/lib/mixlib/shellout.rb
index 94ea6c9..2082f41 100644
--- a/lib/mixlib/shellout.rb
+++ b/lib/mixlib/shellout.rb
@@ -145,6 +145,7 @@ module Mixlib
def initialize(*command_args)
@stdout, @stderr = '', ''
@live_stream = nil
+ @input = nil
@log_level = :debug
@log_tag = nil
@environment = DEFAULT_ENVIRONMENT
@@ -255,6 +256,7 @@ module Mixlib
private
+ # FIXME: This can be done better
def parse_options(opts)
opts.each do |option, setting|
case option.to_s
@@ -272,6 +274,8 @@ module Mixlib
self.valid_exit_codes = Array(setting)
when 'live_stream'
self.live_stream = setting
+ when 'input'
+ self.input = setting
when 'logger'
self.logger = setting
when 'log_level'