Class: Nib::Shell
Constant Summary collapse
- SCRIPT =
<<~SH.freeze if hash bash 2>/dev/null ; then bash elif hash ash 2>/dev/null ; then ash else sh fi SH
Instance Method Summary collapse
Methods included from Command
Instance Method Details
#execute ⇒ Object
14 15 16 17 |
# File 'lib/nib/shell.rb', line 14 def execute system('mkdir', '-p', './tmp') super end |
#script ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/nib/shell.rb', line 19 def script @script ||= <<~SCRIPT docker-compose \ run \ --rm \ -e HISTFILE=./tmp/shell_history \ #{service} \ #{command} SCRIPT end |