bundler 2.1.0 → 2.2.0.rc.1
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 +832 -738
- data/README.md +6 -8
- data/bundler.gemspec +3 -3
- data/exe/bundle +3 -0
- data/lib/bundler.rb +15 -4
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli.rb +32 -11
- data/lib/bundler/cli/console.rb +1 -1
- data/lib/bundler/cli/exec.rb +3 -12
- data/lib/bundler/cli/gem.rb +83 -10
- data/lib/bundler/cli/info.rb +13 -3
- data/lib/bundler/cli/init.rb +1 -1
- data/lib/bundler/cli/install.rb +8 -16
- data/lib/bundler/cli/issue.rb +2 -2
- data/lib/bundler/cli/list.rb +11 -9
- data/lib/bundler/cli/outdated.rb +88 -65
- data/lib/bundler/cli/plugin.rb +10 -0
- data/lib/bundler/cli/pristine.rb +5 -0
- data/lib/bundler/definition.rb +32 -32
- data/lib/bundler/dependency.rb +0 -9
- data/lib/bundler/dsl.rb +1 -5
- data/lib/bundler/environment_preserver.rb +26 -2
- data/lib/bundler/errors.rb +1 -0
- data/lib/bundler/feature_flag.rb +0 -2
- data/lib/bundler/fetcher.rb +1 -0
- data/lib/bundler/friendly_errors.rb +4 -10
- data/lib/bundler/gem_helper.rb +18 -12
- data/lib/bundler/gem_version_promoter.rb +1 -1
- data/lib/bundler/injector.rb +14 -3
- data/lib/bundler/inline.rb +2 -2
- data/lib/bundler/installer.rb +29 -28
- data/lib/bundler/installer/gem_installer.rb +2 -2
- data/lib/bundler/installer/parallel_installer.rb +9 -9
- data/lib/bundler/lazy_specification.rb +16 -3
- data/lib/bundler/plugin.rb +26 -0
- data/lib/bundler/plugin/index.rb +9 -0
- data/lib/bundler/psyched_yaml.rb +0 -15
- data/lib/bundler/remote_specification.rb +4 -1
- data/lib/bundler/resolver.rb +31 -8
- data/lib/bundler/resolver/spec_group.rb +26 -5
- data/lib/bundler/rubygems_ext.rb +7 -8
- data/lib/bundler/rubygems_gem_installer.rb +1 -7
- data/lib/bundler/rubygems_integration.rb +13 -48
- data/lib/bundler/runtime.rb +2 -12
- data/lib/bundler/settings.rb +0 -3
- data/lib/bundler/setup.rb +5 -0
- data/lib/bundler/shared_helpers.rb +1 -1
- data/lib/bundler/source/git.rb +4 -4
- data/lib/bundler/source/git/git_proxy.rb +53 -58
- data/lib/bundler/source/path.rb +5 -1
- data/lib/bundler/source/path/installer.rb +7 -9
- data/lib/bundler/source/rubygems.rb +11 -14
- data/lib/bundler/stub_specification.rb +16 -4
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +57 -47
- data/lib/bundler/templates/newgem/Gemfile.tt +9 -1
- data/lib/bundler/templates/newgem/Rakefile.tt +19 -5
- data/lib/bundler/templates/newgem/bin/console.tt +2 -0
- data/lib/bundler/templates/newgem/circleci/config.yml.tt +13 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +2 -0
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +18 -0
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +2 -0
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +2 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +6 -4
- data/lib/bundler/templates/newgem/rubocop.yml.tt +10 -0
- data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -0
- data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -0
- data/lib/bundler/templates/newgem/test/{newgem_test.rb.tt → minitest/newgem_test.rb.tt} +2 -0
- data/lib/bundler/templates/newgem/test/{test_helper.rb.tt → minitest/test_helper.rb.tt} +2 -0
- data/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
- data/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +72 -208
- data/lib/bundler/vendor/thor/lib/thor.rb +0 -7
- data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +2 -1
- data/lib/bundler/vendor/thor/lib/thor/base.rb +9 -0
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- data/man/bundle-add.1 +1 -1
- data/man/bundle-add.1.txt +15 -15
- data/man/bundle-binstubs.1 +1 -1
- data/man/bundle-binstubs.1.txt +10 -10
- data/man/bundle-cache.1 +1 -1
- data/man/bundle-cache.1.txt +15 -15
- data/man/bundle-check.1 +1 -1
- data/man/bundle-check.1.txt +8 -8
- data/man/bundle-clean.1 +1 -1
- data/man/bundle-clean.1.txt +6 -6
- data/man/bundle-config.1 +3 -9
- data/man/bundle-config.1.txt +271 -272
- data/man/bundle-config.ronn +5 -9
- data/man/bundle-doctor.1 +1 -1
- data/man/bundle-doctor.1.txt +9 -9
- data/man/bundle-exec.1 +1 -1
- data/man/bundle-exec.1.txt +84 -81
- data/man/bundle-gem.1 +25 -3
- data/man/bundle-gem.1.txt +65 -39
- data/man/bundle-gem.ronn +30 -7
- data/man/bundle-info.1 +1 -1
- data/man/bundle-info.1.txt +2 -2
- data/man/bundle-init.1 +1 -1
- data/man/bundle-init.1.txt +9 -9
- data/man/bundle-inject.1 +1 -1
- data/man/bundle-inject.1.txt +4 -4
- data/man/bundle-install.1 +1 -1
- data/man/bundle-install.1.txt +169 -169
- data/man/bundle-list.1 +7 -7
- data/man/bundle-list.1.txt +12 -11
- data/man/bundle-list.ronn +6 -6
- data/man/bundle-lock.1 +1 -1
- data/man/bundle-lock.1.txt +28 -28
- data/man/bundle-open.1 +1 -1
- data/man/bundle-open.1.txt +3 -3
- data/man/bundle-outdated.1 +1 -1
- data/man/bundle-outdated.1.txt +34 -34
- data/man/bundle-platform.1 +1 -1
- data/man/bundle-platform.1.txt +16 -16
- data/man/bundle-pristine.1 +1 -1
- data/man/bundle-pristine.1.txt +8 -8
- data/man/bundle-remove.1 +1 -1
- data/man/bundle-remove.1.txt +9 -9
- data/man/bundle-show.1 +1 -1
- data/man/bundle-show.1.txt +8 -8
- data/man/bundle-update.1 +1 -1
- data/man/bundle-update.1.txt +149 -148
- data/man/bundle-viz.1 +1 -1
- data/man/bundle-viz.1.txt +11 -11
- data/man/bundle.1 +1 -1
- data/man/bundle.1.txt +31 -31
- data/man/gemfile.5 +1 -1
- data/man/gemfile.5.txt +218 -216
- metadata +14 -8
data/man/bundle-gem.ronn
CHANGED
@@ -60,14 +60,37 @@ configuration file using the following names:
|
|
60
60
|
Do not create a `LICENSE.txt` (overrides `--mit` specified in the global
|
61
61
|
config).
|
62
62
|
|
63
|
-
* `-t`, `--test=minitest`, `--test=rspec`:
|
63
|
+
* `-t`, `--test=minitest`, `--test=rspec`, `--test=test-unit`:
|
64
64
|
Specify the test framework that Bundler should use when generating the
|
65
|
-
project. Acceptable values are `minitest` and `
|
66
|
-
will be configured and a skeleton test/spec directory will
|
67
|
-
on this option.
|
68
|
-
|
69
|
-
|
70
|
-
|
65
|
+
project. Acceptable values are `minitest`, `rspec` and `test-unit`. The
|
66
|
+
`GEM_NAME.gemspec` will be configured and a skeleton test/spec directory will
|
67
|
+
be created based on this option. Given no option is specified:
|
68
|
+
|
69
|
+
When Bundler is configured to generate tests, this defaults to Bundler's
|
70
|
+
global config setting `gem.test`.
|
71
|
+
|
72
|
+
When Bundler is configured to not generate tests, an interactive prompt will
|
73
|
+
be displayed and the answer will be used for the current rubygem project.
|
74
|
+
|
75
|
+
When Bundler is unconfigured, an interactive prompt will be displayed and
|
76
|
+
the answer will be saved in Bundler's global config for future `bundle gem`
|
77
|
+
use.
|
78
|
+
|
79
|
+
* `--ci`, `--ci=github`, `--ci=travis`, `--ci=gitlab`, `--ci=circle`:
|
80
|
+
Specify the continuous integration service that Bundler should use when
|
81
|
+
generating the project. Acceptable values are `github`, `travis`, `gitlab`
|
82
|
+
and `circle`. A configuration file will be generated in the project directory.
|
83
|
+
Given no option is specified:
|
84
|
+
|
85
|
+
When Bundler is configured to generate CI files, this defaults to Bundler's
|
86
|
+
global config setting `gem.ci`.
|
87
|
+
|
88
|
+
When Bundler is configured to not generate CI files, an interactive prompt
|
89
|
+
will be displayed and the answer will be used for the current rubygem project.
|
90
|
+
|
91
|
+
When Bundler is unconfigured, an interactive prompt will be displayed and
|
92
|
+
the answer will be saved in Bundler's global config for future `bundle gem`
|
93
|
+
use.
|
71
94
|
|
72
95
|
* `-e`, `--edit[=EDITOR]`:
|
73
96
|
Open the resulting GEM_NAME.gemspec in EDITOR, or the default editor if not
|
data/man/bundle-info.1
CHANGED
data/man/bundle-info.1.txt
CHANGED
data/man/bundle-init.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\-INIT" "1" "
|
4
|
+
.TH "BUNDLE\-INIT" "1" "July 2020" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
|
data/man/bundle-init.1.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
BUNDLE-INIT(1)
|
1
|
+
BUNDLE-INIT(1) BUNDLE-INIT(1)
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -9,16 +9,16 @@ SYNOPSIS
|
|
9
9
|
bundle init [--gemspec=FILE]
|
10
10
|
|
11
11
|
DESCRIPTION
|
12
|
-
Init generates
|
13
|
-
|
14
|
-
gemspec,
|
15
|
-
listed
|
16
|
-
|
12
|
+
Init generates a default [Gemfile(5)][Gemfile(5)] in the current
|
13
|
+
working directory. When adding a [Gemfile(5)][Gemfile(5)] to a gem with
|
14
|
+
a gemspec, the --gemspec option will automatically add each dependency
|
15
|
+
listed in the gemspec file to the newly created
|
16
|
+
[Gemfile(5)][Gemfile(5)].
|
17
17
|
|
18
18
|
OPTIONS
|
19
19
|
--gemspec
|
20
|
-
|
21
|
-
|
20
|
+
Use the specified .gemspec to create the
|
21
|
+
[Gemfile(5)][Gemfile(5)]
|
22
22
|
|
23
23
|
FILES
|
24
24
|
Included in the default [Gemfile(5)][Gemfile(5)] generated is the line
|
@@ -31,4 +31,4 @@ SEE ALSO
|
|
31
31
|
|
32
32
|
|
33
33
|
|
34
|
-
|
34
|
+
July 2020 BUNDLE-INIT(1)
|
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" "July 2020" "" ""
|
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
@@ -1,4 +1,4 @@
|
|
1
|
-
BUNDLE-INJECT(1)
|
1
|
+
BUNDLE-INJECT(1) BUNDLE-INJECT(1)
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -19,8 +19,8 @@ DESCRIPTION
|
|
19
19
|
|
20
20
|
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
bundle install
|
23
|
+
bundle inject 'rack' '> 0'
|
24
24
|
|
25
25
|
|
26
26
|
|
@@ -29,4 +29,4 @@ DESCRIPTION
|
|
29
29
|
|
30
30
|
|
31
31
|
|
32
|
-
|
32
|
+
July 2020 BUNDLE-INJECT(1)
|
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" "July 2020" "" ""
|
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
@@ -1,4 +1,4 @@
|
|
1
|
-
BUNDLE-INSTALL(1)
|
1
|
+
BUNDLE-INSTALL(1) BUNDLE-INSTALL(1)
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -6,22 +6,22 @@ NAME
|
|
6
6
|
bundle-install - Install the dependencies specified in your Gemfile
|
7
7
|
|
8
8
|
SYNOPSIS
|
9
|
-
bundle
|
9
|
+
bundle install [--binstubs[=DIRECTORY]] [--clean] [--deployment]
|
10
10
|
[--frozen] [--full-index] [--gemfile=GEMFILE] [--jobs=NUMBER] [--local]
|
11
|
-
[--no-cache] [--no-prune] [--path PATH] [--quiet]
|
12
|
-
[--retry=NUMBER]
|
13
|
-
|
14
|
-
|
11
|
+
[--no-cache] [--no-prune] [--path PATH] [--quiet] [--redownload]
|
12
|
+
[--retry=NUMBER] [--shebang] [--standalone[=GROUP[ GROUP...]]]
|
13
|
+
[--system] [--trust-policy=POLICY] [--with=GROUP[ GROUP...]]
|
14
|
+
[--without=GROUP[ GROUP...]]
|
15
15
|
|
16
16
|
DESCRIPTION
|
17
|
-
Install the gems specified in your Gemfile(5). If this
|
18
|
-
time you run bundle install
|
17
|
+
Install the gems specified in your Gemfile(5). If this is the first
|
18
|
+
time you run bundle install (and a Gemfile.lock does not exist),
|
19
19
|
Bundler will fetch all remote sources, resolve dependencies and install
|
20
20
|
all needed gems.
|
21
21
|
|
22
22
|
If a Gemfile.lock does exist, and you have not updated your Gemfile(5),
|
23
|
-
Bundler will
|
24
|
-
|
23
|
+
Bundler will fetch all remote sources, but use the dependencies
|
24
|
+
specified in the Gemfile.lock instead of resolving dependencies.
|
25
25
|
|
26
26
|
If a Gemfile.lock does exist, and you have updated your Gemfile(5),
|
27
27
|
Bundler will use the dependencies in the Gemfile.lock for all gems that
|
@@ -34,122 +34,122 @@ OPTIONS
|
|
34
34
|
time bundle install is run, use bundle config (see bundle-config(1)).
|
35
35
|
|
36
36
|
--binstubs[=<directory>]
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
37
|
+
Binstubs are scripts that wrap around executables. Bundler
|
38
|
+
creates a small Ruby file (a binstub) that loads Bundler, runs
|
39
|
+
the command, and puts it in bin/. This lets you link the binstub
|
40
|
+
inside of an application to the exact gem version the
|
41
|
+
application needs.
|
42
|
+
|
43
|
+
Creates a directory (defaults to ~/bin) and places any
|
44
|
+
executables from the gem there. These executables run in
|
45
|
+
Bundler's context. If used, you might add this directory to your
|
46
|
+
environment's PATH variable. For instance, if the rails gem
|
47
|
+
comes with a rails executable, this flag will create a bin/rails
|
48
|
+
executable that ensures that all referred dependencies will be
|
49
|
+
resolved using the bundled gems.
|
50
50
|
|
51
51
|
--clean
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
On finishing the installation Bundler is going to remove any
|
53
|
+
gems not present in the current Gemfile(5). Don't worry, gems
|
54
|
+
currently in use will not be removed.
|
55
55
|
|
56
56
|
--deployment
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
In deployment mode, Bundler will 'roll-out' the bundle for
|
58
|
+
production or CI use. Please check carefully if you want to have
|
59
|
+
this option enabled in your development environment.
|
60
60
|
|
61
61
|
--redownload
|
62
|
-
|
63
|
-
|
62
|
+
Force download every gem, even if the required versions are
|
63
|
+
already available locally.
|
64
64
|
|
65
65
|
--frozen
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
Do not allow the Gemfile.lock to be updated after this install.
|
67
|
+
Exits non-zero if there are going to be changes to the
|
68
|
+
Gemfile.lock.
|
69
69
|
|
70
70
|
--full-index
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
71
|
+
Bundler will not call Rubygems' API endpoint (default) but
|
72
|
+
download and cache a (currently big) index file of all gems.
|
73
|
+
Performance can be improved for large bundles that seldom change
|
74
|
+
by enabling this option.
|
75
75
|
|
76
76
|
--gemfile=<gemfile>
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
77
|
+
The location of the Gemfile(5) which Bundler should use. This
|
78
|
+
defaults to a Gemfile(5) in the current working directory. In
|
79
|
+
general, Bundler will assume that the location of the Gemfile(5)
|
80
|
+
is also the project's root and will try to find Gemfile.lock and
|
81
|
+
vendor/cache relative to this location.
|
82
82
|
|
83
83
|
--jobs=[<number>], -j[<number>]
|
84
|
-
|
85
|
-
|
84
|
+
The maximum number of parallel download and install jobs. The
|
85
|
+
default is 1.
|
86
86
|
|
87
87
|
--local
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
88
|
+
Do not attempt to connect to rubygems.org. Instead, Bundler will
|
89
|
+
use the gems already present in Rubygems' cache or in
|
90
|
+
vendor/cache. Note that if a appropriate platform-specific gem
|
91
|
+
exists on rubygems.org it will not be found.
|
92
92
|
|
93
93
|
--no-cache
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
Do not update the cache in vendor/cache with the newly bundled
|
95
|
+
gems. This does not remove any gems in the cache but keeps the
|
96
|
+
newly bundled gems from being cached during the install.
|
97
97
|
|
98
98
|
--no-prune
|
99
|
-
|
100
|
-
|
99
|
+
Don't remove stale gems from the cache when the installation
|
100
|
+
finishes.
|
101
101
|
|
102
102
|
--path=<path>
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
103
|
+
The location to install the specified gems to. This defaults to
|
104
|
+
Rubygems' setting. Bundler shares this location with Rubygems,
|
105
|
+
gem install ... will have gem installed there, too. Therefore,
|
106
|
+
gems installed without a --path ... setting will show up by
|
107
|
+
calling gem list. Accordingly, gems installed to other locations
|
108
|
+
will not get listed.
|
109
109
|
|
110
110
|
--quiet
|
111
|
-
|
112
|
-
|
111
|
+
Do not print progress information to the standard output.
|
112
|
+
Instead, Bundler will exit using a status code ($?).
|
113
113
|
|
114
114
|
--retry=[<number>]
|
115
|
-
|
115
|
+
Retry failed network or git requests for number times.
|
116
116
|
|
117
117
|
--shebang=<ruby-executable>
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
118
|
+
Uses the specified ruby executable (usually ruby) to execute the
|
119
|
+
scripts created with --binstubs. In addition, if you use
|
120
|
+
--binstubs together with --shebang jruby these executables will
|
121
|
+
be changed to execute jruby instead.
|
122
122
|
|
123
123
|
--standalone[=<list>]
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
124
|
+
Makes a bundle that can work without depending on Rubygems or
|
125
|
+
Bundler at runtime. A space separated list of groups to install
|
126
|
+
has to be specified. Bundler creates a directory named bundle
|
127
|
+
and installs the bundle there. It also generates a
|
128
|
+
bundle/bundler/setup.rb file to replace Bundler's own setup in
|
129
|
+
the manner required. Using this option implicitly sets path,
|
130
|
+
which is a [remembered option][REMEMBERED OPTIONS].
|
131
131
|
|
132
132
|
--system
|
133
|
-
|
134
|
-
|
135
|
-
|
133
|
+
Installs the gems specified in the bundle to the system's
|
134
|
+
Rubygems location. This overrides any previous configuration of
|
135
|
+
--path.
|
136
136
|
|
137
137
|
--trust-policy=[<policy>]
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
138
|
+
Apply the Rubygems security policy policy, where policy is one
|
139
|
+
of HighSecurity, MediumSecurity, LowSecurity, AlmostNoSecurity,
|
140
|
+
or NoSecurity. For more details, please see the Rubygems signing
|
141
|
+
documentation linked below in SEE ALSO.
|
142
142
|
|
143
143
|
--with=<list>
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
144
|
+
A space-separated list of groups referencing gems to install. If
|
145
|
+
an optional group is given it is installed. If a group is given
|
146
|
+
that is in the remembered list of groups given to --without, it
|
147
|
+
is removed from that list.
|
148
148
|
|
149
149
|
--without=<list>
|
150
|
-
|
151
|
-
|
152
|
-
|
150
|
+
A space-separated list of groups referencing gems to skip during
|
151
|
+
installation. If a group is given that is in the remembered list
|
152
|
+
of groups given to --with, it is removed from that list.
|
153
153
|
|
154
154
|
DEPLOYMENT MODE
|
155
155
|
Bundler's defaults are optimized for development. To switch to defaults
|
@@ -159,36 +159,36 @@ DEPLOYMENT MODE
|
|
159
159
|
|
160
160
|
1. A Gemfile.lock is required.
|
161
161
|
|
162
|
-
|
163
|
-
|
164
|
-
|
162
|
+
To ensure that the same versions of the gems you developed with and
|
163
|
+
tested with are also used in deployments, a Gemfile.lock is
|
164
|
+
required.
|
165
165
|
|
166
|
-
|
167
|
-
|
166
|
+
This is mainly to ensure that you remember to check your
|
167
|
+
Gemfile.lock into version control.
|
168
168
|
|
169
169
|
2. The Gemfile.lock must be up to date
|
170
170
|
|
171
|
-
|
172
|
-
|
171
|
+
In development, you can modify your Gemfile(5) and re-run bundle
|
172
|
+
install to conservatively update your Gemfile.lock snapshot.
|
173
173
|
|
174
|
-
|
175
|
-
|
174
|
+
In deployment, your Gemfile.lock should be up-to-date with changes
|
175
|
+
made in your Gemfile(5).
|
176
176
|
|
177
|
-
3. Gems
|
178
|
-
|
177
|
+
3. Gems are installed to vendor/bundle not your default system
|
178
|
+
location
|
179
179
|
|
180
|
-
|
181
|
-
|
182
|
-
|
180
|
+
In development, it's convenient to share the gems used in your
|
181
|
+
application with other applications and other scripts that run on
|
182
|
+
the system.
|
183
183
|
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
184
|
+
In deployment, isolation is a more important default. In addition,
|
185
|
+
the user deploying the application may not have permission to
|
186
|
+
install gems to the system, or the web server may not have
|
187
|
+
permission to read them.
|
188
188
|
|
189
|
-
|
190
|
-
|
191
|
-
|
189
|
+
As a result, bundle install --deployment installs gems to the
|
190
|
+
vendor/bundle directory in the application. This may be overridden
|
191
|
+
using the --path option.
|
192
192
|
|
193
193
|
|
194
194
|
|
@@ -197,7 +197,7 @@ SUDO USAGE
|
|
197
197
|
|
198
198
|
In some cases, that location may not be writable by your Unix user. In
|
199
199
|
that case, Bundler will stage everything in a temporary directory, then
|
200
|
-
ask you for your sudo password in order to copy
|
200
|
+
ask you for your sudo password in order to copy the gems into their
|
201
201
|
system location.
|
202
202
|
|
203
203
|
From your perspective, this is identical to installing the gems
|
@@ -216,8 +216,8 @@ SUDO USAGE
|
|
216
216
|
|
217
217
|
Of these three, the first two could theoretically be performed by
|
218
218
|
chowning the resulting files to $SUDO_USER. The third, however, can
|
219
|
-
only be performed by
|
220
|
-
Therefore, git gems are downloaded and installed into ~/.bundle
|
219
|
+
only be performed by invoking the git command as the current user.
|
220
|
+
Therefore, git gems are downloaded and installed into ~/.bundle rather
|
221
221
|
than $GEM_HOME or $BUNDLE_PATH.
|
222
222
|
|
223
223
|
As a result, you should run bundle install as the current user, and
|
@@ -232,9 +232,9 @@ INSTALLING GROUPS
|
|
232
232
|
groups with the --without option. This option takes a space-separated
|
233
233
|
list of groups.
|
234
234
|
|
235
|
-
While the --without
|
236
|
-
|
237
|
-
the dependencies of every gem in your Gemfile(5).
|
235
|
+
While the --without option will skip installing the gems in the
|
236
|
+
specified groups, it will still download those gems and use them to
|
237
|
+
resolve the dependencies of every gem in your Gemfile(5).
|
238
238
|
|
239
239
|
This is so that installing a different set of groups on another machine
|
240
240
|
(such as a production server) will not change the gems and versions
|
@@ -244,24 +244,24 @@ INSTALLING GROUPS
|
|
244
244
|
running in development and testing is also the third-party code you are
|
245
245
|
running in production. You can choose to exclude some of that code in
|
246
246
|
different environments, but you will never be caught flat-footed by
|
247
|
-
different
|
248
|
-
|
247
|
+
different versions of third-party code being used in different
|
248
|
+
environments.
|
249
249
|
|
250
250
|
For a simple illustration, consider the following Gemfile(5):
|
251
251
|
|
252
252
|
|
253
253
|
|
254
|
-
|
254
|
+
source 'https://rubygems.org'
|
255
255
|
|
256
|
-
|
256
|
+
gem 'sinatra'
|
257
257
|
|
258
|
-
|
259
|
-
|
260
|
-
|
258
|
+
group :production do
|
259
|
+
gem 'rack-perftools-profiler'
|
260
|
+
end
|
261
261
|
|
262
262
|
|
263
263
|
|
264
|
-
In this case,
|
264
|
+
In this case, sinatra depends on any version of Rack (>= 1.0), while
|
265
265
|
rack-perftools-profiler depends on 1.x (~> 1.0).
|
266
266
|
|
267
267
|
When you run bundle install --without production in development, we
|
@@ -271,14 +271,14 @@ INSTALLING GROUPS
|
|
271
271
|
when the production group is used.
|
272
272
|
|
273
273
|
This should not cause any problems in practice, because we do not
|
274
|
-
attempt
|
274
|
+
attempt to install the gems in the excluded groups, and only evaluate
|
275
275
|
as part of the dependency resolution process.
|
276
276
|
|
277
277
|
This also means that you cannot include different versions of the same
|
278
|
-
gem in
|
278
|
+
gem in different groups, because doing so would result in different
|
279
279
|
sets of dependencies used in development and production. Because of the
|
280
280
|
vagaries of the dependency resolution process, this usually affects
|
281
|
-
more than the gems you list in your Gemfile(5), and can
|
281
|
+
more than the gems you list in your Gemfile(5), and can (surprisingly)
|
282
282
|
radically change the gems you are using.
|
283
283
|
|
284
284
|
THE GEMFILE.LOCK
|
@@ -287,12 +287,12 @@ THE GEMFILE.LOCK
|
|
287
287
|
specified in the Gemfile(5)) into a file called Gemfile.lock.
|
288
288
|
|
289
289
|
Bundler uses this file in all subsequent calls to bundle install, which
|
290
|
-
guarantees that you always use
|
291
|
-
|
290
|
+
guarantees that you always use the same exact code, even as your
|
291
|
+
application moves across machines.
|
292
292
|
|
293
|
-
Because
|
293
|
+
Because of the way dependency resolution works, even a seemingly small
|
294
294
|
change (for instance, an update to a point-release of a dependency of a
|
295
|
-
gem in
|
295
|
+
gem in your Gemfile(5)) can result in radically different gems being
|
296
296
|
needed to satisfy all dependencies.
|
297
297
|
|
298
298
|
As a result, you SHOULD check your Gemfile.lock into version control,
|
@@ -302,15 +302,15 @@ THE GEMFILE.LOCK
|
|
302
302
|
third-party code being used if any of the gems in the Gemfile(5) or any
|
303
303
|
of their dependencies have been updated.
|
304
304
|
|
305
|
-
When Bundler
|
306
|
-
|
307
|
-
clear
|
308
|
-
new
|
309
|
-
unaware
|
310
|
-
towards
|
311
|
-
|
312
|
-
our guidance for gem authors to now recommend checking
|
313
|
-
gems.
|
305
|
+
When Bundler first shipped, the Gemfile.lock was included in the
|
306
|
+
.gitignore file included with generated gems. Over time, however, it
|
307
|
+
became clear that this practice forces the pain of broken dependencies
|
308
|
+
onto new contributors, while leaving existing contributors potentially
|
309
|
+
unaware of the problem. Since bundle install is usually the first step
|
310
|
+
towards a contribution, the pain of broken dependencies would
|
311
|
+
discourage new contributors from contributing. As a result, we have
|
312
|
+
revised our guidance for gem authors to now recommend checking in the
|
313
|
+
lock for gems.
|
314
314
|
|
315
315
|
CONSERVATIVE UPDATING
|
316
316
|
When you make a change to the Gemfile(5) and then run bundle install,
|
@@ -324,19 +324,19 @@ CONSERVATIVE UPDATING
|
|
324
324
|
|
325
325
|
|
326
326
|
|
327
|
-
|
327
|
+
source 'https://rubygems.org'
|
328
328
|
|
329
|
-
|
330
|
-
|
329
|
+
gem 'actionpack', '2.3.8'
|
330
|
+
gem 'activemerchant'
|
331
331
|
|
332
332
|
|
333
333
|
|
334
|
-
In
|
335
|
-
|
336
|
-
1.1.0, while the activemerchant gem depends on activesupport >=
|
337
|
-
braintree >= 2.0.0, and builder >= 2.0.0.
|
334
|
+
In this case, both actionpack and activemerchant depend on
|
335
|
+
activesupport. The actionpack gem depends on activesupport 2.3.8 and
|
336
|
+
rack ~> 1.1.0, while the activemerchant gem depends on activesupport >=
|
337
|
+
2.3.2, braintree >= 2.0.0, and builder >= 2.0.0.
|
338
338
|
|
339
|
-
When the dependencies are first resolved, Bundler will
|
339
|
+
When the dependencies are first resolved, Bundler will select
|
340
340
|
activesupport 2.3.8, which satisfies the requirements of both gems in
|
341
341
|
your Gemfile(5).
|
342
342
|
|
@@ -344,52 +344,52 @@ CONSERVATIVE UPDATING
|
|
344
344
|
|
345
345
|
|
346
346
|
|
347
|
-
|
347
|
+
source 'https://rubygems.org'
|
348
348
|
|
349
|
-
|
350
|
-
|
349
|
+
gem 'actionpack', '3.0.0.rc'
|
350
|
+
gem 'activemerchant'
|
351
351
|
|
352
352
|
|
353
353
|
|
354
|
-
The actionpack
|
355
|
-
updates the
|
356
|
-
|
354
|
+
The actionpack 3.0.0.rc gem has a number of new dependencies, and
|
355
|
+
updates the activesupport dependency to = 3.0.0.rc and the rack
|
356
|
+
dependency to ~> 1.2.1.
|
357
357
|
|
358
358
|
When you run bundle install, Bundler notices that you changed the
|
359
359
|
actionpack gem, but not the activemerchant gem. It evaluates the gems
|
360
360
|
currently being used to satisfy its requirements:
|
361
361
|
|
362
362
|
activesupport 2.3.8
|
363
|
-
|
364
|
-
|
363
|
+
also used to satisfy a dependency in activemerchant, which is
|
364
|
+
not being updated
|
365
365
|
|
366
366
|
rack ~> 1.1.0
|
367
|
-
|
367
|
+
not currently being used to satisfy another dependency
|
368
368
|
|
369
369
|
Because you did not explicitly ask to update activemerchant, you would
|
370
|
-
not expect
|
371
|
-
|
372
|
-
|
370
|
+
not expect it to suddenly stop working after updating actionpack.
|
371
|
+
However, satisfying the new activesupport 3.0.0.rc dependency of
|
372
|
+
actionpack requires updating one of its dependencies.
|
373
373
|
|
374
|
-
Even though
|
375
|
-
|
376
|
-
Gemfile(5) that have not changed as an atomic unit together with
|
377
|
-
dependencies. In this
|
378
|
-
activemerchant 1.7.1 + activesupport
|
379
|
-
report that it cannot update actionpack.
|
374
|
+
Even though activemerchant declares a very loose dependency that
|
375
|
+
theoretically matches activesupport 3.0.0.rc, Bundler treats gems in
|
376
|
+
your Gemfile(5) that have not changed as an atomic unit together with
|
377
|
+
their dependencies. In this case, the activemerchant dependency is
|
378
|
+
treated as activemerchant 1.7.1 + activesupport 2.3.8, so bundle
|
379
|
+
install will report that it cannot update actionpack.
|
380
380
|
|
381
381
|
To explicitly update actionpack, including its dependencies which other
|
382
382
|
gems in the Gemfile(5) still depend on, run bundle update actionpack
|
383
383
|
(see bundle update(1)).
|
384
384
|
|
385
|
-
Summary: In general, after making a change to the Gemfile(5)
|
385
|
+
Summary: In general, after making a change to the Gemfile(5) , you
|
386
386
|
should first try to run bundle install, which will guarantee that no
|
387
387
|
other gem in the Gemfile(5) is impacted by the change. If that does not
|
388
388
|
work, run bundle update(1) bundle-update.1.html.
|
389
389
|
|
390
390
|
SEE ALSO
|
391
|
-
o Gem
|
392
|
-
|
391
|
+
o Gem install docs
|
392
|
+
http://guides.rubygems.org/rubygems-basics/#installing-gems
|
393
393
|
|
394
394
|
o Rubygems signing docs http://guides.rubygems.org/security/
|
395
395
|
|
@@ -398,4 +398,4 @@ SEE ALSO
|
|
398
398
|
|
399
399
|
|
400
400
|
|
401
|
-
|
401
|
+
July 2020 BUNDLE-INSTALL(1)
|