Sha256: 09bbb27961e407e7f7b2ea4fe29f22a6e2022712d376de5a9ac230cf1fdc00f9

Contents?: true

Size: 1.35 KB

Versions: 1

Compression:

Stored size: 1.35 KB

Contents

__OVERVIEW__


| Project         | shell\_command 
|:----------------|:--------------------------------------------------
| Homepage        | https://github.com/robgleeson/shell_command
| Wiki            | https://github.com/robgleeson/shell_command/wiki
| Documentation   | http://rubydoc.info/gems/shell_command/frames 
| Author          | Rob Gleeson   

__DESCRIPTION__

Spawning shell commands in Ruby is already pretty nice but I think we can do 
better. `shell_command` tries to do it better by providing an object that gives 
you access to  information about the command you've executed. If you have 
spawned shell commands and wondered was the command successful
(e.g: did it exit with a status code of 0?), and what did it  write to the 
standard error or standard output streams then `shell_command` might be useful
to you.

__EXAMPLES__

The first example lets you handle a failure of a command yourself, but the second
example assumes you want a exception raised on failure.

__1.__

    ShellCommand.run "ls" do |command|
      if command.success?
        puts command.stdout
      else
        puts "Looks like `ls` had problems executing."
      end
    end

__2.__

    begin
      ShellCommand.run! "ls"
    rescue ShellCommand::Exception => e 
      p e.message
    end

__SUPPORTED PLATFORMS__

  - Rubinius (1.9 mode)
  - CRuby 1.9+

__LICENSE__

See LICENSE.txt

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shell_command-0.2.6 README.md