sstephenson/rbenv — pull request #300 by mislav (2012-12-29 22:48:14+00:00)
Title: support reading .ruby-version

This is a work-in-progress to support reading the `.ruby-version` file if
`.rbenv-version` is not present. Currently the file is read, but the
string "ruby-" is not stripped from its contents for compatibility with
other Ruby version managers.

First I reorganized code a bit to have only one command that has the
knowledge how local version files are named and looked up:
`rbenv-local-version-file`.

This also improves `rbenv local` command so it reports the local version
even if it's set in one of the parent directories, not the current one.

The only next step is to strip "ruby-" from the string read from
`.ruby-version`. However, I can't think of an elegant way to do that.
I'm not sure what is the right level of abstraction to put that logic
in. It certainly doesn't seem like it belongs to
`rbenv-version-file-read`. @sstephenson, wdyt?