Skip to content

Commit

Permalink
Merge pull request #6824 from rubygems/fixup-GH-6817
Browse files Browse the repository at this point in the history
Rename BUNDLE_VERSION variables
  • Loading branch information
deivid-rodriguez committed Jul 21, 2023
2 parents 56ba472 + 456fd05 commit 703f94b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-config.1
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ The following is a list of all configuration keys and their purpose\. You can le
\fBuser_agent\fR (\fBBUNDLE_USER_AGENT\fR): The custom user agent fragment Bundler includes in API requests\.
.
.IP "\(bu" 4
\fBversion\fR (\fBBUNDLE_VERSION\fR): The version of Bundler to use when running under Bundler environment\. Defaults to \fBlocal\fR\. You can also specify \fBglobal\fR or \fBx\.y\.z\fR\. \fBlocal\fR will use the Bundler version specified in the \fBGemfile\.lock\fR, \fBglobal\fR will use the system version of Bundler, and \fBx\.y\.z\fR will use the specified version of Bundler\.
\fBversion\fR (\fBBUNDLE_VERSION\fR): The version of Bundler to use when running under Bundler environment\. Defaults to \fBlocal\fR\. You can also specify \fBsystem\fR or \fBx\.y\.z\fR\. \fBlockfile\fR will use the Bundler version specified in the \fBGemfile\.lock\fR, \fBsystem\fR will use the system version of Bundler, and \fBx\.y\.z\fR will use the specified version of Bundler\.
.
.IP "\(bu" 4
\fBwith\fR (\fBBUNDLE_WITH\fR): A \fB:\fR\-separated list of groups whose gems bundler should install\.
Expand Down
6 changes: 3 additions & 3 deletions bundler/lib/bundler/man/bundle-config.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
The custom user agent fragment Bundler includes in API requests.
* `version` (`BUNDLE_VERSION`):
The version of Bundler to use when running under Bundler environment.
Defaults to `local`. You can also specify `global` or `x.y.z`.
`local` will use the Bundler version specified in the `Gemfile.lock`,
`global` will use the system version of Bundler, and `x.y.z` will use
Defaults to `local`. You can also specify `system` or `x.y.z`.
`lockfile` will use the Bundler version specified in the `Gemfile.lock`,
`system` will use the system version of Bundler, and `x.y.z` will use
the specified version of Bundler.
* `with` (`BUNDLE_WITH`):
A `:`-separated list of groups whose gems bundler should install.
Expand Down
4 changes: 2 additions & 2 deletions bundler/lib/bundler/self_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def needs_switching?
released?(lockfile_version) &&
!running?(lockfile_version) &&
!updating? &&
Bundler.settings[:version] != "global"
Bundler.settings[:version] != "system"
end

def autoswitching_applies?
Expand Down Expand Up @@ -177,7 +177,7 @@ def restart_version
# BUNDLE_VERSION=x.y.z
@restart_version = Gem::Version.new(Bundler.settings[:version])
rescue ArgumentError
# BUNDLE_VERSION=local
# BUNDLE_VERSION=lockfile
@restart_version = lockfile_version
end
end
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Settings
"BUNDLE_REDIRECT" => 5,
"BUNDLE_RETRY" => 3,
"BUNDLE_TIMEOUT" => 10,
"BUNDLE_VERSION" => "local",
"BUNDLE_VERSION" => "lockfile",
}.freeze

def initialize(root = nil)
Expand Down
2 changes: 1 addition & 1 deletion bundler/spec/runtime/self_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
it "does not try to install when using bundle config version global" do
lockfile_bundled_with(previous_minor)

bundle "config set version global"
bundle "config set version system"
bundle "install", :artifice => "vcr"
expect(out).not_to match(/restarting using that version/)

Expand Down

0 comments on commit 703f94b

Please sign in to comment.