Simple wrapper for Open3 to execute command.
The command treated as an object and is able to be executed.
You can specify logger
to point runtime messages to and
work_dir
to change into it before each run.
Add this line to your application's Gemfile:
gem 'cmd_runner'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cmd_runner
cmd = CmdRunner::Command.new('ls')
cmd.work_dir = '/tmp'
cmd.logger = Logger.new('./ls.log')
cmd.execute!
#=> [0, "launch-qO1j87\ntextmate-501.sock\n", '']
As always:
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request