| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Executor aims to provide a standard interface to work with binaries outside of ruby. It provides a standard implementation of the following requirements:
redirect_stderr - This will cause any stderr from a command to be merged to stdout
raise_exceptions - This will listen for the exit code of the executed process and raise an exception if non 0
async - This is true by default if a block is given to Executor::command, async will create a new thread and execute the passed block upon completion of the process
logger - This takes an instance of logger (or an instance that implements #info)
require 'executor'
Executor::command("echo 5")
Executor::command("expr 5 / 0", :redirect_stderr => true)
Executor::configure(
:raise_exceptions => false
)
Executor::command("expr 5 / 0")
credits: me, robgleeson@freenode
| Back | FazBrowse Home | New Git URL |