Commit graph

568 commits

Author SHA1 Message Date
Almog Kurtser
c7208bf1ff Homebrew homepage location changed 2013-07-25 00:02:05 +03:00
Mislav Marohnić
db143bb654 rbenv exec: avoid mutating PATH
Enables shelling out from a ruby process started with rbenv to a ruby
process with a different RBENV_VERSION. Fixes #121

This removes the workaround created for #15 and solves `ruby -S` support
by setting RUBYPATH. PATH is never changed.

To illustrate how RUBYPATH changes in various configurations:

    PATH=~/bin:~/.rbenv/shims:/usr/bin:/bin
    RBENV_VERSION=1.8 ruby -S rake
    #=> executes ~/.rbenv/versions/1.8/bin/rake
    #=> RUBYPATH=~/bin:~/.rbenv/versions/1.8/bin:/usr/bin:/bin

    RBENV_VERSION=2.0 ruby -S rake
    #=> executes ~/.rbenv/versions/2.0/bin/rake
    #=> RUBYPATH=~/bin:~/.rbenv/versions/2.0/bin:/usr/bin:/bin

    RBENV_VERSION=system ruby -S rake
    #=> executes /usr/bin/rake
    #=> RUBYPATH=~/bin:/rbenv_shims_were_here:/usr/bin:/bin

    RBENV_VERSION=1.8 ruby -S rake
    #=> executes ~/.rbenv/versions/1.8/bin/rake
    #=> RUBYPATH=~/bin:~/.rbenv/versions/1.8/bin:/usr/bin:/bin
2013-06-20 20:41:22 +02:00
Mislav Marohnić
8b043038b8 ensure cleaner PATH in test environment 2013-06-20 20:41:22 +02:00
Marc Huffnagle
5130b41f5b suggest cloning rbenv via https instead of git:// 2013-06-07 19:25:29 +02:00
James FitzGibbon
81bb14e181 bail out early if readlink is not available
readlink comes from GNU coreutils.  On systems without it, rbenv used to
spin out of control when it didn't have readlink or greadlink available
because it would re-exec the frontend script over and over instead of the
worker script in libexec.

Fixes #389
2013-06-07 19:16:38 +02:00
Mislav Marohnić
e93ab45dc3 work around bug in git 1.8.2.1 in tests
Making empty commits in tests blocked by opening the default text
editor, waiting for a message which we specified to be empty.

