bundler 1.16.4 → 1.16.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/bundler/build_metadata.rb +11 -3
- data/lib/bundler/cli/exec.rb +1 -0
- data/lib/bundler/current_ruby.rb +7 -1
- data/lib/bundler/dep_proxy.rb +2 -2
- data/lib/bundler/dependency.rb +1 -0
- data/lib/bundler/deprecate.rb +2 -1
- data/lib/bundler/env.rb +1 -1
- data/lib/bundler/fetcher/downloader.rb +10 -5
- data/lib/bundler/gem_version_promoter.rb +12 -0
- data/lib/bundler/lazy_specification.rb +1 -1
- data/lib/bundler/resolver.rb +6 -5
- data/lib/bundler/ruby_version.rb +1 -1
- data/lib/bundler/shared_helpers.rb +6 -1
- data/lib/bundler/version.rb +1 -1
- data/man/bundle-add.1 +1 -1
- data/man/bundle-add.1.txt +1 -1
- data/man/bundle-binstubs.1 +1 -1
- data/man/bundle-binstubs.1.txt +1 -1
- data/man/bundle-check.1 +1 -1
- data/man/bundle-check.1.txt +1 -1
- data/man/bundle-clean.1 +1 -1
- data/man/bundle-clean.1.txt +1 -1
- data/man/bundle-config.1 +1 -1
- data/man/bundle-config.1.txt +1 -1
- data/man/bundle-doctor.1 +1 -1
- data/man/bundle-doctor.1.txt +1 -1
- data/man/bundle-exec.1 +1 -1
- data/man/bundle-exec.1.txt +1 -1
- data/man/bundle-gem.1 +1 -1
- data/man/bundle-gem.1.txt +1 -1
- data/man/bundle-info.1 +1 -1
- data/man/bundle-info.1.txt +1 -1
- data/man/bundle-init.1 +1 -1
- data/man/bundle-init.1.txt +1 -1
- data/man/bundle-inject.1 +1 -1
- data/man/bundle-inject.1.txt +1 -1
- data/man/bundle-install.1 +1 -1
- data/man/bundle-install.1.txt +1 -1
- data/man/bundle-list.1 +1 -1
- data/man/bundle-list.1.txt +1 -1
- data/man/bundle-lock.1 +1 -1
- data/man/bundle-lock.1.txt +1 -1
- data/man/bundle-open.1 +1 -1
- data/man/bundle-open.1.txt +1 -1
- data/man/bundle-outdated.1 +1 -1
- data/man/bundle-outdated.1.txt +1 -1
- data/man/bundle-package.1 +1 -1
- data/man/bundle-package.1.txt +1 -1
- data/man/bundle-platform.1 +1 -1
- data/man/bundle-platform.1.txt +1 -1
- data/man/bundle-pristine.1 +1 -1
- data/man/bundle-pristine.1.txt +1 -1
- data/man/bundle-show.1 +1 -1
- data/man/bundle-show.1.txt +1 -1
- data/man/bundle-update.1 +1 -1
- data/man/bundle-update.1.txt +1 -1
- data/man/bundle-viz.1 +1 -1
- data/man/bundle-viz.1.txt +1 -1
- data/man/bundle.1 +1 -1
- data/man/bundle.1.txt +1 -1
- data/man/gemfile.5 +10 -6
- data/man/gemfile.5.ronn +8 -6
- data/man/gemfile.5.txt +124 -120
- metadata +3 -3
data/man/bundle-init.1.txt
CHANGED
data/man/bundle-inject.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INJECT" "1" "
|
4
|
+
.TH "BUNDLE\-INJECT" "1" "September 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
|
data/man/bundle-inject.1.txt
CHANGED
data/man/bundle-install.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INSTALL" "1" "
|
4
|
+
.TH "BUNDLE\-INSTALL" "1" "September 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
|
data/man/bundle-install.1.txt
CHANGED
data/man/bundle-list.1
CHANGED
data/man/bundle-list.1.txt
CHANGED
data/man/bundle-lock.1
CHANGED
data/man/bundle-lock.1.txt
CHANGED
data/man/bundle-open.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-OPEN" "1" "
|
4
|
+
.TH "BUNDLE\-OPEN" "1" "September 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
|
data/man/bundle-open.1.txt
CHANGED
data/man/bundle-outdated.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-OUTDATED" "1" "
|
4
|
+
.TH "BUNDLE\-OUTDATED" "1" "September 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-outdated\fR \- List installed gems with newer versions available
|
data/man/bundle-outdated.1.txt
CHANGED
data/man/bundle-package.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-PACKAGE" "1" "
|
4
|
+
.TH "BUNDLE\-PACKAGE" "1" "September 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-package\fR \- Package your needed \fB\.gem\fR files into your application
|
data/man/bundle-package.1.txt
CHANGED
data/man/bundle-platform.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-PLATFORM" "1" "
|
4
|
+
.TH "BUNDLE\-PLATFORM" "1" "September 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-platform\fR \- Displays platform compatibility information
|
data/man/bundle-platform.1.txt
CHANGED
data/man/bundle-pristine.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-PRISTINE" "1" "
|
4
|
+
.TH "BUNDLE\-PRISTINE" "1" "September 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
|
data/man/bundle-pristine.1.txt
CHANGED
data/man/bundle-show.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-SHOW" "1" "
|
4
|
+
.TH "BUNDLE\-SHOW" "1" "September 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
|
data/man/bundle-show.1.txt
CHANGED
data/man/bundle-update.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-UPDATE" "1" "
|
4
|
+
.TH "BUNDLE\-UPDATE" "1" "September 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-update\fR \- Update your gems to the latest available versions
|
data/man/bundle-update.1.txt
CHANGED
data/man/bundle-viz.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-VIZ" "1" "
|
4
|
+
.TH "BUNDLE\-VIZ" "1" "September 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
|
data/man/bundle-viz.1.txt
CHANGED
data/man/bundle.1
CHANGED
data/man/bundle.1.txt
CHANGED
data/man/gemfile.5
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "GEMFILE" "5" "
|
4
|
+
.TH "GEMFILE" "5" "September 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
|
@@ -67,7 +67,7 @@ Credentials in the source URL will take precedence over credentials set using \f
|
|
67
67
|
If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
|
68
68
|
.
|
69
69
|
.SS "VERSION (required)"
|
70
|
-
The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby or
|
70
|
+
The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, Rubinius or TruffleRuby, this should be the Ruby version that the engine is compatible with\.
|
71
71
|
.
|
72
72
|
.IP "" 4
|
73
73
|
.
|
@@ -248,11 +248,11 @@ There are a number of \fBGemfile\fR platforms:
|
|
248
248
|
.
|
249
249
|
.TP
|
250
250
|
\fBruby\fR
|
251
|
-
C Ruby (MRI) or
|
251
|
+
C Ruby (MRI), Rubinius or TruffleRuby, but \fBNOT\fR Windows
|
252
252
|
.
|
253
253
|
.TP
|
254
254
|
\fBmri\fR
|
255
|
-
Same as \fIruby\fR, but
|
255
|
+
Same as \fIruby\fR, but only C Ruby (MRI)
|
256
256
|
.
|
257
257
|
.TP
|
258
258
|
\fBmingw\fR
|
@@ -264,18 +264,22 @@ Windows 64 bit \'mingw32\' platform (aka RubyInstaller x64)
|
|
264
264
|
.
|
265
265
|
.TP
|
266
266
|
\fBrbx\fR
|
267
|
-
|
267
|
+
Rubinius
|
268
268
|
.
|
269
269
|
.TP
|
270
270
|
\fBjruby\fR
|
271
271
|
JRuby
|
272
272
|
.
|
273
273
|
.TP
|
274
|
+
\fBtruffleruby\fR
|
275
|
+
TruffleRuby
|
276
|
+
.
|
277
|
+
.TP
|
274
278
|
\fBmswin\fR
|
275
279
|
Windows
|
276
280
|
.
|
277
281
|
.P
|
278
|
-
You can restrict further by platform and version for all platforms \fIexcept\fR for \fBrbx\fR, \fBjruby\fR, and \fBmswin\fR\.
|
282
|
+
You can restrict further by platform and version for all platforms \fIexcept\fR for \fBrbx\fR, \fBjruby\fR, \fBtruffleruby\fR and \fBmswin\fR\.
|
279
283
|
.
|
280
284
|
.P
|
281
285
|
To specify a version in addition to a platform, append the version number without the delimiter to the platform\. For example, to specify that a gem should only be used on platforms with Ruby 2\.3, use:
|
data/man/gemfile.5.ronn
CHANGED
@@ -59,8 +59,8 @@ All parameters are `OPTIONAL` unless otherwise specified.
|
|
59
59
|
### VERSION (required)
|
60
60
|
|
61
61
|
The version of Ruby that your application requires. If your application
|
62
|
-
requires an alternate Ruby engine, such as JRuby or
|
63
|
-
the Ruby version that the engine is compatible with.
|
62
|
+
requires an alternate Ruby engine, such as JRuby, Rubinius or TruffleRuby, this
|
63
|
+
should be the Ruby version that the engine is compatible with.
|
64
64
|
|
65
65
|
ruby "1.9.3"
|
66
66
|
|
@@ -188,22 +188,24 @@ platforms.
|
|
188
188
|
There are a number of `Gemfile` platforms:
|
189
189
|
|
190
190
|
* `ruby`:
|
191
|
-
C Ruby (MRI) or
|
191
|
+
C Ruby (MRI), Rubinius or TruffleRuby, but `NOT` Windows
|
192
192
|
* `mri`:
|
193
|
-
Same as _ruby_, but
|
193
|
+
Same as _ruby_, but only C Ruby (MRI)
|
194
194
|
* `mingw`:
|
195
195
|
Windows 32 bit 'mingw32' platform (aka RubyInstaller)
|
196
196
|
* `x64_mingw`:
|
197
197
|
Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
|
198
198
|
* `rbx`:
|
199
|
-
|
199
|
+
Rubinius
|
200
200
|
* `jruby`:
|
201
201
|
JRuby
|
202
|
+
* `truffleruby`:
|
203
|
+
TruffleRuby
|
202
204
|
* `mswin`:
|
203
205
|
Windows
|
204
206
|
|
205
207
|
You can restrict further by platform and version for all platforms *except* for
|
206
|
-
`rbx`, `jruby`, and `mswin`.
|
208
|
+
`rbx`, `jruby`, `truffleruby` and `mswin`.
|
207
209
|
|
208
210
|
To specify a version in addition to a platform, append the version number without
|
209
211
|
the delimiter to the platform. For example, to specify that a gem should only be
|
data/man/gemfile.5.txt
CHANGED
@@ -71,8 +71,9 @@ RUBY
|
|
71
71
|
|
72
72
|
VERSION (required)
|
73
73
|
The version of Ruby that your application requires. If your application
|
74
|
-
requires an alternate Ruby engine,
|
75
|
-
should be the Ruby version that the engine is
|
74
|
+
requires an alternate Ruby engine, such as JRuby, Rubinius or Truf-
|
75
|
+
fleRuby, this should be the Ruby version that the engine is compatible
|
76
|
+
with.
|
76
77
|
|
77
78
|
|
78
79
|
|
@@ -81,30 +82,30 @@ RUBY
|
|
81
82
|
|
82
83
|
|
83
84
|
ENGINE
|
84
|
-
Each
|
85
|
+
Each application may specify a Ruby engine. If an engine is specified,
|
85
86
|
an engine version must also be specified.
|
86
87
|
|
87
|
-
What
|
88
|
+
What exactly is an Engine? - A Ruby engine is an implementation of the
|
88
89
|
Ruby language.
|
89
90
|
|
90
|
-
o For
|
91
|
-
Ruby
|
92
|
-
https://en.wikipedia.org/wiki/Ruby_MRI,
|
93
|
-
named
|
94
|
-
MRI
|
91
|
+
o For background: the reference or original implementation of the
|
92
|
+
Ruby programming language is called Matz's Ruby Interpreter
|
93
|
+
https://en.wikipedia.org/wiki/Ruby_MRI, or MRI for short. This is
|
94
|
+
named after Ruby creator Yukihiro Matsumoto, also known as Matz.
|
95
|
+
MRI is also known as CRuby, because it is written in C. MRI is the
|
95
96
|
most widely used Ruby engine.
|
96
97
|
|
97
|
-
o Other
|
98
|
+
o Other implementations https://www.ruby-lang.org/en/about/ of Ruby
|
98
99
|
exist. Some of the more well-known implementations include Rubinius
|
99
|
-
https://rubinius.com/,
|
100
|
-
alternative
|
101
|
-
implementation
|
100
|
+
https://rubinius.com/, and JRuby http://jruby.org/. Rubinius is an
|
101
|
+
alternative implementation of Ruby written in Ruby. JRuby is an
|
102
|
+
implementation of Ruby on the JVM, short for Java Virtual Machine.
|
102
103
|
|
103
104
|
|
104
105
|
|
105
106
|
ENGINE VERSION
|
106
|
-
Each
|
107
|
-
sion
|
107
|
+
Each application may specify a Ruby engine version. If an engine ver-
|
108
|
+
sion is specified, an engine must also be specified. If the engine is
|
108
109
|
"ruby" the engine version specified must match the Ruby version.
|
109
110
|
|
110
111
|
|
@@ -146,9 +147,9 @@ GEMS
|
|
146
147
|
|
147
148
|
|
148
149
|
REQUIRE AS
|
149
|
-
Each
|
150
|
-
Bundler.require.
|
151
|
-
file
|
150
|
+
Each gem MAY specify files that should be used when autorequiring via
|
151
|
+
Bundler.require. You may pass an array with multiple files or true if
|
152
|
+
file you want required has same name as gem or false to prevent any
|
152
153
|
file from being autorequired.
|
153
154
|
|
154
155
|
|
@@ -159,7 +160,7 @@ GEMS
|
|
159
160
|
|
160
161
|
|
161
162
|
|
162
|
-
The
|
163
|
+
The argument defaults to the name of the gem. For example, these are
|
163
164
|
identical:
|
164
165
|
|
165
166
|
|
@@ -171,8 +172,8 @@ GEMS
|
|
171
172
|
|
172
173
|
|
173
174
|
GROUPS
|
174
|
-
Each
|
175
|
-
does
|
175
|
+
Each gem MAY specify membership in one or more groups. Any gem that
|
176
|
+
does not specify membership in any group is placed in the default
|
176
177
|
group.
|
177
178
|
|
178
179
|
|
@@ -182,7 +183,7 @@ GEMS
|
|
182
183
|
|
183
184
|
|
184
185
|
|
185
|
-
The
|
186
|
+
The Bundler runtime allows its two main methods, Bundler.setup and
|
186
187
|
Bundler.require, to limit their impact to particular groups.
|
187
188
|
|
188
189
|
|
@@ -202,9 +203,9 @@ GEMS
|
|
202
203
|
|
203
204
|
|
204
205
|
|
205
|
-
The
|
206
|
-
dle
|
207
|
-
multiple
|
206
|
+
The Bundler CLI allows you to specify a list of groups whose gems bun-
|
207
|
+
dle install should not install with the --without option. To specify
|
208
|
+
multiple groups to ignore, specify a list of groups separated by spa-
|
208
209
|
ces.
|
209
210
|
|
210
211
|
|
@@ -216,44 +217,47 @@ GEMS
|
|
216
217
|
|
217
218
|
After running bundle install --without test, bundler will remember that
|
218
219
|
you excluded the test group in the last installation. The next time you
|
219
|
-
run
|
220
|
+
run bundle install, without any --without option, bundler will recall
|
220
221
|
it.
|
221
222
|
|
222
|
-
Also,
|
223
|
-
"bundler/setup"
|
223
|
+
Also, calling Bundler.setup with no parameters, or calling require
|
224
|
+
"bundler/setup" will setup all groups except for the ones you excluded
|
224
225
|
via --without (since they are not available).
|
225
226
|
|
226
|
-
Note
|
227
|
-
in
|
228
|
-
and
|
229
|
-
sions
|
227
|
+
Note that on bundle install, bundler downloads and evaluates all gems,
|
228
|
+
in order to create a single canonical list of all of the required gems
|
229
|
+
and their dependencies. This means that you cannot list different ver-
|
230
|
+
sions of the same gems in different groups. For more details, see
|
230
231
|
Understanding Bundler http://bundler.io/rationale.html.
|
231
232
|
|
232
233
|
PLATFORMS
|
233
|
-
If
|
234
|
-
forms,
|
235
|
-
groups,
|
234
|
+
If a gem should only be used in a particular platform or set of plat-
|
235
|
+
forms, you can specify them. Platforms are essentially identical to
|
236
|
+
groups, except that you do not need to use the --without install-time
|
236
237
|
flag to exclude groups of gems for other platforms.
|
237
238
|
|
238
239
|
There are a number of Gemfile platforms:
|
239
240
|
|
240
|
-
ruby C Ruby (MRI) or
|
241
|
+
ruby C Ruby (MRI), Rubinius or TruffleRuby, but NOT Windows
|
241
242
|
|
242
|
-
mri Same as ruby, but
|
243
|
+
mri Same as ruby, but only C Ruby (MRI)
|
243
244
|
|
244
245
|
mingw Windows 32 bit 'mingw32' platform (aka RubyInstaller)
|
245
246
|
|
246
247
|
x64_mingw
|
247
248
|
Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
|
248
249
|
|
249
|
-
rbx
|
250
|
+
rbx Rubinius
|
250
251
|
|
251
252
|
jruby JRuby
|
252
253
|
|
254
|
+
truffleruby
|
255
|
+
TruffleRuby
|
256
|
+
|
253
257
|
mswin Windows
|
254
258
|
|
255
|
-
You
|
256
|
-
except for rbx, jruby, and mswin.
|
259
|
+
You can restrict further by platform and version for all platforms
|
260
|
+
except for rbx, jruby, truffleruby and mswin.
|
257
261
|
|
258
262
|
To specify a version in addition to a platform, append the version num-
|
259
263
|
ber without the delimiter to the platform. For example, to specify that
|
@@ -286,12 +290,12 @@ GEMS
|
|
286
290
|
|
287
291
|
|
288
292
|
|
289
|
-
All
|
290
|
-
Bundler.setup,
|
293
|
+
All operations involving groups (bundle install bundle-install.1.html,
|
294
|
+
Bundler.setup, Bundler.require) behave exactly the same as if any
|
291
295
|
groups not matching the current platform were explicitly excluded.
|
292
296
|
|
293
297
|
SOURCE
|
294
|
-
You
|
298
|
+
You can select an alternate Rubygems repository for a gem using the
|
295
299
|
':source' option.
|
296
300
|
|
297
301
|
|
@@ -300,22 +304,22 @@ GEMS
|
|
300
304
|
|
301
305
|
|
302
306
|
|
303
|
-
This
|
304
|
-
global
|
307
|
+
This forces the gem to be loaded from this source and ignores any
|
308
|
+
global sources declared at the top level of the file. If the gem does
|
305
309
|
not exist in this source, it will not be installed.
|
306
310
|
|
307
311
|
Bundler will search for child dependencies of this gem by first looking
|
308
312
|
in the source selected for the parent, but if they are not found there,
|
309
|
-
it
|
313
|
+
it will fall back on global sources using the ordering described in
|
310
314
|
SOURCE PRIORITY.
|
311
315
|
|
312
|
-
Selecting
|
316
|
+
Selecting a specific source repository this way also suppresses the
|
313
317
|
ambiguous gem warning described above in GLOBAL SOURCES (#source).
|
314
318
|
|
315
|
-
Using
|
316
|
-
source
|
317
|
-
do
|
318
|
-
sources,
|
319
|
+
Using the :source option for an individual gem will also make that
|
320
|
+
source available as a possible global source for any other gems which
|
321
|
+
do not specify explicit sources. Thus, when adding gems with explicit
|
322
|
+
sources, it is recommended that you also ensure all other gems in the
|
319
323
|
Gemfile are using explicit sources.
|
320
324
|
|
321
325
|
GIT
|
@@ -333,27 +337,27 @@ GEMS
|
|
333
337
|
If using SSH, the user that you use to run bundle install MUST have the
|
334
338
|
appropriate keys available in their $HOME/.ssh.
|
335
339
|
|
336
|
-
NOTE:
|
337
|
-
These
|
338
|
-
can
|
340
|
+
NOTE: http:// and git:// URLs should be avoided if at all possible.
|
341
|
+
These protocols are unauthenticated, so a man-in-the-middle attacker
|
342
|
+
can deliver malicious code and compromise your system. HTTPS and SSH
|
339
343
|
are strongly preferred.
|
340
344
|
|
341
|
-
The
|
345
|
+
The group, platforms, and require options are available and behave
|
342
346
|
exactly the same as they would for a normal gem.
|
343
347
|
|
344
|
-
A
|
345
|
-
directory
|
346
|
-
MUST
|
348
|
+
A git repository SHOULD have at least one file, at the root of the
|
349
|
+
directory containing the gem, with the extension .gemspec. This file
|
350
|
+
MUST contain a valid gem specification, as expected by the gem build
|
347
351
|
command.
|
348
352
|
|
349
|
-
If
|
353
|
+
If a git repository does not have a .gemspec, bundler will attempt to
|
350
354
|
create one, but it will not contain any dependencies, executables, or C
|
351
|
-
extension
|
355
|
+
extension compilation instructions. As a result, it may fail to prop-
|
352
356
|
erly integrate into your application.
|
353
357
|
|
354
|
-
If
|
355
|
-
to,
|
356
|
-
only
|
358
|
+
If a git repository does have a .gemspec for the gem you attached it
|
359
|
+
to, a version specifier, if provided, means that the git repository is
|
360
|
+
only valid if the .gemspec specifies a version matching the version
|
357
361
|
specifier. If not, bundler will print a warning.
|
358
362
|
|
359
363
|
|
@@ -364,19 +368,19 @@ GEMS
|
|
364
368
|
|
365
369
|
|
366
370
|
|
367
|
-
If
|
371
|
+
If a git repository does not have a .gemspec for the gem you attached
|
368
372
|
it to, a version specifier MUST be provided. Bundler will use this ver-
|
369
373
|
sion in the simple .gemspec it creates.
|
370
374
|
|
371
375
|
Git repositories support a number of additional options.
|
372
376
|
|
373
377
|
branch, tag, and ref
|
374
|
-
You
|
378
|
+
You MUST only specify at most one of these options. The default
|
375
379
|
is :branch => "master"
|
376
380
|
|
377
381
|
For example:
|
378
382
|
|
379
|
-
git
|
383
|
+
git "https://github.com/rails/rails.git", :branch => "5-0-sta-
|
380
384
|
ble" do
|
381
385
|
|
382
386
|
git "https://github.com/rails/rails.git", :tag => "v5.0.0" do
|
@@ -384,14 +388,14 @@ GEMS
|
|
384
388
|
git "https://github.com/rails/rails.git", :ref => "4aded" do
|
385
389
|
|
386
390
|
submodules
|
387
|
-
For
|
391
|
+
For reference, a git submodule
|
388
392
|
https://git-scm.com/book/en/v2/Git-Tools-Submodules lets you
|
389
|
-
have
|
393
|
+
have another git repository within a subfolder of your reposi-
|
390
394
|
tory. Specify :submodules => true to cause bundler to expand any
|
391
395
|
submodules included in the git repository
|
392
396
|
|
393
|
-
If
|
394
|
-
sents
|
397
|
+
If a git repository contains multiple .gemspecs, each .gemspec repre-
|
398
|
+
sents a gem located at the same place in the file system as the .gem-
|
395
399
|
spec.
|
396
400
|
|
397
401
|
|
@@ -406,16 +410,16 @@ GEMS
|
|
406
410
|
|
407
411
|
|
408
412
|
|
409
|
-
To
|
410
|
-
directory
|
413
|
+
To install a gem located in a git repository, bundler changes to the
|
414
|
+
directory containing the gemspec, runs gem build name.gemspec and then
|
411
415
|
installs the resulting gem. The gem build command, which comes standard
|
412
|
-
with
|
416
|
+
with Rubygems, evaluates the .gemspec in the context of the directory
|
413
417
|
in which it is located.
|
414
418
|
|
415
419
|
GIT SOURCE
|
416
|
-
A
|
417
|
-
the
|
418
|
-
argument
|
420
|
+
A custom git source can be defined via the git_source method. Provide
|
421
|
+
the source's name as an argument, and a block which receives a single
|
422
|
+
argument and interpolates it into a string to return the full repo
|
419
423
|
address:
|
420
424
|
|
421
425
|
|
@@ -438,10 +442,10 @@ GEMS
|
|
438
442
|
rently expands to an insecure git:// URL. This allows a man-in-the-mid-
|
439
443
|
dle attacker to compromise your system.
|
440
444
|
|
441
|
-
If
|
442
|
-
lic,
|
443
|
-
and
|
444
|
-
slash.
|
445
|
+
If the git repository you want to use is hosted on GitHub and is pub-
|
446
|
+
lic, you can use the :github shorthand to specify the github username
|
447
|
+
and repository name (without the trailing ".git"), separated by a
|
448
|
+
slash. If both the username and repository name are the same, you can
|
445
449
|
omit one.
|
446
450
|
|
447
451
|
|
@@ -464,7 +468,7 @@ GEMS
|
|
464
468
|
|
465
469
|
GIST
|
466
470
|
If the git repository you want to use is hosted as a Github Gist and is
|
467
|
-
public,
|
471
|
+
public, you can use the :gist shorthand to specify the gist identifier
|
468
472
|
(without the trailing ".git").
|
469
473
|
|
470
474
|
|
@@ -481,14 +485,14 @@ GEMS
|
|
481
485
|
|
482
486
|
|
483
487
|
|
484
|
-
Since
|
488
|
+
Since the gist method is a specialization of git_source, it accepts a
|
485
489
|
:branch named argument.
|
486
490
|
|
487
491
|
BITBUCKET
|
488
|
-
If
|
489
|
-
public,
|
490
|
-
username
|
491
|
-
by
|
492
|
+
If the git repository you want to use is hosted on Bitbucket and is
|
493
|
+
public, you can use the :bitbucket shorthand to specify the bitbucket
|
494
|
+
username and repository name (without the trailing ".git"), separated
|
495
|
+
by a slash. If both the username and repository name are the same, you
|
492
496
|
can omit one.
|
493
497
|
|
494
498
|
|
@@ -506,19 +510,19 @@ GEMS
|
|
506
510
|
|
507
511
|
|
508
512
|
|
509
|
-
Since
|
513
|
+
Since the bitbucket method is a specialization of git_source, it
|
510
514
|
accepts a :branch named argument.
|
511
515
|
|
512
516
|
PATH
|
513
|
-
You
|
517
|
+
You can specify that a gem is located in a particular location on the
|
514
518
|
file system. Relative paths are resolved relative to the directory con-
|
515
519
|
taining the Gemfile.
|
516
520
|
|
517
|
-
Similar
|
518
|
-
that
|
521
|
+
Similar to the semantics of the :git option, the :path option requires
|
522
|
+
that the directory in question either contains a .gemspec for the gem,
|
519
523
|
or that you specify an explicit version that bundler should use.
|
520
524
|
|
521
|
-
Unlike
|
525
|
+
Unlike :git, bundler does not compile C extensions for gems specified
|
522
526
|
as paths.
|
523
527
|
|
524
528
|
|
@@ -528,8 +532,8 @@ GEMS
|
|
528
532
|
|
529
533
|
|
530
534
|
If you would like to use multiple local gems directly from the filesys-
|
531
|
-
tem,
|
532
|
-
files.
|
535
|
+
tem, you can set a global path option to the path containing the gem's
|
536
|
+
files. This will automatically load gemspec files from subdirectories.
|
533
537
|
|
534
538
|
|
535
539
|
|
@@ -568,24 +572,24 @@ BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
|
|
568
572
|
|
569
573
|
|
570
574
|
|
571
|
-
In
|
572
|
-
to
|
575
|
+
In the case of the group block form the :optional option can be given
|
576
|
+
to prevent a group from being installed unless listed in the --with
|
573
577
|
option given to the bundle install command.
|
574
578
|
|
575
|
-
In
|
576
|
-
modules
|
579
|
+
In the case of the git block form, the :ref, :branch, :tag, and :sub-
|
580
|
+
modules options may be passed to the git method, and all gems in the
|
577
581
|
block will inherit those options.
|
578
582
|
|
579
|
-
The
|
580
|
-
available
|
583
|
+
The presence of a source block in a Gemfile also makes that source
|
584
|
+
available as a possible global source for any other gems which do not
|
581
585
|
specify explicit sources. Thus, when defining source blocks, it is rec-
|
582
|
-
ommended
|
583
|
-
explicit
|
586
|
+
ommended that you also ensure all other gems in the Gemfile are using
|
587
|
+
explicit sources, either via source blocks or :source directives on
|
584
588
|
individual gems.
|
585
589
|
|
586
590
|
INSTALL_IF
|
587
|
-
The
|
588
|
-
lambda.
|
591
|
+
The install_if method allows gems to be installed based on a proc or
|
592
|
+
lambda. This is especially useful for optional gems that can only be
|
589
593
|
used if certain software is installed or some other conditions are met.
|
590
594
|
|
591
595
|
|
@@ -597,48 +601,48 @@ INSTALL_IF
|
|
597
601
|
|
598
602
|
|
599
603
|
GEMSPEC
|
600
|
-
The
|
604
|
+
The .gemspec http://guides.rubygems.org/specification-reference/ file
|
601
605
|
is where you provide metadata about your gem to Rubygems. Some required
|
602
|
-
Gemspec
|
603
|
-
gem.
|
606
|
+
Gemspec attributes include the name, description, and homepage of your
|
607
|
+
gem. This is also where you specify the dependencies your gem needs to
|
604
608
|
run.
|
605
609
|
|
606
610
|
If you wish to use Bundler to help install dependencies for a gem while
|
607
|
-
it
|
611
|
+
it is being developed, use the gemspec method to pull in the dependen-
|
608
612
|
cies listed in the .gemspec file.
|
609
613
|
|
610
614
|
The gemspec method adds any runtime dependencies as gem requirements in
|
611
|
-
the
|
612
|
-
requirements
|
615
|
+
the default group. It also adds development dependencies as gem
|
616
|
+
requirements in the development group. Finally, it adds a gem require-
|
613
617
|
ment on your project (:path => '.'). In conjunction with Bundler.setup,
|
614
618
|
this allows you to require project files in your test code as you would
|
615
|
-
if
|
619
|
+
if the project were installed as a gem; you need not manipulate the
|
616
620
|
load path manually or require project files via relative paths.
|
617
621
|
|
618
622
|
The gemspec method supports optional :path, :glob, :name, and :develop-
|
619
623
|
ment_group options, which control where bundler looks for the .gemspec,
|
620
|
-
the
|
621
|
-
spec"),
|
624
|
+
the glob it uses to look for the gemspec (defaults to: "{,,/*}.gem-
|
625
|
+
spec"), what named .gemspec it uses (if more than one is present), and
|
622
626
|
which group development dependencies are included in.
|
623
627
|
|
624
|
-
When
|
625
|
-
tion,
|
626
|
-
even
|
628
|
+
When a gemspec dependency encounters version conflicts during resolu-
|
629
|
+
tion, the local version under development will always be selected --
|
630
|
+
even if there are remote versions that better match other requirements
|
627
631
|
for the gemspec gem.
|
628
632
|
|
629
633
|
SOURCE PRIORITY
|
630
|
-
When
|
634
|
+
When attempting to locate a gem to satisfy a gem requirement, bundler
|
631
635
|
uses the following priority order:
|
632
636
|
|
633
637
|
1. The source explicitly attached to the gem (using :source, :path, or
|
634
638
|
:git)
|
635
639
|
|
636
640
|
2. For implicit gems (dependencies of explicit gems), any source, git,
|
637
|
-
or
|
638
|
-
prioritizing
|
641
|
+
or path repository declared on the parent. This results in bundler
|
642
|
+
prioritizing the ActiveSupport gem from the Rails git repository
|
639
643
|
over ones from rubygems.org
|
640
644
|
|
641
|
-
3. The
|
645
|
+
3. The sources specified via global source lines, searching each
|
642
646
|
source in your Gemfile from last added to first added.
|
643
647
|
|
644
648
|
|
@@ -646,4 +650,4 @@ SOURCE PRIORITY
|
|
646
650
|
|
647
651
|
|
648
652
|
|
649
|
-
|
653
|
+
September 2018 GEMFILE(5)
|