Commit graph

754 commits

Author SHA1 Message Date
Mislav Marohnić
fcedf169fb Merge pull request #819 from blueyed/fix-path_without
tests: fix path_without to handle /bin properly
2015-11-13 18:01:53 -05:00
Mislav Marohnić
14655a43c8 Merge pull request #821 from jasonkarns/help-completion
add completion block for rbenv-help
2015-11-13 17:37:09 -05:00
Jason Karns
8c3cab61c7 add completion block for rbenv-help 2015-11-13 15:06:29 -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
Mislav Marohnić
c18a3f9042 Merge pull request #814 from m-o-e/never-use-hardlinks
Never use hardlinks. Never.
2015-10-29 17:25:26 +01:00
moe
f6c1e5220a Never use hardlinks. Never. 2015-10-28 21:35:39 +01:00
Mislav Marohnić
d740406daf Merge pull request #812 from sstephenson/skip-aliases
Add `rbenv versions --skip-aliases` option
2015-10-27 21:11:24 +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ć
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ć
6e02b944f7 Use $BASH_SOURCE instead of $0
BASH_SOURCE might be more reliable.
2015-10-27 20:55:23 +01:00
Mislav Marohnić
bb129a782b Merge branch 'bundler-hook-recursion'
Closes #809, references #806
2015-10-27 10:54:13 +01:00
Roman Sandler
d508822f9a Make sure the alias statement only executes if there is not already an alias in place 2015-10-27 10:53:51 +01:00
Mislav Marohnić
6913fee89a If there is .bashrc but no .bash_profile, recommend the former
This is for Linux desktop platforms that have Terminal application
configured to start shells in interactive but not login mode. Creating a
`~/.bash_profile` would also cause `~/.profile` to not run, which might
be a problem on Ubuntu which ships with a default `~/.profile`.
2015-10-26 15:45:52 +01:00
Mislav Marohnić
074161f9c1 Merge pull request #806 from sstephenson/bundle-rehash
Avoid running `rbenv rehash` multiple times during `bundle install`
2015-10-25 18:36:20 +01:00
Mislav Marohnić
2b0f16757a Only rehash if bundle install actually created new executables
This avoids running `rbenv rehash` after installing libraries that don't
have executables, or after a no-op `bundle install` that didn't install
anything.
2015-10-25 18:31:50 +01:00
Mislav Marohnić
7b289bcee6 Avoid running rbenv rehash multiple times during bundle install
This is an attempt to work around the fact that Rubygems post_install
hooks may happen multiple times per single `bundle install` and ideally
we want `rbenv rehash` to run only once if new gems have been installed.
However, due to Bundler parallelism using `fork` on platforms that
support it, it's impossible for the child processes to communicate with
the master process to signal it to run `rbenv rehash` in the end.

This hooks into Bundler `install` command and runs `rbenv rehash` after
all gems have finished installing, but only if the install location was
system gems location and not a custom path (such as per-project
`vendor/bundle`).

This is limited because we can't tell whether any gems have been
installed at all, let alone do those gems have executables. However it's
better than having multiple `rbenv rehash` being run in parallel and
outputting confusing error messages as a result.
2015-10-25 17:47:01 +01:00
Mislav Marohnić
8dcd715ede Merge branch 'edge-version' 2015-10-25 17:01:04 +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ć
0f44c57d08 Fix eval'ing multiline sh-* command output with bash 2015-10-12 01:33:17 +02: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ć
c101052a7f Fix eval'ing multiline sh-* command output with fish 2015-10-10 21:48:40 +02:00
Mislav Marohnić
51a1ee06e4 Merge commit '5c1094a' from #529
Closes #529
2015-10-10 19:17:18 +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
Mislav Marohnić
c43928a8e4 Merge pull request #731 from blueyed/init-no-basename-for-shell
rbenv-init: do not use basename for $shell
2015-10-10 18:33:52 +02:00
Mislav Marohnić
c6cf4e18b8 Merge pull request #682 from evaryont/patch-1
Include gems dir in .gitignore
2015-10-10 17:22:55 +02:00
Mislav Marohnić
9e664b5d27 Suggest that rbenv should be loaded at end of shell rc file
Closes #725
2015-09-12 15:27:32 -07:00
Mislav Marohnić
3b6faa8531 Merge pull request #756 from blueyed/version-origin-with-non-installed
Display version origin with non-installed versions
2015-07-17 11:33:56 -07: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
Mislav Marohnić
83ac0fbd94 Merge pull request #747 from sstephenson/uninstall-instructions
Provide uninstall instructions in the README
2015-06-10 00:22:47 +02:00
Mislav Marohnić
46fbc5414a Provide uninstall instructions in the README 2015-06-09 23:31:01 +02:00
Mislav Marohnić
43b28caa94 Fix discovering .ruby-version files in root directory
It's not that this is a preferred way to set a global version (one
should use `rbenv global <version>` instead), but this fixes the
function purely for correctness: all parent directories should be
scanned, even the root directory.

Fixes #745
2015-06-09 17:24:15 +02:00
Daniel Hahler
4ea7d0849b rbenv-init: do not use basename for $shell
This can be done using bash directly.
2015-05-10 16:17:35 +02:00
Mislav Marohnić
5b9e4f0584 Merge pull request #722 from blueyed/fix-test-for-fish-issue-369
Fix test for adding shims in fish
2015-04-20 11:51:51 +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
Mislav Marohnić
7ad01b2b48 Document rbenv environment variables
Closes #699, fixes #666 [ci skip]
2015-03-13 01:14:24 -07:00
Mislav Marohnić
8c6b764a4c Merge pull request #706 from mhw/realpath-configure-fix
Fix pattern replacement to allow flags with commas.
2015-03-12 22:18:23 -07:00
Mark H. Wilkinson
050f750563 Fix pattern replacement to allow flags with commas. 2015-03-11 13:14:52 +00:00
Mislav Marohnić
4d72eefffc Merge branch 'fast-travis' 2015-02-28 12:56:49 +13:00
Mislav Marohnić
b6ac87c220 Faster bats clone 2015-02-27 02:17:31 +13:00
Mislav Marohnić
6b908bf39f Opt into fast Travis CI builds 2015-02-27 02:08:38 +13:00
Mislav Marohnić
f87d8762eb Merge pull request #698 from asymmetric/dead-readme-links
Remove dead links to History and License from README
2015-02-27 02:06:16 +13:00
Lorenzo Manacorda
c54fa3731f Remove dead links to Version history and License
Cfr. #688
2015-02-26 11:39:31 +01:00
Mislav Marohnić
4d0c289287 Merge pull request #688 from sstephenson/readme-no-history
Remove history, license information from README
2015-02-25 11:50:39 +13:00
Mislav Marohnić
52bb0dcfcf Merge pull request #687 from sstephenson/remove-prefix-warning
Remove warning about extraneous "ruby-" prefix in `.ruby-version`
2015-02-25 11:49:52 +13:00
Mislav Marohnić
98953c2e14 Merge pull request #696 from aprescott/patch-1
Update README to make rbenv version consistent with previous `versions` output
2015-02-18 11:36:34 +13:00
Adam Prescott
9ae8ba8a29 Update README to make rbenv version consistent with previous versions output
The `rbenv versions` info highlights 1.9.3-p327 as the current version, and
making `rbenv version` sample output match that helps make it clearer.
2015-02-16 10:56:38 -05:00
Mislav Marohnić
1a7f49d2f0 Merge pull request #695 from lyrixx/patch-1
[README] Updated link to bundler.io
2015-02-15 19:05:52 -08:00