Commit graph

1499 commits

Author SHA1 Message Date
Mislav Marohnić
c38833179b Merge pull request #852 from jasonkarns/extract-hook-helper
Extract hook helper
2016-01-04 18:48:10 +01:00
Jason Karns
565798d617 Test IFS handling in version-name/version-origin hooks 2016-01-04 09:14:28 -05:00
Jason Karns
0f7a2cad8d Use create_hook helper
Use extracted create_hook helper in tests for:

- exec
- hooks
- rehash
- version-name
- version-origin
- which
2016-01-04 09:14:25 -05:00
Jason Karns
5ccba5d7cc Extract common create_hook helper 2016-01-04 09:14:04 -05:00
Jason Karns
2cc2ec160e Remove redundant test
Spaces in hook path is tested in test/hooks.bats
2016-01-04 09:13:58 -05:00
Yamashita, Yuu
5c5205e172 Remove broken 3.4.4rc1 (fixes #515) 2016-01-01 02:12:55 +00:00
Mislav Marohnić
a95ccd09a2 Simplify fallback to global version file 2015-12-29 14:44:32 +01:00
Mislav Marohnić
e199a3d8f7 Merge pull request #850 from jasonkarns/remove-legacy-global-version-file
Remove support for legacy global version files
2015-12-29 14:40:37 +01:00
Mislav Marohnić
fec0f56d0b Merge pull request #849 from jasonkarns/remove-legacy-version-file-handling
Remove all handling/support of .rbenv-version files
2015-12-29 14:34:08 +01:00
Jason Karns
fe809ea90d Remove support for legacy global version files
`default` was made legacy back in 2011 with
5be66da9f4 (the command was renamed from
`rbenv-default` to `rbenv-global`, and so the global file was renamed
from `$RBENV_ROOT/default` to `$RBENV_ROOT/global` (the latter taking
precedence)

`global` was then made legacy about a month later in Sep 2011 when the
preferred filename was changed to `$RBENV_ROOT/version`.
2015-12-28 22:05:00 -05:00
Jason Karns
f880dc6d6f Remove support for legacy version file 2015-12-28 21:34:07 -05:00
Jason Karns
3c9674453f fix local --unset test 2015-12-28 21:33:50 -05:00
Mislav Marohnić
22f4980a21 🔥 deprecated ruby-local-exec
It was useless for a while now. I should have nuked it prior to the
1.0.0 release but I forgot :(
2015-12-25 00:26:46 +01:00
Mislav Marohnić
abbcde665c Fix ToC level
[ci skip]
2015-12-24 20:02:37 +01:00
Mislav Marohnić
c9c9415154 Update ToC 2015-12-24 20:01:36 +01:00
Mislav Marohnić
3997a394d9 rbenv 1.0.0 2015-12-24 19:12:47 +01:00
Mislav Marohnić
e0b85397c8 Point out that it's not necessary to sudo gem install
Closes #532
2015-12-24 19:12:47 +01:00
Mislav Marohnić
e554cd86c3 Strip leading : from RBENV_HOOK_PATH 2015-12-24 19:12:47 +01:00
Mislav Marohnić
38692f97fe vim ignores, the-silver-searcher ignores 2015-12-24 18:18:44 +01:00
Mislav Marohnić
7e5680a0d8 Add configure + make step to installation instructions
This compiles the `realpath` dynamic extension for bash which speeds up
symlink resolution. If the extension doesn't compile due to
cross-platform issues, rbenv will still work normally, although not as fast.
2015-12-24 18:04:17 +01:00
Mislav Marohnić
d51f6d4376 Merge branch 'detect-shell-from-script'
Closes #730
2015-12-24 13:24:54 +01:00
Mislav Marohnić
a9a9636d1e Tweak sanitizing shell name
Handles situation when the output is `/bin/shell- args...`. First strip
away the arguments, then the trailing dash.
2015-12-24 13:23:01 +01:00
Daniel Hahler
32030e2ed9 Fix shell version when invoked from a script
When invoked from a shell script, `$(rbenv init -)` did not get the
shell name correct.
It needs to look at the `args` value from `ps`.

Ref: https://github.com/yyuu/pyenv/issues/373
2015-12-24 13:21:22 +01:00
Mislav Marohnić
f9d8b551dc Add test for detecting shell when rbenv init is called from script
References #730
2015-12-24 13:20:49 +01:00
Mislav Marohnić
2c7960102c Simplify reference to realpath.dylib within rbenv-versions
The `../libexec` dance isn't necessary here. It was only necessary in
main `rbenv` command because that one might have been pointed to
directly via a symlink.
2015-12-24 03:54:32 +01:00
Mislav Marohnić
1a0be6f0ad Improve git --version git revision lookup
It doesn't try to chdir into RBENV_ROOT anymore because that might be
a location of an unrelated rbenv install that might have a different
version than the current one that is installed e.g. via a package
manager such as Homebrew.

Now just tries the repo where the source files (`libexec/*`) are
located, and if that isn't a valid rbenv repo, bail out early.
2015-12-24 03:52:33 +01:00
Mislav Marohnić
6481cbb172 Merge branch 'version-hooks'
Closes #739
2015-12-23 17:42:44 +01:00
Mislav Marohnić
6e30032278 Simplify version-name, version-origin hook tests
No need for helper function that's gonna be used just once.
2015-12-23 17:39:14 +01:00
Mislav Marohnić
4fde4ecbaf Ensure RBENV_VERSION_ORIGIN is not inherited from environment
It's only supposed to be set from `version-origin` hooks, but not
inherited from environment in case it was set.
2015-12-23 17:26:53 +01:00
Mislav Marohnić
40c1d27445 Merge remote-tracking branch 'origin/master' into version-hooks 2015-12-23 17:22:43 +01:00
Jason Karns
97f0499f43 add version-name/version-origin to hooks completion 2015-12-23 17:22:31 +01:00
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
Jason Karns
258e4413b1 create hook: version-name
Expose a `version-name` hook.

It is invoked *after* the traditional `RBENV_VERSION` lookup. Which means hook scripts can interrogate `$RBENV_VERSION_FILE` and/or `$RBENV_VERSION` (or use the executables).

The hooks are then run, giving plugins a chance to alter `RBENV_VERSION`. Once the hooks have run, we now have (in `$RBENV_VERSION`) the actual version we want to use (or it's empty which defaults to `system` per normal). Lastly, the same logic remains for checking if the version exists, or trimming the `ruby-` prefix.

Prime example: the ruby-bundler-ruby-version plugin can select a ruby by using the `ruby` directive from the `Gemfile` if a local `.ruby-version` doesn't exist.
2015-12-23 17:22:30 +01:00
Mislav Marohnić
a62a75369e Merge branch 'rbenv-local-respects-ancestry' 2015-12-23 15:30:18 +01:00
Mislav Marohnić
ba072adcb9 Have rbenv local read version from parent directories as well
Fixes #807
2015-12-23 15:21:24 +01:00
Mislav Marohnić
ca25259900 Allow explicit target directory argument to rbenv-version-file
Can be used for `.ruby-version` file lookup in the ancestry of a
specific directory. In this mode of operation, global version files
aren't taken into consideration, and the command fails unless a local
version file was found.
2015-12-23 15:19:54 +01:00
Yamashita, Yuu
4c06f23aaf Run rehash after conda install 2015-12-23 08:09:40 +00:00
Yamashita, Yuu
046f5bde02 Add miniconda latest 2015-12-23 07:54:47 +00:00
Yamashita, Yuu
c678bb1eaa Add anaconda[23]-2.4.1 2015-12-23 07:41:52 +00:00
Yamashita, Yuu
5e72a4c3e3 Add miniconda[23]-3.19.0 2015-12-23 06:57:51 +00:00
Yamashita, Yuu
23669162c0 Rename anaconda/miniconda to anaconda2/miniconda2 2015-12-23 06:54:28 +00:00
Yamashita, Yuu
01835c2682 Merge pull request #511 from dirn/cpython-3.4.4
Add CPython 3.4.4
2015-12-23 01:00:11 +09:00
Andy Dirnberger
4243ac6ffc Add CPython 3.4.4 2015-12-22 10:58:48 -05:00
Yamashita, Yuu
b0f29d511a v20151222 2015-12-22 10:45:34 +00:00
Yamashita, Yuu
3031cb9750 Add workaround for test failure on Arch Linux (#480) 2015-12-20 12:29:30 +00:00
Yamashita, Yuu
6bcb1d6211 Merge pull request #510 from yyuu/no-ssl3-for-py30-py31-py32
`OPENSSL_NO_SSL3` patch for 3.0.x, 3.1.x and 3.2.x
2015-12-20 16:54:04 +09:00
Yamashita, Yuu
3d1ba0c58c Add OPENSSL_NO_SSL2 & OPENSSL_NO_SSL3 patch for 3.0.1, 3.1 and 3.1.2 2015-12-20 07:46:36 +00:00
Yamashita, Yuu
68e8945f74 Add OPENSSL_NO_SSL2 & OPENSSL_NO_SSL3 patch for 3.1.3 2015-12-20 07:46:01 +00:00
Yamashita, Yuu
3ddbb19663 Add OPENSSL_NO_SSL3 patch for 3.1.4 .. 3.1.5 2015-12-20 07:45:39 +00:00
Yamashita, Yuu
763a30bb1d Add OPENSSL_NO_SSL3 patch for 3.2 2015-12-20 07:16:08 +00:00