http://thread.gmane.org/gmane.comp.version-control.git/225529
2013-06-07 19:13:54 +02:00
Mislav Marohnić
060f141b21 test that IFS in hooks is correct
closes #379
2013-04-16 14:01:43 +02:00
Ian Yang
6ca591ab75 restore original IFS for hooks 2013-04-16 14:01:43 +02:00
Mislav Marohnić
bc1049f5ae improve versions tests by cd'ing into a clean slate 2013-04-16 12:52:42 +02:00
Mislav Marohnić
05568496c1 Merge branch 'test-coverage' for MAXIMUM COVERAGE 2013-04-08 23:17:03 +02:00
Mislav Marohnić
ab9ebb9d0d add tests for help and rbenv --version 2013-04-08 23:16:35 +02:00
Mislav Marohnić
ab197ef51e add tests for version commands 2013-04-08 23:16:35 +02:00
Mislav Marohnić
7fc5f46bbb undo assert_output_lines in tests
It was a dumb idea and it wasn't even implemented perfectly.
2013-04-08 23:16:35 +02:00
Mislav Marohnić
969af1567a add tests for rehash, whence, which 2013-04-08 23:02:30 +02:00
Mislav Marohnić
7a10b64cf7 better emulate ruby -S behavior in testing
Per https://github.com/ruby/ruby/blob/7d3db3c/ruby.c#L1383-1391
2013-04-02 02:48:27 +02:00
Mislav Marohnić
f6db678b20 un-indent shebang for test executables 2013-04-02 02:48:04 +02:00
Mislav Marohnić
97290b2442 simplify iterating through arglist 2013-04-02 02:41:28 +02:00
Mislav Marohnić
b8504ed2a9 saner assertions for multiline output 2013-04-02 00:27:27 +02:00
Alisdair Sullivan
497911d6c0 improve detection of completion support for commands
Enable JavasCript, Lua and Erlang scripts to provide completions
2013-04-01 16:39:51 +02:00
Mislav Marohnić
4d96d0a6c6 add tests for completions 2013-04-01 16:22:02 +02:00
Mislav Marohnić
9b58b6642e test completions for exec 2013-04-01 03:45:15 +02:00
Mislav Marohnić
45f651ab00 hack around the hack around bash echo 2013-04-01 03:12:15 +02:00
Mislav Marohnić
400fe31061 fix exec fails for invalid version 2013-04-01 03:01:37 +02:00
Mislav Marohnić
4b6ab0389b add tests for exec 2013-04-01 02:58:58 +02:00
Mislav Marohnić
baf7656d2f fix iterating through paths that have spaces in them
Fixes #344, #196
2013-04-01 01:04:19 +02:00
Sam Stephenson
382db59cd0 Merge pull request #367 from shoyan/master
replace tab with spaces
2013-03-23 08:47:10 -07:00
Shohei Yamasaki
2bbf49b2f5 replace tab with spaces 2013-03-23 22:37:25 +09:00
Mislav Marohnić
6a6ae8ae46 tests for rbenv-init 2013-03-20 13:43:57 +01:00
Tim Pope
03fa148e81 Don't duplicate shims in PATH 2013-03-20 13:16:02 +01:00
Mislav Marohnić
ea3203dbab fix resolving symlinks in rbenv-hooks 2013-03-08 14:35:46 -05:00
Mislav Marohnić
a81ace2ccb add hook lookup tests 2013-03-07 23:55:02 -05:00
Mislav Marohnić
a7da06998e use C on Travis for even less overhead 2013-03-07 16:14:25 -05:00
Mislav Marohnić
5e5e3e0588 skip Ruby stuff on Travis 2013-03-07 16:09:02 -05:00
Mislav Marohnić
bc369fb1ab configure Travis 2013-03-07 16:05:34 -05:00
Mislav Marohnić
bb6bccb782 tests galore 2013-03-07 15:07:32 -05:00
Mislav Marohnić
1fe59e41ea error message when rehash fails on non-writable directory
Fixes #238
2013-03-07 00:13:50 -05:00
Tim Pope
0d1f1d09f0 Fix multiple argument completion with zsh
This changes the zsh completion to omit the final, incomplete command
line argument when invoking rbenv completions, making it consistent with
the bash completion.  Since no built-in completion cares about the
argument list, this inconsistency only affected plugins.
2013-02-23 23:54:10 +01:00
YanhaoYang
13f36e0416 rbenv(): preserve multiline output of sh-* commands 2013-02-22 15:42:31 +01:00
Sam Stephenson
e3f72ebae2 Guard against exported CDPATH (fixes #316) 2013-01-25 12:02:11 -06:00
Sam Stephenson
98f45695db Suppress shell warnings when hashing is disabled by set +h 2013-01-25 11:50:37 -06:00
Sam Stephenson
3cb95b4d2d Add rbenv --debug <command> as a shortcut for setting RBENV_DEBUG=1 2013-01-23 19:07:37 -06:00
Sam Stephenson
892aea138e Export PS4 when RBENV_DEBUG is set for more informative debug output 2013-01-23 19:07:37 -06:00
Sam Stephenson
045f6c1bce Merge pull request #314 from jalcine/feature/ignoring-thy-sources
Ignoring Your Sources
2013-01-09 15:36:22 -08:00
Jacky Alciné
1d4261a997 Added 'sources' to the Git ignores. 2013-01-09 16:45:08 -05:00
Sam Stephenson
da80bced53 Merge pull request #310 from leocassarani/rbenv-help-mawk
Fix incorrect formatting of rbenv-help output under MAWK
2013-01-05 13:51:57 -08:00
Leo Cassarani
1d687ac734 Fix incorrect formatting of rbenv-help output under MAWK
In systems that use the MAWK interpreter (the default AWK installed with
Ubuntu), the output of `rbenv help <command>` would have no line breaks.
The issue is fixed by changing `gsub` to `sub` in the snippet of awk
commands that are used to extract documentation comments.

I suspect the bug is something to do with the way the '^' and '$'
characters are interpreted by different AWK interpreters (per-line vs
per-string anchors).

If I understand correctly, the purpose of trim() is to remove all line
breaks from the start and end of each sections of a command's
documentation, in which case `sub` should serve the same purpose.
2013-01-05 16:55:19 +00:00
Ryan Bigg
bef7a12964 Merge pull request #308 from eddorre/master
Small update to the README.
2013-01-04 15:17:13 -08:00
Carlos Rodriguez
14ff078b85 Removed double 'at' from README 2013-01-04 15:14:36 -08:00
Mislav Marohnić
cd940bd797 typo in docs 2013-01-04 23:26:01 +01:00
Mislav Marohnić
093809eac6 spellcheck 2013-01-04 23:17:52 +01:00