From 6820704c91afdd875e2a11bc647659c4d557aa5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 29 Jan 2015 01:55:58 -0800 Subject: [PATCH 01/10] 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. --- libexec/rbenv-version-name | 3 --- test/version-name.bats | 6 +----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/libexec/rbenv-version-name b/libexec/rbenv-version-name index 3eef70a8..3769a7cd 100755 --- a/libexec/rbenv-version-name +++ b/libexec/rbenv-version-name @@ -21,9 +21,6 @@ version_exists() { if version_exists "$RBENV_VERSION"; then echo "$RBENV_VERSION" elif version_exists "${RBENV_VERSION#ruby-}"; then - { echo "warning: ignoring extraneous \`ruby-' prefix in version \`${RBENV_VERSION}'" - echo " (set by $(rbenv-version-origin))" - } >&2 echo "${RBENV_VERSION#ruby-}" else echo "rbenv: version \`$RBENV_VERSION' is not installed" >&2 diff --git a/test/version-name.bats b/test/version-name.bats index 3f4d9b36..d6438b5b 100644 --- a/test/version-name.bats +++ b/test/version-name.bats @@ -57,9 +57,5 @@ setup() { cat > ".ruby-version" <<<"ruby-1.8.7" run rbenv-version-name assert_success - assert_output < Date: Thu, 29 Jan 2015 02:09:05 -0800 Subject: [PATCH 02/10] Remove rbenv version history from README We won't maintain it anymore. Instead, the changelogs can be obtained from the project's Releases page: https://github.com/sstephenson/rbenv/releases --- README.md | 126 ------------------------------------------------------ 1 file changed, 126 deletions(-) diff --git a/README.md b/README.md index 7999645f..9988c45c 100644 --- a/README.md +++ b/README.md @@ -419,132 +419,6 @@ Tests are executed using [Bats](https://github.com/sstephenson/bats): Please feel free to submit pull requests and file bugs on the [issue tracker](https://github.com/sstephenson/rbenv/issues). -### Version History - -**0.4.0** (January 4, 2013) - -* rbenv now prefers `.ruby-version` files to `.rbenv-version` files - for specifying local application-specific versions. The - `.ruby-version` file has the same format as `.rbenv-version` but is - [compatible with other Ruby version - managers](https://gist.github.com/1912050). -* Deprecated `ruby-local-exec` and moved its functionality into the - standard `ruby` shim. See the [ruby-local-exec wiki - page](https://github.com/sstephenson/rbenv/wiki/ruby-local-exec) for - upgrade instructions. -* Modified shims to include the full path to rbenv so that they can be - invoked without having rbenv's bin directory in the `$PATH`. -* Sped up `rbenv init` by avoiding rbenv reinitialization and by - using a simpler indexing approach. (Users of - [chef-rbenv](https://github.com/fnichol/chef-rbenv) should upgrade - to the latest version to fix a [compatibility - issue](https://github.com/fnichol/chef-rbenv/pull/26).) -* Reworked `rbenv help` so that usage and documentation is stored as a - comment in each subcommand, enabling plugin commands to hook into - the help system. -* Added support for full completion of the command line, not just the - first argument. -* Updated installation instructions for Zsh and Ubuntu users. -* Fixed `rbenv which` and `rbenv prefix` with system Ruby versions. -* Changed `rbenv exec` to avoid prepending the system Ruby location to - `$PATH` to fix issues running system Ruby commands that invoke other - commands. -* Changed `rbenv rehash` to ensure it exits with a 0 status code under - normal operation, and to ensure outdated shims are removed first - when rehashing. -* Modified `rbenv rehash` to run `hash -r` afterwards, when shell - integration is enabled, to ensure the shell's command cache is - cleared. -* Removed use of the `+=` operator to support older versions of Bash. -* Adjusted non-bare `rbenv versions` output to include `system`, if - present. -* Improved documentation for installing and uninstalling Ruby - versions. -* Fixed `rbenv versions` not to display a warning if the currently - specified version doesn't exist. -* Fixed an instance of local variable leakage in the `rbenv` shell - function wrapper. -* Changed `rbenv shell` to ensure it exits with a non-zero status on - failure. -* Added `rbenv --version` for printing the current version of rbenv. -* Added `/usr/lib/rbenv/hooks` to the plugin hook search path. -* Fixed `rbenv which` to account for path entries with spaces. -* Changed `rbenv init` to accept option arguments in any order. - -**0.3.0** (December 25, 2011) - -* Added an `rbenv root` command which prints the value of - `$RBENV_ROOT`, or the default root directory if it's unset. -* Clarified Zsh installation instructions in the Readme. -* Removed some redundant code in `rbenv rehash`. -* Fixed an issue with calling `readlink` for paths with spaces. -* Changed Zsh initialization code to install completion hooks only for - interactive shells. -* Added preliminary support for ksh. -* `rbenv rehash` creates or removes shims only when necessary instead - of removing and re-creating all shims on each invocation. -* Fixed that `RBENV_DIR`, when specified, would be incorrectly - expanded to its parent directory. -* Removed the deprecated `set-default` and `set-local` commands. -* Added a `--no-rehash` option to `rbenv init` for skipping the - automatic rehash when opening a new shell. - -**0.2.1** (October 1, 2011) - -* Changed the `rbenv` command to ensure that `RBENV_DIR` is always an - absolute path. This fixes an issue where Ruby scripts using the - `ruby-local-exec` wrapper would go into an infinite loop when - invoked with a relative path from the command line. - -**0.2.0** (September 28, 2011) - -* Renamed `rbenv set-default` to `rbenv global` and `rbenv set-local` - to `rbenv local`. The `set-` commands are deprecated and will be - removed in the next major release. -* rbenv now uses `greadlink` on Solaris. -* Added a `ruby-local-exec` command which can be used in shebangs in - place of `#!/usr/bin/env ruby` to properly set the project-specific - Ruby version regardless of current working directory. -* Fixed an issue with `rbenv rehash` when no binaries are present. -* Added support for `rbenv-sh-*` commands, which run inside the - current shell instead of in a child process. -* Added an `rbenv shell` command for conveniently setting the - `$RBENV_VERSION` environment variable. -* Added support for storing rbenv versions and shims in directories - other than `~/.rbenv` with the `$RBENV_ROOT` environment variable. -* Added support for debugging rbenv via `set -x` when the - `$RBENV_DEBUG` environment variable is set. -* Refactored the autocompletion system so that completions are now - built-in to each command and shared between bash and Zsh. -* Added support for plugin bundles in `~/.rbenv/plugins` as documented - in [issue #102](https://github.com/sstephenson/rbenv/pull/102). -* Added `/usr/local/etc/rbenv.d` to the list of directories searched - for rbenv hooks. -* Added support for an `$RBENV_DIR` environment variable which - defaults to the current working directory for specifying where rbenv - searches for local version files. - -**0.1.2** (August 16, 2011) - -* Fixed rbenv to be more resilient against nonexistent entries in - `$PATH`. -* Made the `rbenv rehash` command operate atomically. -* Modified the `rbenv init` script to automatically run `rbenv - rehash` so that shims are recreated whenever a new shell is opened. -* Added initial support for Zsh autocompletion. -* Removed the dependency on egrep for reading version files. - -**0.1.1** (August 14, 2011) - -* Fixed a syntax error in the `rbenv help` command. -* Removed `-e` from the shebang in favor of `set -e` at the top of - each file for compatibility with operating systems that do not - support more than one argument in the shebang. - -**0.1.0** (August 11, 2011) - -* Initial public release. - ### License (The MIT license) From b155380a06be671b77f204e17a37ef8d745cb789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 29 Jan 2015 02:10:28 -0800 Subject: [PATCH 03/10] Remove license information from README The license information is already present in the LICENSE file. --- README.md | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/README.md b/README.md index 9988c45c..702174f9 100644 --- a/README.md +++ b/README.md @@ -419,30 +419,5 @@ Tests are executed using [Bats](https://github.com/sstephenson/bats): Please feel free to submit pull requests and file bugs on the [issue tracker](https://github.com/sstephenson/rbenv/issues). -### License - -(The MIT license) - -Copyright (c) 2013 Sam Stephenson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - [ruby-build]: https://github.com/sstephenson/ruby-build#readme From 70c6d3f67edfcf19ee902d39d6578a537f798ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Mon, 16 Feb 2015 04:03:08 +0100 Subject: [PATCH 04/10] [README] Updated link to bundler.io --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7999645f..608e1ee1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Use rbenv to pick a Ruby version for your application and guarantee that your development environment matches production. Put rbenv to work -with [Bundler](http://gembundler.com/) for painless Ruby upgrades and +with [Bundler](http://bundler.io/) for painless Ruby upgrades and bulletproof deployments. **Powerful in development.** Specify your app's Ruby version once, From 9ae8ba8a2990cbeedcb391467ad509606cbcd6e5 Mon Sep 17 00:00:00 2001 From: Adam Prescott Date: Mon, 16 Feb 2015 10:56:38 -0500 Subject: [PATCH 05/10] 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. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 608e1ee1..acd32729 100644 --- a/README.md +++ b/README.md @@ -378,7 +378,7 @@ Displays the currently active Ruby version, along with information on how it was set. $ rbenv version - 1.8.7-p352 (set by /Volumes/37signals/basecamp/.ruby-version) + 1.9.3-p327 (set by /Users/sam/.rbenv/version) ### rbenv rehash From c54fa3731fd14b3749d211ccd9481713bf644b65 Mon Sep 17 00:00:00 2001 From: Lorenzo Manacorda Date: Thu, 26 Feb 2015 11:39:31 +0100 Subject: [PATCH 06/10] Remove dead links to Version history and License Cfr. #688 --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 397d0c86..905cc02c 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,6 @@ RVM?**](https://github.com/sstephenson/rbenv/wiki/Why-rbenv%3F) * [rbenv which](#rbenv-which) * [rbenv whence](#rbenv-whence) * [Development](#development) - * [Version History](#version-history) - * [License](#license) ## How It Works From 6b908bf39f383fdc5332604d2705d1b652ee5440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Fri, 27 Feb 2015 02:08:38 +1300 Subject: [PATCH 07/10] Opt into fast Travis CI builds --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 95b46cc2..d1369089 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +sudo: false install: git clone https://github.com/sstephenson/bats.git script: PATH="./bats/bin:$PATH" test/run language: c From b6ac87c220672acfa70ee2dbf43c42d77c0e2590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Fri, 27 Feb 2015 02:17:31 +1300 Subject: [PATCH 08/10] Faster bats clone --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d1369089..acc69ef2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ sudo: false -install: git clone https://github.com/sstephenson/bats.git +install: git clone --depth 1 https://github.com/sstephenson/bats.git script: PATH="./bats/bin:$PATH" test/run language: c env: From 050f75056389d79780b76c4d37ad596903e2fdfa Mon Sep 17 00:00:00 2001 From: "Mark H. Wilkinson" Date: Wed, 11 Mar 2015 13:14:52 +0000 Subject: [PATCH 09/10] Fix pattern replacement to allow flags with commas. --- src/configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configure b/src/configure index dc29eb79..86e25ac1 100755 --- a/src/configure +++ b/src/configure @@ -39,8 +39,8 @@ sed " s,@SHOBJ_CC@,${SHOBJ_CC}, s,@SHOBJ_CFLAGS@,${SHOBJ_CFLAGS}, s,@SHOBJ_LD@,${SHOBJ_LD}, - s,@SHOBJ_LDFLAGS@,${SHOBJ_LDFLAGS//,/\,}, - s,@SHOBJ_XLDFLAGS@,${SHOBJ_XLDFLAGS//,/\,}, + s,@SHOBJ_LDFLAGS@,${SHOBJ_LDFLAGS//,/\\,}, + s,@SHOBJ_XLDFLAGS@,${SHOBJ_XLDFLAGS//,/\\,}, s,@SHOBJ_LIBS@,${SHOBJ_LIBS}, s,@SHOBJ_STATUS@,${SHOBJ_STATUS}, " "$src_dir"/Makefile.in > "$src_dir"/Makefile From 7ad01b2b485fb635d7a96daef33f6a733e5b1c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Fri, 13 Mar 2015 01:14:24 -0700 Subject: [PATCH 10/10] Document rbenv environment variables Closes #699, fixes #666 [ci skip] --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 905cc02c..7cad9055 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ RVM?**](https://github.com/sstephenson/rbenv/wiki/Why-rbenv%3F) * [rbenv rehash](#rbenv-rehash) * [rbenv which](#rbenv-which) * [rbenv whence](#rbenv-whence) +* [Environment variables](#environment-variables) * [Development](#development) ## How It Works @@ -403,6 +404,18 @@ Lists all Ruby versions with the given command installed. jruby-1.7.1 ree-1.8.7-2011.03 +## Environment variables + +You can affect how rbenv operates with the following settings: + +name | default | description +-----|---------|------------ +`RBENV_VERSION` | | Specifies the Ruby version to be used.
Also see [`rbenv shell`](#rbenv-shell) +`RBENV_ROOT` | `~/.rbenv` | Defines the directory under which Ruby versions and shims reside.
Also see `rbenv root` +`RBENV_DEBUG` | | Outputs debug information.
Also as: `rbenv --debug ` +`RBENV_HOOK_PATH` | [_see wiki_][hooks] | Colon-separated list of paths searched for rbenv hooks. +`RBENV_DIR` | `$PWD` | Directory to start searching for `.ruby-version` files. + ## Development The rbenv source code is [hosted on @@ -419,3 +432,4 @@ tracker](https://github.com/sstephenson/rbenv/issues). [ruby-build]: https://github.com/sstephenson/ruby-build#readme + [hooks]: https://github.com/sstephenson/rbenv/wiki/Authoring-plugins#rbenv-hooks