postmodern/ruby-install — pull request #84 by davidcelis (2013-10-11 22:19:29+00:00)
Title: Check for existance of $INSTALL_DIR pre-install

As a fix for #56 and #57, check to see if `$INSTALL_DIR` is already a
directory. If it is, install the specified Ruby to
`$INSTALL_DIR/$RUBY-$RUBY_VERSION`. If it isn't, install directly to
`$INSTALL_DIR`. The default for this directory is still the same:
`/opt/rubies` or `~/.rubies`, but this prevents problems such as specifying
`ruby-install -i ~/.rbenv/versions ruby 2.0.0` causing Ruby 2.0.0 to be
installed with `~/.rbenv/versions` as the root directory rather than
`~/.rbenv/versions/ruby-2.0.0-p247`

It is my opinion that an additional `--rubies-dir` option is unnecessary,
but perhaps others disagree with this. IMO this quick check is simpler
and effective.

Signed-off-by: David Celis