Commit graph

143 commits

Author SHA1 Message Date
Yamashita, Yuu
8da3749648 Merge remote-tracking branch 'rbenv/master' into rbenv-20151121 2015-11-21 04:21:14 +00:00
Jason Karns
a3ff3adc39 create local .ruby-version file in test dir
This new test was creating an (intentionally invalid) .ruby-version file
in current working directory; typically the rbenv project dir.
Immediately after test runs, I had a leftover .ruby-version file.

The version-file tests create and cd into the RBENV_TEST_DIR as part of
setup(). I'm using the same directory for this test fix, but am only
using it for this particular test. None of the other exec tests seem to
need to be in a temp test dir, so no use putting it in setup().
2015-11-20 09:51:44 -05:00
Jason Karns
d7ca2aba2a add --help to subcommand completions
ensure subcommand exists, then include --help in its completion output
2015-11-19 12:05:19 -05:00
Mislav Marohnić
825de5d2e3 Fix argument handling in main rbenv command
- Explicitly asking for help with `-h` or `--help` exits with 0 status
  and displays help on stdout.

- Not providing any arguments to rbenv results in failure status and
  displays version and help on stderr.
2015-11-19 01:52:48 +01:00
Mislav Marohnić
8f87f43e22 Fix broken version-dependent test
Broken in dcca61c0bc
2015-11-14 12:21:16 +00:00
Mislav Marohnić
c30e096a54 Merge branch 'which-fixes' 2015-11-14 10:42:41 +00:00
Mislav Marohnić
3405c4d03c Fix error message when command is not found for "system" version
If `foo` didn't exist and `RBENV_VERSION=system rbenv which foo` was
called, the error message used to be misleading:

    rbenv: version `system' is not installed

Instead, have the error message simply say that the command was not found.

Fixes #770
2015-11-13 23:10:09 -05:00
Mislav Marohnić
09b18cf6f5 Add test for version-origin when version not found in rbenv-exec 2015-11-13 23:09:12 -05:00
Daniel Hahler
6296bf3f8b tests: fix path_without to handle /bin properly
I was seeing /bin being left.  This patch fixes it by anchoring the search
pattern with ':' on both sides.
2015-11-12 21:20:00 +01:00
Yamashita, Yuu
9163c46568 v20151105 2015-11-05 09:21:08 +00:00
Yamashita, Yuu
0daf04a71b v20151103 2015-11-03 13:31:28 +00:00
Mislav Marohnić
e80886e9be Add rbenv versions --skip-aliases option
Useful in combination with `--bare` to list just the unique version
numbers without the extra directory entries that are symlinks to other
version numbers in the same directory.
2015-10-27 21:05:10 +01:00
Mislav Marohnić
7026e529c7 Fix realpath fallback in rbenv hooks
The symlinks weren't correctly resolved if they were pointing to a
single path component, such as `ln -s foo bar`.
2015-10-27 21:05:10 +01:00
Mislav Marohnić
dcca61c0bc Improve rbenv --version git checkout discovery
When `rbenv --version` is called, this now happens:

1. It changes into the directory where `libexec/rbenv--version` resides
   and checks if it's a checkout of the rbenv repo (as opposed to
   Homebrew checkout or something else). Then it reads the git revision.

2. If that failed, change to `$RBENV_ROOT` directory and repeat step 1.
2015-10-25 16:54:38 +01:00
Mislav Marohnić
efb187f26f Merge pull request #663 from kevinburke/use-command
Use `command` to run rbenv rehash
2015-10-11 04:04:46 +02:00
Mislav Marohnić
8a0555f8ef Init RBENV_TEST_DIR properly and only once during test setup 2015-10-10 19:02:11 +02:00
Mislav Marohnić
55f692ba9c Merge commit 'refs/pull/562/head' of https://github.com/sstephenson/rbenv 2015-10-10 18:42:36 +02:00
Mislav Marohnić
3a265c1af9 Unset XDG_CONFIG_HOME and related variables during tests
If set by the user's environment, `git config --global` writes will go
to that destination instead of temporary $HOME. We definitely don't want
that.

Fixes #742
2015-10-10 18:39:23 +02:00
Yamashita, Yuu
19c02bf39c v20151006 2015-10-06 14:12:04 +00:00
Yamashita, Yuu
948d1f4ca7 Merge branch 'blueyed-pyenv-rehash-python-glub' (fixes #379, #404) 2015-09-22 15:28:15 +09:00
Yamashita, Yuu
438e828eb5 add tests for PYENV_FILE_ARG 2015-09-22 15:28:00 +09:00
Josh Friend
c452da8084 v20150913 2015-09-13 11:03:52 -04:00
Josh Friend
193e64b6b2 v20150901 2015-09-01 13:59:13 -04:00
Yamashita, Yuu
7f32e96c28 v20150719 2015-07-19 13:07:24 +09:00
Daniel Hahler
e3982fae38 Display version origin with non-installed versions
This is useful as an indicator where it is coming from.
2015-07-17 17:10:33 +02:00
Yamashita Yuu
114063495f pyenv-prefix should return proper prefix of system version (fixes #391) 2015-06-27 01:07:18 +09:00
Josh Friend
5cb9c9af2e v20150601 2015-06-01 21:48:44 -04:00
Yamashita Yuu
9aee57d965 Fix test for adding shims in fish 2015-05-27 00:54:19 +09:00
Yamashita Yuu
1b066598ce v20150524 2015-05-24 10:53:17 +09:00
Yamashita, Yuu
46ffb0c8df Merge pull request #290 from blueyed/version-handle-missing-better
Improve `pyenv version`, if there is one missing
2015-05-17 12:05:03 +09:00
Josh Friend
1d31529b46 v20150404 2015-05-04 08:25:25 -04:00
Daniel Hahler
10d5d9a24f tests: fix desc for "can add shims to PATH more than once"
This seems to have not been merged properly.

A similar issue is with the test for fish, which has been submitted as a
PR for rbenv: https://github.com/sstephenson/rbenv/pull/722.
2015-04-20 00:00:04 +02:00
Daniel Hahler
06c1959e78 Fix test for adding shims in fish
Commit e2173df4 (for issue #369) did not handle the fish test properly.

This renames it and fixes the assertion.
2015-04-19 23:53:19 +02:00
Kevin Burke
0cd078bae6 Merge branch 'master' into use-command 2015-03-31 18:57:44 -07:00
Yamashita Yuu
ab2aa6d13b v20150326 2015-03-26 23:13:55 +09:00
Yamashita Yuu
f48a5b11d7 Import recent changes from rbenv 4d72eefffc 2015-03-07 01:01:32 +09:00
Yamashita Yuu
efe461d2b4 v20150226 (#323) 2015-02-26 11:35:10 +09:00
Yamashita Yuu
9146f44db1 v20150204 2015-02-04 10:33:21 +09:00
Mislav Marohnić
6820704c91 Remove warning about extraneous "ruby-" prefix in .ruby-version
When we started to support reading `.ruby-version` files, we made a
commitment to not support fuzzy version matching. Treating "ruby-2.1.5"
as "2.1.5" is a sort of fuzzy matching, so we put in place a warning
telling you to remove the extraneous "ruby-" prefix popularly used by
other Ruby version managers to denote MRI. (Their logic is that MRI is
"ruby" and other rubies are not "ruby", apparently.)

However, people are often not able to remove the prefix in their
projects because they want to support other coworkers and tools that
sadly still require the prefix, like RubyMine.

So to restore sanity for a big portion of our users, the warning is gone.
2015-01-29 01:55:58 -08:00
Yamashita Yuu
8abefe1fcb v20150124 2015-01-24 00:45:03 +09:00
Daniel Hahler
e8433cfeb3 Use exitcode from pyenv-version-name in pyenv-version, do not halt 2014-12-11 20:37:03 +01:00
Daniel Hahler
7f88eabd0b Improve pyenv version, if there is one missing
Display the other available ones still.

Fixes https://github.com/yyuu/pyenv/issues/291
2014-12-11 18:49:38 +01:00
Yamashita Yuu
d320d74a07 v20141211 (fixes #288) 2014-12-11 22:39:38 +09:00
Yamashita Yuu
5ca423c9f3 Revert a fix for #101 to fix broken tests relating to PYENV_NATIVE_EXT 2014-12-01 20:34:12 +09:00
Yamashita Yuu
f0e852553a Import rbenv changes at 7e0e85bdda 2014-12-01 00:29:26 +09:00
Kevin Burke
c9a96c9f79 Use command to run rbenv rehash
In the event that `eval "$(rbenv init -)"` is called from a function named
rbenv (which I do to get rbenv to load lazily in my shell), evaluating the
phrase `rbenv rehash` will cause the outer function to run again (causing an
infinite loop).

This change makes it clear you want the command named rbenv and not a function
which may exist in the environment.
2014-11-28 21:16:14 -08:00
Makoto Sasaki
c0aff27842 v20141127 2014-11-27 14:58:31 +09:00
Yamashita Yuu
8761ae8f7c v20141118 2014-11-18 20:05:01 +09:00
Yamashita Yuu
6c2d234e55 Split test files 2014-11-13 21:56:14 -08:00
Yamashita Yuu
7220044b49 v20141106 2014-11-06 09:41:22 -08:00