You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bundler/lib/bundler/man/bundle-config.1
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -296,6 +296,9 @@ The following is a list of all configuration keys and their purpose\. You can le
296
296
\fBuser_agent\fR (\fBBUNDLE_USER_AGENT\fR): The custom user agent fragment Bundler includes in API requests\.
297
297
.
298
298
.IP"\(bu"4
299
+
\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\.
300
+
.
301
+
.IP"\(bu"4
299
302
\fBwith\fR (\fBBUNDLE_WITH\fR): A \fB:\fR\-separated list of groups whose gems bundler should install\.
Copy file name to clipboardExpand all lines: bundler/spec/runtime/self_management_spec.rb
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@
6
6
"2.3.0"
7
7
end
8
8
9
+
let(:current_version)do
10
+
"2.4.0"
11
+
end
12
+
9
13
beforedo
10
14
build_repo2
11
15
@@ -103,6 +107,28 @@
103
107
expect(out).toeq(Bundler::VERSION[0] == "2" ? "Bundler version #{Bundler::VERSION}" : Bundler::VERSION)
104
108
end
105
109
110
+
it"installs BUNDLE_VERSION version when using bundle config version x.y.z"do
111
+
lockfile_bundled_with(current_version)
112
+
113
+
bundle"config set --local version #{previous_minor}"
114
+
bundle"install",:artifice=>"vcr"
115
+
expect(out).toinclude("Bundler #{Bundler::VERSION} is running, but your configuration was #{previous_minor}. Installing Bundler #{previous_minor} and restarting using that version.")
116
+
117
+
bundle"-v"
118
+
expect(out).toeq(previous_minor[0] == "2" ? "Bundler version #{previous_minor}" : previous_minor)
119
+
end
120
+
121
+
it"does not try to install when using bundle config version global"do
122
+
lockfile_bundled_with(previous_minor)
123
+
124
+
bundle"config set version global"
125
+
bundle"install",:artifice=>"vcr"
126
+
expect(out).not_tomatch(/restarting using that version/)
127
+
128
+
bundle"-v"
129
+
expect(out).toeq(Bundler::VERSION[0] == "2" ? "Bundler version #{Bundler::VERSION}" : Bundler::VERSION)
0 commit comments