https://github.com/quark-zju/lrun-ruby
Ruby binding for lrun
https://github.com/quark-zju/lrun-ruby
Last synced: 3 months ago
JSON representation
Ruby binding for lrun
- Host: GitHub
- URL: https://github.com/quark-zju/lrun-ruby
- Owner: quark-zju
- License: mit
- Created: 2013-03-23T00:29:43.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-04-08T17:40:44.000Z (about 12 years ago)
- Last Synced: 2024-04-24T13:45:32.339Z (about 1 year ago)
- Language: Ruby
- Size: 254 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lrun-ruby
[](http://badge.fury.io/rb/lrun-ruby)
[](https://travis-ci.org/quark-zju/lrun-ruby)
[](https://codeclimate.com/github/quark-zju/lrun-ruby)Ruby binding for [lrun](https://github.com/quark-zju/lrun)
## Dependencies
* [lrun](https://github.com/quark-zju/lrun)
* Ruby 1.9 or above## Installation
1. Install lrun binary. For detailed steps, please refer to [lrun project page](https://github.com/quark-zju/lrun).
2. Install `lrun-ruby` gem:```bash
gem install lrun-ruby
```## Usage
```ruby
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](http://rdoc.info/github/quark-zju/lrun-ruby/frames/index) for details.