Module: Packer::Binary::Helpers
- Included in:
- Compressor, Executable
- Defined in:
- lib/packer/binary/helpers.rb
Class Method Summary collapse
- .debug(message) ⇒ Object
- .err(message) ⇒ Object
- .msg(message) ⇒ Object
- .stderr ⇒ Object
- .stdout ⇒ Object
-
.system_command(*command_args) ⇒ Object
Runs given commands using mixlib-shellout.
Class Method Details
.debug(message) ⇒ Object
23 24 25 |
# File 'lib/packer/binary/helpers.rb', line 23 def debug() stdout.print("#{}\n") if ENV['DEBUG'] end |
.err(message) ⇒ Object
15 16 17 |
# File 'lib/packer/binary/helpers.rb', line 15 def err() stderr.print("#{}\n") end |
.msg(message) ⇒ Object
19 20 21 |
# File 'lib/packer/binary/helpers.rb', line 19 def msg() stdout.print("#{}\n") end |
.stderr ⇒ Object
31 32 33 |
# File 'lib/packer/binary/helpers.rb', line 31 def stderr $stderr end |
.stdout ⇒ Object
27 28 29 |
# File 'lib/packer/binary/helpers.rb', line 27 def stdout $stdout end |
.system_command(*command_args) ⇒ Object
Runs given commands using mixlib-shellout
9 10 11 12 13 |
# File 'lib/packer/binary/helpers.rb', line 9 def system_command(*command_args) cmd = Mixlib::ShellOut.new(*command_args) cmd.run_command cmd end |