Exit_Zero
A simple method that raises Exit_Zero::Non_Zero if $?.exitstatus is not zero.
If you want other functionality, such as capturing standard output/error, then you should use posix-spawn. That is the easiest way to handle child processes (aka shelling out a command). Here are other alternatives.
Installation
gem 'Exit_Zero'
Useage
require "Exit_Zero"
Exit_Zero( 'uptime' )
# The following raises an error.
Exit_Zero( 'uptimess' )
Run Tests
git clone git@github.com:da99/Exit_Zero.git
cd Exit_Zero
bundle update
bundle exec bacon spec/main.rb
"I hate writing."
If you know of existing software that makes the above redundant, please tell me. The last thing I want to do is maintain code.