pyenv/test
Jason Karns c3a5f91ed0 create hook: version-origin
Expose a `version-origin` hook.

It is invoked *before* the traditional `rbenv-version-file` lookup. Because `version-origin` is traditionally run immediately after `version-name`, then any plugin hooks that alter `version-name` would have done so. Thus, running `version-origin` prior to printing the origin gives those plugins a chance to alter the `version-origin` to match.

If any of the hooks set `$RBENV_VERSION_ORIGIN`, then it is used as the return value. Otherwise, the existing logic continues to return "environment variable" or "filename" as appropriate.

This change, in conjunction with the `version-name` hook, makes a clean seam by which plugins can inject their own ruby version setting logic. Using this seam, as opposed to altering `$RBENV_COMMAND_PATH` from the `which` hook, means that the version name and origin are set more reliably and so `version`, `version-name`, `version-origin` and `which` all work as expected. Indeed, even PS1 works now.
2015-12-23 17:22:31 +01:00
..
libexec Add tests for rbenv PATH and RBENV_HOOK_PATH handling 2014-10-19 14:35:36 +02:00
--version.bats
commands.bats
completions.bats
exec.bats
global.bats
help.bats
hooks.bats
init.bats Fix test for adding shims in fish 2015-04-19 23:53:19 +02:00
local.bats
prefix.bats
rbenv.bats Add rbenv's own rbenv.d directory to hook paths 2014-10-19 14:35:36 +02:00
rehash.bats Simplify the shims registration implementation in rbenv-rehash 2014-10-15 05:46:18 +02:00
run Create configure script to generate a cross-platform Makefile 2014-10-13 04:12:35 +02:00
shell.bats
shims.bats
test_helper.bash Fail hard if RBENV_NATIVE_EXT is set but extensions failed to load 2014-10-13 04:12:35 +02:00
version-file-read.bats Move carriage return test to version-file-read 2014-03-21 01:32:29 +01:00
version-file-write.bats
version-file.bats
version-name.bats create hook: version-name 2015-12-23 17:22:30 +01:00
version-origin.bats create hook: version-origin 2015-12-23 17:22:31 +01:00
version.bats Move carriage return test to version-file-read 2014-03-21 01:32:29 +01:00
versions.bats Add tests for non-directory types under RBENV_ROOT/versions/ 2014-10-13 04:02:46 +02:00
whence.bats
which.bats Isolate rbenv-which tests from any .ruby-version file on the system 2014-10-13 12:39:47 +02:00