bundler 1.17.0.pre.1 → 1.17.0.pre.2
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 +39 -1
- data/README.md +1 -1
- data/bundler.gemspec +1 -1
- data/lib/bundler.rb +28 -10
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli.rb +33 -5
- data/lib/bundler/cli/binstubs.rb +8 -2
- data/lib/bundler/cli/remove.rb +18 -0
- data/lib/bundler/definition.rb +18 -13
- data/lib/bundler/dependency.rb +2 -2
- data/lib/bundler/dsl.rb +18 -2
- data/lib/bundler/endpoint_specification.rb +1 -1
- data/lib/bundler/env.rb +8 -6
- data/lib/bundler/fetcher.rb +1 -1
- data/lib/bundler/gem_helper.rb +1 -1
- data/lib/bundler/injector.rb +156 -8
- data/lib/bundler/installer/gem_installer.rb +1 -1
- data/lib/bundler/installer/parallel_installer.rb +1 -1
- data/lib/bundler/mirror.rb +2 -2
- data/lib/bundler/plugin.rb +5 -5
- data/lib/bundler/plugin/index.rb +1 -1
- data/lib/bundler/resolver/spec_group.rb +0 -4
- data/lib/bundler/runtime.rb +1 -1
- data/lib/bundler/settings.rb +1 -1
- data/lib/bundler/shared_helpers.rb +6 -0
- data/lib/bundler/source/metadata.rb +1 -1
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -0
- 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 +6 -3
- data/man/bundle-install.1.txt +118 -107
- data/man/bundle-install.ronn +12 -3
- 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-remove.1 +31 -0
- data/man/bundle-remove.1.txt +34 -0
- data/man/bundle-remove.ronn +23 -0
- data/man/bundle-show.1 +1 -1
- data/man/bundle-show.1.txt +1 -1
- data/man/bundle-update.1 +11 -7
- data/man/bundle-update.1.txt +71 -68
- data/man/bundle-update.ronn +11 -7
- 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 +1 -1
- data/man/gemfile.5.txt +1 -1
- data/man/index.txt +1 -0
- metadata +7 -2
data/man/bundle-install.ronn
CHANGED
@@ -66,7 +66,7 @@ time `bundle install` is run, use `bundle config` (see bundle-config(1)).
|
|
66
66
|
|
67
67
|
* `--force`:
|
68
68
|
Force download every gem, even if the required versions are already available
|
69
|
-
locally.
|
69
|
+
locally. `--redownload` is an alias of this option.
|
70
70
|
|
71
71
|
* `--frozen`:
|
72
72
|
Do not allow the Gemfile.lock to be updated after this install. Exits
|
@@ -290,12 +290,21 @@ of a dependency of a gem in your Gemfile(5)) can result in radically
|
|
290
290
|
different gems being needed to satisfy all dependencies.
|
291
291
|
|
292
292
|
As a result, you `SHOULD` check your `Gemfile.lock` into version
|
293
|
-
control. If you do not, every machine that
|
294
|
-
repository (including your production server) will resolve all
|
293
|
+
control, in both applications and gems. If you do not, every machine that
|
294
|
+
checks out your repository (including your production server) will resolve all
|
295
295
|
dependencies again, which will result in different versions of
|
296
296
|
third-party code being used if `any` of the gems in the Gemfile(5)
|
297
297
|
or any of their dependencies have been updated.
|
298
298
|
|
299
|
+
When Bundler first shipped, the `Gemfile.lock` was included in the `.gitignore`
|
300
|
+
file included with generated gems. Over time, however, it became clear that
|
301
|
+
this practice forces the pain of broken dependencies onto new contributors,
|
302
|
+
while leaving existing contributors potentially unaware of the problem. Since
|
303
|
+
`bundle install` is usually the first step towards a contribution, the pain of
|
304
|
+
broken dependencies would discourage new contributors from contributing. As a
|
305
|
+
result, we have revised our guidance for gem authors to now recommend checking
|
306
|
+
in the lock for gems.
|
307
|
+
|
299
308
|
## CONSERVATIVE UPDATING
|
300
309
|
|
301
310
|
When you make a change to the Gemfile(5) and then run `bundle install`,
|
data/man/bundle-list.1
CHANGED
data/man/bundle-list.1.txt
CHANGED
data/man/bundle-lock.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\-LOCK" "1" "
|
4
|
+
.TH "BUNDLE\-LOCK" "1" "October 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
|
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" "October 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" "October 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" "October 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" "October 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" "October 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-remove.1
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
+
.
|
4
|
+
.TH "BUNDLE\-REMOVE" "1" "October 2018" "" ""
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBbundle\-remove\fR \- Removes gems from the Gemfile
|
8
|
+
.
|
9
|
+
.SH "SYNOPSIS"
|
10
|
+
\fBbundle remove [GEM [GEM \.\.\.]] [\-\-install]\fR
|
11
|
+
.
|
12
|
+
.SH "DESCRIPTION"
|
13
|
+
Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid\. If a gem cannot be removed, a warning is printed\. If a gem is already absent from the Gemfile, and error is raised\.
|
14
|
+
.
|
15
|
+
.SH "OPTIONS"
|
16
|
+
.
|
17
|
+
.TP
|
18
|
+
\fB\-\-install\fR
|
19
|
+
Runs \fBbundle install\fR after the given gems have been removed from the Gemfile, which ensures that both the lockfile and the installed gems on disk are also updated to remove the given gem(s)\.
|
20
|
+
.
|
21
|
+
.P
|
22
|
+
Example:
|
23
|
+
.
|
24
|
+
.P
|
25
|
+
bundle remove rails
|
26
|
+
.
|
27
|
+
.P
|
28
|
+
bundle remove rails rack
|
29
|
+
.
|
30
|
+
.P
|
31
|
+
bundle remove rails rack \-\-install
|
@@ -0,0 +1,34 @@
|
|
1
|
+
BUNDLE-REMOVE(1) BUNDLE-REMOVE(1)
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
bundle-remove - Removes gems from the Gemfile
|
7
|
+
|
8
|
+
SYNOPSIS
|
9
|
+
bundle remove [GEM [GEM ...]] [--install]
|
10
|
+
|
11
|
+
DESCRIPTION
|
12
|
+
Removes the given gems from the Gemfile while ensuring that the result-
|
13
|
+
ing Gemfile is still valid. If a gem cannot be removed, a warning is
|
14
|
+
printed. If a gem is already absent from the Gemfile, and error is
|
15
|
+
raised.
|
16
|
+
|
17
|
+
OPTIONS
|
18
|
+
--install
|
19
|
+
Runs bundle install after the given gems have been removed from
|
20
|
+
the Gemfile, which ensures that both the lockfile and the
|
21
|
+
installed gems on disk are also updated to remove the given
|
22
|
+
gem(s).
|
23
|
+
|
24
|
+
Example:
|
25
|
+
|
26
|
+
bundle remove rails
|
27
|
+
|
28
|
+
bundle remove rails rack
|
29
|
+
|
30
|
+
bundle remove rails rack --install
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
October 2018 BUNDLE-REMOVE(1)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
bundle-remove(1) -- Removes gems from the Gemfile
|
2
|
+
===========================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle remove [GEM [GEM ...]] [--install]`
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid. If a gem cannot be removed, a warning is printed. If a gem is already absent from the Gemfile, and error is raised.
|
11
|
+
|
12
|
+
## OPTIONS
|
13
|
+
|
14
|
+
* `--install`:
|
15
|
+
Runs `bundle install` after the given gems have been removed from the Gemfile, which ensures that both the lockfile and the installed gems on disk are also updated to remove the given gem(s).
|
16
|
+
|
17
|
+
Example:
|
18
|
+
|
19
|
+
bundle remove rails
|
20
|
+
|
21
|
+
bundle remove rails rack
|
22
|
+
|
23
|
+
bundle remove rails rack --install
|
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" "October 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,16 +1,16 @@
|
|
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" "October 2018" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-update\fR \- Update your gems to the latest available versions
|
8
8
|
.
|
9
9
|
.SH "SYNOPSIS"
|
10
|
-
\fBbundle update\fR \fI*gems\fR [\-\-group=NAME] [\-\-source=NAME] [\-\-local] [\-\-ruby] [\-\-bundler[=VERSION]] [\-\-full\-index] [\-\-jobs=JOBS] [\-\-quiet] [\-\-force] [\-\-patch|\-\-minor|\-\-major] [\-\-strict] [\-\-conservative]
|
10
|
+
\fBbundle update\fR \fI*gems\fR [\-\-all] [\-\-group=NAME] [\-\-source=NAME] [\-\-local] [\-\-ruby] [\-\-bundler[=VERSION]] [\-\-full\-index] [\-\-jobs=JOBS] [\-\-quiet] [\-\-force] [\-\-patch|\-\-minor|\-\-major] [\-\-strict] [\-\-conservative]
|
11
11
|
.
|
12
12
|
.SH "DESCRIPTION"
|
13
|
-
Update the gems specified (all gems, if
|
13
|
+
Update the gems specified (all gems, if \fB\-\-all\fR flag is used), ignoring the previously installed gems specified in the \fBGemfile\.lock\fR\. In general, you should use bundle install(1) \fIbundle\-install\.1\.html\fR to install the same exact gems and versions across machines\.
|
14
14
|
.
|
15
15
|
.P
|
16
16
|
You would use \fBbundle update\fR to explicitly update the version of a gem\.
|
@@ -18,6 +18,10 @@ You would use \fBbundle update\fR to explicitly update the version of a gem\.
|
|
18
18
|
.SH "OPTIONS"
|
19
19
|
.
|
20
20
|
.TP
|
21
|
+
\fB\-\-all\fR
|
22
|
+
Update all gems specified in Gemfile\.
|
23
|
+
.
|
24
|
+
.TP
|
21
25
|
\fB\-\-group=<name>\fR, \fB\-g=[<name>]\fR
|
22
26
|
Only update the gems in the specified group\. For instance, you can update all gems in the development group with \fBbundle update \-\-group development\fR\. You can also call \fBbundle update rails \-\-group test\fR to update the rails gem and all gems in the test group, for example\.
|
23
27
|
.
|
@@ -55,7 +59,7 @@ Only output warnings and errors\.
|
|
55
59
|
.
|
56
60
|
.TP
|
57
61
|
\fB\-\-force\fR
|
58
|
-
Force downloading every gem\.
|
62
|
+
Force downloading every gem\. \fB\-\-redownload\fR is an alias of this option\.
|
59
63
|
.
|
60
64
|
.TP
|
61
65
|
\fB\-\-patch\fR
|
@@ -78,7 +82,7 @@ Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR
|
|
78
82
|
Use bundle install conservative update behavior and do not allow shared dependencies to be updated\.
|
79
83
|
.
|
80
84
|
.SH "UPDATING ALL GEMS"
|
81
|
-
If you run \fBbundle update\fR
|
85
|
+
If you run \fBbundle update \-\-all\fR, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
|
82
86
|
.
|
83
87
|
.P
|
84
88
|
Consider the following Gemfile(5):
|
@@ -149,7 +153,7 @@ After checking in the \fBGemfile\.lock\fR into version control and cloning it on
|
|
149
153
|
However, from time to time, you might want to update the gems you are using to the newest versions that still match the gems in your Gemfile(5)\.
|
150
154
|
.
|
151
155
|
.P
|
152
|
-
To do this, run \fBbundle update\fR, which will ignore the \fBGemfile\.lock\fR, and resolve all the dependencies again\. Keep in mind that this process can result in a significantly different set of the 25 gems, based on the requirements of new gems that the gem authors released since the last time you ran \fBbundle update\fR\.
|
156
|
+
To do this, run \fBbundle update \-\-all\fR, which will ignore the \fBGemfile\.lock\fR, and resolve all the dependencies again\. Keep in mind that this process can result in a significantly different set of the 25 gems, based on the requirements of new gems that the gem authors released since the last time you ran \fBbundle update \-\-all\fR\.
|
153
157
|
.
|
154
158
|
.SH "UPDATING A LIST OF GEMS"
|
155
159
|
Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of the gems that you specified locked to the versions in the \fBGemfile\.lock\fR\.
|
@@ -384,7 +388,7 @@ $ bundle update rails thin
|
|
384
388
|
If you want to update all the gems to the latest possible versions that still match the gems listed in the Gemfile(5), run
|
385
389
|
.
|
386
390
|
.IP
|
387
|
-
$ bundle update
|
391
|
+
$ bundle update \-\-all
|
388
392
|
.
|
389
393
|
.IP "" 0
|
390
394
|
|
data/man/bundle-update.1.txt
CHANGED
@@ -6,12 +6,12 @@ NAME
|
|
6
6
|
bundle-update - Update your gems to the latest available versions
|
7
7
|
|
8
8
|
SYNOPSIS
|
9
|
-
bundle update *gems [--group=NAME] [--source=NAME] [--local]
|
10
|
-
[--bundler[=VERSION]] [--full-index]
|
11
|
-
[--patch|--minor|--major] [--strict] [--conservative]
|
9
|
+
bundle update *gems [--all] [--group=NAME] [--source=NAME] [--local]
|
10
|
+
[--ruby] [--bundler[=VERSION]] [--full-index] [--jobs=JOBS] [--quiet]
|
11
|
+
[--force] [--patch|--minor|--major] [--strict] [--conservative]
|
12
12
|
|
13
13
|
DESCRIPTION
|
14
|
-
Update the gems specified (all gems, if
|
14
|
+
Update the gems specified (all gems, if --all flag is used), ignoring
|
15
15
|
the previously installed gems specified in the Gemfile.lock. In gen-
|
16
16
|
eral, you should use bundle install(1) bundle-install.1.html to install
|
17
17
|
the same exact gems and versions across machines.
|
@@ -19,6 +19,8 @@ DESCRIPTION
|
|
19
19
|
You would use bundle update to explicitly update the version of a gem.
|
20
20
|
|
21
21
|
OPTIONS
|
22
|
+
--all Update all gems specified in Gemfile.
|
23
|
+
|
22
24
|
--group=<name>, -g=[<name>]
|
23
25
|
Only update the gems in the specified group. For instance, you
|
24
26
|
can update all gems in the development group with bundle update
|
@@ -56,7 +58,8 @@ OPTIONS
|
|
56
58
|
Only output warnings and errors.
|
57
59
|
|
58
60
|
--force
|
59
|
-
Force downloading every gem.
|
61
|
+
Force downloading every gem. --redownload is an alias of this
|
62
|
+
option.
|
60
63
|
|
61
64
|
--patch
|
62
65
|
Prefer updating only to next patch version.
|
@@ -76,9 +79,9 @@ OPTIONS
|
|
76
79
|
shared dependencies to be updated.
|
77
80
|
|
78
81
|
UPDATING ALL GEMS
|
79
|
-
If
|
80
|
-
|
81
|
-
|
82
|
+
If you run bundle update --all, bundler will ignore any previously
|
83
|
+
installed gems and resolve all dependencies again based on the latest
|
84
|
+
versions of all gems available in the sources.
|
82
85
|
|
83
86
|
Consider the following Gemfile(5):
|
84
87
|
|
@@ -91,8 +94,8 @@ UPDATING ALL GEMS
|
|
91
94
|
|
92
95
|
|
93
96
|
|
94
|
-
When
|
95
|
-
bundler
|
97
|
+
When you run bundle install(1) bundle-install.1.html the first time,
|
98
|
+
bundler will resolve all of the dependencies, all the way down, and
|
96
99
|
install what you need:
|
97
100
|
|
98
101
|
|
@@ -131,43 +134,43 @@ UPDATING ALL GEMS
|
|
131
134
|
|
132
135
|
|
133
136
|
|
134
|
-
As
|
135
|
-
application
|
136
|
-
the
|
137
|
-
bundle
|
137
|
+
As you can see, even though you have two gems in the Gemfile(5), your
|
138
|
+
application needs 26 different gems in order to run. Bundler remembers
|
139
|
+
the exact versions it installed in Gemfile.lock. The next time you run
|
140
|
+
bundle install(1) bundle-install.1.html, bundler skips the dependency
|
138
141
|
resolution and installs the same gems as it installed last time.
|
139
142
|
|
140
|
-
After
|
141
|
-
on
|
142
|
-
will
|
143
|
+
After checking in the Gemfile.lock into version control and cloning it
|
144
|
+
on another machine, running bundle install(1) bundle-install.1.html
|
145
|
+
will still install the gems that you installed last time. You don't
|
143
146
|
need to worry that a new release of erubis or mail changes the gems you
|
144
147
|
use.
|
145
148
|
|
146
|
-
However,
|
147
|
-
using
|
149
|
+
However, from time to time, you might want to update the gems you are
|
150
|
+
using to the newest versions that still match the gems in your Gem-
|
148
151
|
file(5).
|
149
152
|
|
150
|
-
To
|
151
|
-
resolve
|
152
|
-
result
|
153
|
-
requirements
|
154
|
-
time you ran bundle update.
|
153
|
+
To do this, run bundle update --all, which will ignore the Gem-
|
154
|
+
file.lock, and resolve all the dependencies again. Keep in mind that
|
155
|
+
this process can result in a significantly different set of the 25
|
156
|
+
gems, based on the requirements of new gems that the gem authors
|
157
|
+
released since the last time you ran bundle update --all.
|
155
158
|
|
156
159
|
UPDATING A LIST OF GEMS
|
157
160
|
Sometimes, you want to update a single gem in the Gemfile(5), and leave
|
158
|
-
the
|
161
|
+
the rest of the gems that you specified locked to the versions in the
|
159
162
|
Gemfile.lock.
|
160
163
|
|
161
|
-
For
|
164
|
+
For instance, in the scenario above, imagine that nokogiri releases
|
162
165
|
version 1.4.4, and you want to update it without updating Rails and all
|
163
166
|
of its dependencies. To do this, run bundle update nokogiri.
|
164
167
|
|
165
|
-
Bundler
|
168
|
+
Bundler will update nokogiri and any of its dependencies, but leave
|
166
169
|
alone Rails and its dependencies.
|
167
170
|
|
168
171
|
OVERLAPPING DEPENDENCIES
|
169
|
-
Sometimes,
|
170
|
-
the
|
172
|
+
Sometimes, multiple gems declared in your Gemfile(5) are satisfied by
|
173
|
+
the same second-level dependency. For instance, consider the case of
|
171
174
|
thin and rack-perftools-profiler.
|
172
175
|
|
173
176
|
|
@@ -179,7 +182,7 @@ OVERLAPPING DEPENDENCIES
|
|
179
182
|
|
180
183
|
|
181
184
|
|
182
|
-
The
|
185
|
+
The thin gem depends on rack >= 1.0, while rack-perftools-profiler
|
183
186
|
depends on rack ~> 1.0. If you run bundle install, you get:
|
184
187
|
|
185
188
|
|
@@ -197,14 +200,14 @@ OVERLAPPING DEPENDENCIES
|
|
197
200
|
|
198
201
|
|
199
202
|
In this case, the two gems have their own set of dependencies, but they
|
200
|
-
share
|
201
|
-
update
|
202
|
-
but
|
203
|
-
rack-perftools_profiler.
|
203
|
+
share rack in common. If you run bundle update thin, bundler will
|
204
|
+
update daemons, eventmachine and rack, which are dependencies of thin,
|
205
|
+
but not open4 or perftools.rb, which are dependencies of
|
206
|
+
rack-perftools_profiler. Note that bundle update thin will update rack
|
204
207
|
even though it's also a dependency of rack-perftools_profiler.
|
205
208
|
|
206
|
-
In
|
207
|
-
bundler
|
209
|
+
In short, by default, when you update a gem using bundle update,
|
210
|
+
bundler will update all dependencies of that gem, including those that
|
208
211
|
are also dependencies of another gem.
|
209
212
|
|
210
213
|
To prevent updating shared dependencies, prior to version 1.14 the only
|
@@ -212,8 +215,8 @@ OVERLAPPING DEPENDENCIES
|
|
212
215
|
dle-install.1.html:
|
213
216
|
|
214
217
|
In this scenario, updating the thin version manually in the Gemfile(5),
|
215
|
-
and
|
216
|
-
update
|
218
|
+
and then running bundle install(1) bundle-install.1.html will only
|
219
|
+
update daemons and eventmachine, but not rack. For more information,
|
217
220
|
see the CONSERVATIVE UPDATING section of bundle install(1) bun-
|
218
221
|
dle-install.1.html.
|
219
222
|
|
@@ -221,8 +224,8 @@ OVERLAPPING DEPENDENCIES
|
|
221
224
|
vent shared dependencies from being updated.
|
222
225
|
|
223
226
|
PATCH LEVEL OPTIONS
|
224
|
-
Version
|
225
|
-
gem
|
227
|
+
Version 1.14 introduced 4 patch-level options that will influence how
|
228
|
+
gem versions are resolved. One of the following options can be used:
|
226
229
|
--patch, --minor or --major. --strict can be added to further influence
|
227
230
|
resolution.
|
228
231
|
|
@@ -239,41 +242,41 @@ PATCH LEVEL OPTIONS
|
|
239
242
|
Do not allow any gem to be updated past latest --patch | --minor
|
240
243
|
| --major.
|
241
244
|
|
242
|
-
When
|
243
|
-
requirements
|
245
|
+
When Bundler is resolving what versions to use to satisfy declared
|
246
|
+
requirements in the Gemfile or in parent gems, it looks up all avail-
|
244
247
|
able versions, filters out any versions that don't satisfy the require-
|
245
248
|
ment, and then, by default, sorts them from newest to oldest, consider-
|
246
249
|
ing them in that order.
|
247
250
|
|
248
|
-
Providing
|
249
|
-
sort
|
251
|
+
Providing one of the patch level options (e.g. --patch) changes the
|
252
|
+
sort order of the satisfying versions, causing Bundler to consider the
|
250
253
|
latest --patch or --minor version available before other versions. Note
|
251
254
|
that versions outside the stated patch level could still be resolved to
|
252
255
|
if necessary to find a suitable dependency graph.
|
253
256
|
|
254
|
-
For
|
255
|
-
defined
|
257
|
+
For example, if gem 'foo' is locked at 1.0.2, with no gem requirement
|
258
|
+
defined in the Gemfile, and versions 1.0.3, 1.0.4, 1.1.0, 1.1.1, 2.0.0
|
256
259
|
all exist, the default order of preference by default (--major) will be
|
257
260
|
"2.0.0, 1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2".
|
258
261
|
|
259
|
-
If
|
262
|
+
If the --patch option is used, the order of preference will change to
|
260
263
|
"1.0.4, 1.0.3, 1.0.2, 1.1.1, 1.1.0, 2.0.0".
|
261
264
|
|
262
|
-
If
|
265
|
+
If the --minor option is used, the order of preference will change to
|
263
266
|
"1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2, 2.0.0".
|
264
267
|
|
265
|
-
Combining
|
266
|
-
remove
|
268
|
+
Combining the --strict option with any of the patch level options will
|
269
|
+
remove any versions beyond the scope of the patch level option, to
|
267
270
|
ensure that no gem is updated that far.
|
268
271
|
|
269
|
-
To
|
272
|
+
To continue the previous example, if both --patch and --strict options
|
270
273
|
are used, the available versions for resolution would be "1.0.4, 1.0.3,
|
271
|
-
1.0.2".
|
274
|
+
1.0.2". If --minor and --strict are used, it would be "1.1.1, 1.1.0,
|
272
275
|
1.0.4, 1.0.3, 1.0.2".
|
273
276
|
|
274
|
-
Gem
|
277
|
+
Gem requirements as defined in the Gemfile will still be the first
|
275
278
|
determining factor for what versions are available. If the gem require-
|
276
|
-
ment
|
279
|
+
ment for foo in the Gemfile is '~> 1.0', that will accomplish the same
|
277
280
|
thing as providing the --minor and --strict options.
|
278
281
|
|
279
282
|
PATCH LEVEL EXAMPLES
|
@@ -322,26 +325,26 @@ PATCH LEVEL EXAMPLES
|
|
322
325
|
|
323
326
|
|
324
327
|
|
325
|
-
In
|
328
|
+
In case 1, bar is upgraded to 2.1.1, a minor version increase, because
|
326
329
|
the dependency from foo 1.4.5 required it.
|
327
330
|
|
328
|
-
In
|
329
|
-
allowed
|
331
|
+
In case 2, only foo is requested to be unlocked, but bar is also
|
332
|
+
allowed to move because it's not a declared dependency in the Gemfile.
|
330
333
|
|
331
|
-
In
|
332
|
-
is
|
334
|
+
In case 3, bar goes up a whole major release, because a minor increase
|
335
|
+
is preferred now for foo, and when it goes to 1.5.1, it requires 3.0.0
|
333
336
|
of bar.
|
334
337
|
|
335
338
|
In case 4, foo is preferred up to a minor version, but 1.5.1 won't work
|
336
|
-
because
|
339
|
+
because the --strict flag removes bar 3.0.0 from consideration since
|
337
340
|
it's a major increment.
|
338
341
|
|
339
|
-
In
|
340
|
-
from
|
342
|
+
In case 5, both foo and bar have any minor or major increments removed
|
343
|
+
from consideration because of the --strict flag, so the most they can
|
341
344
|
move is up to 1.4.4 and 2.0.4.
|
342
345
|
|
343
346
|
RECOMMENDED WORKFLOW
|
344
|
-
In
|
347
|
+
In general, when working with an application managed with bundler, you
|
345
348
|
should use the following workflow:
|
346
349
|
|
347
350
|
o After you create your Gemfile(5) for the first time, run
|
@@ -352,7 +355,7 @@ RECOMMENDED WORKFLOW
|
|
352
355
|
|
353
356
|
$ git add Gemfile.lock
|
354
357
|
|
355
|
-
o When
|
358
|
+
o When checking out this repository on another development machine,
|
356
359
|
run
|
357
360
|
|
358
361
|
$ bundle install
|
@@ -361,7 +364,7 @@ RECOMMENDED WORKFLOW
|
|
361
364
|
|
362
365
|
$ bundle install --deployment
|
363
366
|
|
364
|
-
o After
|
367
|
+
o After changing the Gemfile(5) to reflect a new or update depen-
|
365
368
|
dency, run
|
366
369
|
|
367
370
|
$ bundle install
|
@@ -375,14 +378,14 @@ RECOMMENDED WORKFLOW
|
|
375
378
|
|
376
379
|
$ bundle update rails thin
|
377
380
|
|
378
|
-
o If
|
381
|
+
o If you want to update all the gems to the latest possible versions
|
379
382
|
that still match the gems listed in the Gemfile(5), run
|
380
383
|
|
381
|
-
$ bundle update
|
384
|
+
$ bundle update --all
|
382
385
|
|
383
386
|
|
384
387
|
|
385
388
|
|
386
389
|
|
387
390
|
|
388
|
-
|
391
|
+
October 2018 BUNDLE-UPDATE(1)
|