postmodern/chruby — pull request #223 by wfarr (2013-10-30 22:25:59+00:00)
Title: Support global and user default chruby versions in auto.sh

The current behavior in chruby is to fallback to the system Ruby
if no version has been set explicitly, or through a .ruby-version
file in cases where auto.sh is loaded.

This adds some additional automatic version selection lookups to
only if auto.sh is loaded:

* A .ruby-version file in the PWD or any of its parent directories
will still have the highest priority.
* If the above condition is not met, but the user has a file at
$HOME/.rubies/version, that version will be enabled.
* If neither of the above conditions are met, but the system has
a file at $CHRUBY_ROOT/versions, that version will be enabled.
* If none of the above conditions are met, the system Ruby will
be enabled.

Because this change introduces only two additional lookups, it is
both pretty low in overhead and backwards-compatible with existing
configurations relying on auto.sh.