lrun-ruby

Gem Version Build Status Code Climate

Ruby binding for lrun

Dependencies

  • lrun
  • Ruby 1.9 or above

Installation

  1. Install lrun binary. For detailed steps, please refer to lrun project page.
  2. Install lrun-ruby gem:
gem install lrun-ruby

Usage

require 'lrun'

Lrun.run('false').exitcode # => 1
Lrun.run(['echo', 'hello']).stdout # => "hello\n"

runner = Lrun::Runner.new(:max_cpu_time=>1, :chdir=>"/tmp")
runner.run('pwd').stdout # => "/tmp\n"
runner.chdir('/bin').run('pwd').stdout # => "/bin\n"

See documentation for details.