Allow the worker command to be customized

This was hard-coded to .buffet/buffet-worker; making it customizable
will allow for more advanced usage like setting up RVM.

Change-Id: I9a2a174eb1f607ff5e0050d8d2b52a1174dd0952
Reviewed-on: https://gerrit.causes.com/6386
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Lann Martin <lann@causes.com>
Make `Settings#load_file` a private method

This looks like it should be an internal implementation detail, and
apart from one (ab)use it wasn't being used outside the class, so this
commit makes it a private method.

The one external caller was instead taught to use a `.settings_file=`
accessor method.

Change-Id: I76ea3440e534d5ef3ecdb1a632b5becb9cd3037c
Reviewed-on: https://gerrit.causes.com/9275
Tested-by: Greg Hurrell <greg@causes.com>
Reviewed-by: Aiden Scandella <aiden@causes.com>
Teach Buffet to write per-build log files

All Buffet runs share a single log file and it quickly becomes
unmanageably large. Furthermore, because multiple Buffet runs can be
occurring at the same time, the log output can become interleaved in
confusing ways. Teach Buffet to write a separate log file for each
build.

Buffet now understands a `-l`/`--log` option which can be used to pass
in a log file name at runtime. In a Jenkins set-up you would typically
make this some combination of project name and build number.

If the `-l`/`--log` option isn't passed, the settings file ("buffet.yml"
by default) will be consulted, and the final fallback will be the
default of "buffet.log".

Incidentally, did some minor tweaking along the way to enforce
consistent naming (eg. "log_dir" vs "logdir").

Related story:
  http://www.pivotaltracker.com/story/show/32200237
  ("Teach Buffet to write per-build log files")

Change-Id: Idf831a17a5c0136316b4fd429d41687c2b2481ad
Reviewed-on: https://gerrit.causes.com/9276
Tested-by: Greg Hurrell <greg@causes.com>
Reviewed-by: Aiden Scandella <aiden@causes.com>
Bump version to 1.2

Change-Id: I60753751d589272a0b8cc2e8b0fac8b0d5a90b0b
Reviewed-on: https://gerrit.causes.com/9277
Tested-by: Greg Hurrell <greg@causes.com>
Reviewed-by: Aiden Scandella <aiden@causes.com>
Fix Ruby 1.9 compatibility issue in options passing

Wrap "spec" in an array so that Ruby 1.9 doesn't freak out when we call
`#each` on it.

Related story:
  http://www.pivotaltracker.com/story/show/32230263 (fixed)
  ("Fix Ruby 1.9 compatibility issue in options passing")

Change-Id: I90e26c7469e9042913feffdeb897375a9cc30534
Reviewed-on: https://gerrit.causes.com/9315
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Use Ruby 1.9 compatible require format in worker script

Use an absolute path when requiring the RSpec formatter, as this will
work on both Ruby 1.8.7 and Ruby 1.9.x.

Related story:
  http://www.pivotaltracker.com/story/show/32230861 (fixed)
  ("Use Ruby 1.9 compatible require format")

Change-Id: I08920900dc74c7612865ffa00a3c335f59de03e8
Reviewed-on: https://gerrit.causes.com/9316
Reviewed-by: Aiden Scandella <aiden@causes.com>
Reviewed-by: Richard Zschech <richard.zschech@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Bump version number for 1.2.1 release

Change-Id: I28929638c3f46374eab22f175d11cab3f418c34e
Reviewed-on: https://gerrit.causes.com/9317
Reviewed-by: Aiden Scandella <aiden@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Return information about example groups on failure

Example#execution_result[:exception] only has information about the
example that failed, which does not include the example group for
shared examples. This appends the calling location to the failure
message for shared examples.

Reference code: https://github.com/rspec/rspec-core/blob/v2.8.0/
                  lib/rspec/core/formatters/base_text_formatter.rb#L178

Change-Id: I8d3ae6583c1b66ffa3a5e1021e47ce371d69d431
Reviewed-on: https://gerrit.causes.com/9699
Reviewed-by: Elliot Block <elliot.block@causes.com>
Tested-by: Lann Martin <lann@causes.com>
Bump version number for 1.2.2 release

Change-Id: I67b9e5df02978f02d9815762c28a127cdab30f34
Reviewed-on: https://gerrit.causes.com/9922
Reviewed-by: Lann Martin <lann@causes.com>
Tested-by: Lann Martin <lann@causes.com>
Add .idea to .gitignore
Support RVM
Use RSpec API in RSpec 2 runner. Running specs in this way has a better performance and allows to avoid collisions  on environment cleanup (such as clearing of shared example groups after each spec).
Require spec_helper before first spec
Support buffet slaves without implicit user
Ignore offline slaves