Gemfile: Add "rake" in "group :test" to satisfy Travis.
Introduce LogAdapter class

This abstracts away conditions testing whether a logger is present and
log level handling. The interface is deliberately more narrow than that
of Logger -- we can always enlarge it.

Based on code by Josef Reidenger in GH-5.
Extract BUILTIN_DEFAULT_OPTIONS

Based on code by Josef Reidenger in GH-5.
Replace the :capture option with :stdout and :stderr

This is a preparation for the possibility to pass standard and error
outputs to streams. This will be done by specifying the streams using
the :stdout and :stderr options. Once that is implemented, having the
:capture option in addition to these two would be unnatural. So let's
get rid of it in advance.
Delete bunch of specs with wrong descriptions that are useless now

We now always set exceptions' stdout and stderr, so specs verifying that
in various situations are not needed anymore. Moreover the specs had
descriptions that were no longer valid.
Make cheetah.rb require "logger"

The missing require wasn't visible before because tests required
"logger" and Cheetah needed only in the "run" method so Ruby didn't
complain after requiring it. This has changed after extracting
BUILTIN_DEFAULT_OPTIONS.
Allow passing an IO in the :stdin option
Make spec description more specific
Allow streaming standard and error output into an IO
Move creating pipes closer to the place they are used
Display commands in logs and exception messages differently

The new way should be directly copy-pastable into the shell. More
importantly, it will be easy to extend it to support piped commands.
Use one hash instead of six variables to store the pipes

This makes the code little bit uglier but will make passing pipes
between methods much less cumbersome.
Extract the "fork_command" method

This is a preparation for piped commands support.
Implement support for piped commands

I'll adapt the documentation for Cheetah.run in some later commit (it
will be a bigger change and I need to think some aspects through).
Replace "/bin/true" with a command that eats all input in some specs

This fixes a bug where a broken pipe error sometimes appeared when
running specs (when "/bin/true" process managed to finish even before
the input was written to it by the select loop).
Fix piped commands tests relying on echo/read synchronization

The echo/read synchronization still didn't guarantee consistent order of
writes into the output file by the piped commands. So I rewrote the
tests not to rely on any synchronization at all. Unsurprisingly, they
ended up significantly simpler.
Prevent double-loading of cheetah.rb when running "bundle exec rake"

The lib/cheetah.rb file was required twice then running "bundle exec
rake":

  1. when processing cheetah.gemspec
  2. when processing spec/spec_helper.rb

Because full path to the file wasn't specified in the second case, the
file wasn't detected as duplicate, was loaded twice and the following
warnings were issued:

  warning: already initialized constant VERSION
  warning: already initialized constant BUILTIN_DEFAULT_OPTIONS
  warning: already initialized constant READ
  warning: already initialized constant WRITE

This commit fixes the problem by specifying full path to lib/cheetah.rb
in spec/spec_helper.rb.
Add .travis.yml specifying 1.8.7 and 1.9.3 as versions to test with
Add ".rbenv-version" to .gitignore
Fix specs in Ruby 1.9.3

In 1.9.3 lambdas apparently complain when they recieve a different
number of parameters than they are supposed to. This was the case with
two lambdas passed to the "log" matcher which raised the following
exception when called:

  ArgumentError: wrong number of arguments (1 for 0)

Adding dummy parameters fixed that.