Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
/ ruby-execute Public archive

Popen wrapper with additional functionality for ruby

License

Notifications You must be signed in to change notification settings

lscheidler/ruby-execute

Repository files navigation

Execute

Build Status

Popen-wrapper, which provides additional features

Installation

Add this line to your application's Gemfile:

gem 'execute', git: 'https://github.com/lscheidler/ruby-execute'

And then execute:

$ bundle

Usage

execute echo command

status = Execute::execute ['echo', 'hello world']

# print output
puts status.stdout

execute echo command and print command

status = Execute::execute ['echo', 'hello world'], print_cmd: true

execute echo command and print output

status = Execute::execute ['echo', 'hello world'], print_lines: true

execute false command and throw exception, because exitstatus > 0

status = Execute::execute ['false'], throw_exception: true

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/lscheidler/ruby-execute.

License

The gem is available as open source under the terms of the Apache 2.0 License.

About

Popen wrapper with additional functionality for ruby

Resources

License

Stars

Watchers

Forks

Packages

No packages published