Sha256: ed2d647849a474c9b89a55a73bb5b585a9d4fa7a4bce32fde2843e72b1a79f4b

Contents?: true

Size: 1.66 KB

Versions: 3

Compression:

Stored size: 1.66 KB

Contents

command-exec(1) -- execute shell commands with ease
===================================================

## Description

This gem brings command execution via POpen4 with all the bells and whistles.

## Usage

```ruby
require 'command_exec'

#long form
command = CommandExec::Command.new( 'command' )
command.run

#short form
command = CommandExec::Command.execute( 'command')

#full path to commadn
command = CommandExec::Command.execute( 'path/to/command')

# available options
command = CommandExec::Command.new(
  'command',
  :logger => Logger.new($stderr),
  :options => '--command options',
  :parameter => 'command parameter',
  :error_keywords => ['key words in', 'stdout with indicate errors' ],
  :working_directory => 'working/directory/where/the/command/should/be/executed/in',
  :logfile => 'path/to/logfile.log',
  :debug => false,
  )
command.run
```

## Output

After execute the command you get the following output. Today it's not possible
to suppress that output, but it's on the roadmap.

### Successfull 

```
<timestamp> command: OK
```

### Failed with STDERR set

```
<timestamp> command: FAILED
================== LOGFILE ==================
[...]
================== STDOUT ==================
[...]
================== STDERR ==================
[...]
```

### Failed with string in STDOUT indicating an error

```
<timestamp> command: FAILED
================== STDOUT ==================
```

## Dependencies

Please see the gemspec for runtime dependencies and the 'Gemfile' for
development dependencies.

## Todo

Please see TODO.md for enhancements which are planned for implementation.

## Copyright

(c) 2012-, Max Meyer

## License

Please see LICENSE.md for license text.

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
command_exec-0.1.0 README.md
command_exec-0.0.3 README.md
command_exec-0.0.2 README.md