Class: Nib::Shell
Constant Summary collapse
- SCRIPT =
"if hash bash 2>/dev/null ; then\n bash\nelif hash ash 2>/dev/null ; then\n ash\nelse\n sh\nfi\n".freeze
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 ||= " docker-compose \\\n run \\\n --rm \\\n -e HISTFILE=./tmp/shell_history \\\n \#{service} \\\n \#{command}\n SCRIPT\nend\n" |