bundler 1.16.0 → 1.16.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 +5 -5
- data/CHANGELOG.md +13 -0
- data/bundler.gemspec +57 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli/gem.rb +1 -1
- data/lib/bundler/cli/init.rb +1 -5
- data/lib/bundler/cli/update.rb +3 -1
- data/lib/bundler/definition.rb +1 -1
- data/lib/bundler/resolver.rb +4 -1
- data/lib/bundler/source/rubygems.rb +2 -4
- data/lib/bundler/templates/.document +1 -0
- data/lib/bundler/templates/Executable +11 -3
- data/lib/bundler/templates/newgem/{.travis.yml.tt → travis.yml.tt} +0 -0
- data/lib/bundler/version.rb +1 -1
- data/man/bundle-add.1 +1 -1
- data/man/bundle-add.1.txt +11 -11
- data/man/bundle-binstubs.1.txt +19 -19
- data/man/bundle-check.1 +1 -1
- data/man/bundle-check.1.txt +15 -15
- data/man/bundle-clean.1 +1 -1
- data/man/bundle-clean.1.txt +10 -10
- data/man/bundle-config.1 +1 -1
- data/man/bundle-config.1.txt +194 -194
- data/man/bundle-exec.1 +1 -1
- data/man/bundle-exec.1.txt +62 -62
- data/man/bundle-gem.1 +1 -1
- data/man/bundle-gem.1.txt +38 -38
- data/man/bundle-info.1 +1 -1
- data/man/bundle-info.1.txt +8 -8
- data/man/bundle-init.1 +1 -1
- data/man/bundle-init.1.txt +12 -12
- data/man/bundle-inject.1 +1 -1
- data/man/bundle-inject.1.txt +9 -9
- data/man/bundle-install.1 +1 -1
- data/man/bundle-install.1.txt +165 -165
- data/man/bundle-list.1 +1 -1
- data/man/bundle-list.1.txt +8 -8
- data/man/bundle-lock.1 +1 -1
- data/man/bundle-lock.1.txt +46 -46
- data/man/bundle-open.1 +1 -1
- data/man/bundle-open.1.txt +7 -7
- data/man/bundle-outdated.1 +1 -1
- data/man/bundle-outdated.1.txt +33 -33
- data/man/bundle-package.1 +1 -1
- data/man/bundle-package.1.txt +35 -35
- data/man/bundle-platform.1 +1 -1
- data/man/bundle-platform.1.txt +13 -13
- data/man/bundle-pristine.1 +1 -1
- data/man/bundle-pristine.1.txt +19 -19
- data/man/bundle-show.1 +1 -1
- data/man/bundle-show.1.txt +11 -11
- data/man/bundle-update.1 +1 -1
- data/man/bundle-update.1.txt +98 -98
- data/man/bundle-viz.1 +1 -1
- data/man/bundle-viz.1.txt +16 -16
- data/man/bundle.1 +1 -1
- data/man/bundle.1.txt +50 -50
- data/man/gemfile.5 +1 -1
- data/man/gemfile.5.txt +200 -200
- metadata +5 -3
data/man/bundle-viz.1
CHANGED
data/man/bundle-viz.1.txt
CHANGED
@@ -2,37 +2,37 @@ BUNDLE-VIZ(1) BUNDLE-VIZ(1)
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
NAME
|
6
|
+
bundle-viz - Generates a visual dependency graph for your Gemfile
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
SYNOPSIS
|
9
|
+
bundle viz [--file=FILE] [--format=FORMAT] [--requirements] [--version]
|
10
10
|
[--without=GROUP GROUP]
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
graph.
|
12
|
+
DESCRIPTION
|
13
|
+
viz generates a PNG file of the current Gemfile(5) as a dependency
|
14
|
+
graph. viz requires the ruby-graphviz gem (and its dependencies).
|
15
15
|
|
16
|
-
The associated gems must also be installed via
|
16
|
+
The associated gems must also be installed via bundle install(1).
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
The name to use for the generated file. See
|
18
|
+
OPTIONS
|
19
|
+
--file, -f
|
20
|
+
The name to use for the generated file. See --format option
|
21
21
|
|
22
|
-
|
22
|
+
--format, -F
|
23
23
|
This is output format option. Supported format is png, jpg, svg,
|
24
24
|
dot ...
|
25
25
|
|
26
|
-
|
26
|
+
--requirements, -R
|
27
27
|
Set to show the version of each required dependency.
|
28
28
|
|
29
|
-
|
29
|
+
--version, -v
|
30
30
|
Set to show each gem version.
|
31
31
|
|
32
|
-
|
32
|
+
--without, -W
|
33
33
|
Exclude gems that are part of the specified named group.
|
34
34
|
|
35
35
|
|
36
36
|
|
37
37
|
|
38
|
-
|
38
|
+
July 2017 BUNDLE-VIZ(1)
|
data/man/bundle.1
CHANGED
data/man/bundle.1.txt
CHANGED
@@ -2,112 +2,112 @@ BUNDLE(1) BUNDLE(1)
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
NAME
|
6
|
+
bundle - Ruby Dependency Management
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
SYNOPSIS
|
9
|
+
bundle COMMAND [--no-color] [--verbose] [ARGS]
|
10
10
|
|
11
|
-
|
12
|
-
Bundler manages an
|
11
|
+
DESCRIPTION
|
12
|
+
Bundler manages an application's dependencies through its entire life
|
13
13
|
across many machines systematically and repeatably.
|
14
14
|
|
15
|
-
See the bundler website
|
16
|
-
started, and Gemfile(5) for more information on the
|
15
|
+
See the bundler website http://bundler.io for information on getting
|
16
|
+
started, and Gemfile(5) for more information on the Gemfile format.
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
OPTIONS
|
19
|
+
--no-color
|
20
20
|
Print all output without color
|
21
21
|
|
22
|
-
|
22
|
+
--retry, -r
|
23
23
|
Specify the number of times you wish to attempt network commands
|
24
24
|
|
25
|
-
|
25
|
+
--verbose, -V
|
26
26
|
Print out additional logging information
|
27
27
|
|
28
|
-
|
29
|
-
We divide
|
28
|
+
BUNDLE COMMANDS
|
29
|
+
We divide bundle subcommands into primary commands and utilities.
|
30
30
|
|
31
|
-
|
32
|
-
[
|
33
|
-
Install the gems specified by the
|
31
|
+
PRIMARY COMMANDS
|
32
|
+
[bundle install(1)][bundle-install]
|
33
|
+
Install the gems specified by the Gemfile or Gemfile.lock
|
34
34
|
|
35
|
-
[
|
35
|
+
[bundle update(1)][bundle-update]
|
36
36
|
Update dependencies to their latest versions
|
37
37
|
|
38
|
-
[
|
39
|
-
Package
|
40
|
-
|
38
|
+
[bundle package(1)][bundle-package]
|
39
|
+
Package the .gem files required by your application into the
|
40
|
+
vendor/cache directory
|
41
41
|
|
42
|
-
[
|
42
|
+
[bundle exec(1)][bundle-exec]
|
43
43
|
Execute a script in the context of the current bundle
|
44
44
|
|
45
|
-
[
|
45
|
+
[bundle config(1)][bundle-config]
|
46
46
|
Specify and read configuration options for bundler
|
47
47
|
|
48
|
-
|
48
|
+
bundle help(1)
|
49
49
|
Display detailed help for each subcommand
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
Add the named gem to the Gemfile and run
|
51
|
+
UTILITIES
|
52
|
+
bundle add(1)
|
53
|
+
Add the named gem to the Gemfile and run bundle install
|
54
54
|
|
55
|
-
|
55
|
+
bundle binstubs(1)
|
56
56
|
Generate binstubs for executables in a gem
|
57
57
|
|
58
|
-
|
59
|
-
Determine
|
58
|
+
bundle check(1)
|
59
|
+
Determine whether the requirements for your application are
|
60
60
|
installed and available to bundler
|
61
61
|
|
62
|
-
|
62
|
+
bundle show(1)
|
63
63
|
Show the source location of a particular gem in the bundle
|
64
64
|
|
65
|
-
[
|
65
|
+
[bundle outdated(1)][bundle-outdated]
|
66
66
|
Show all of the outdated gems in the current bundle
|
67
67
|
|
68
|
-
|
68
|
+
bundle console(1)
|
69
69
|
Start an IRB session in the context of the current bundle
|
70
70
|
|
71
|
-
|
71
|
+
bundle open(1)
|
72
72
|
Open an installed gem in the editor
|
73
73
|
|
74
|
-
[
|
74
|
+
[bundle lock(1)][bundle-lock]
|
75
75
|
Generate a lockfile for your dependencies
|
76
76
|
|
77
|
-
|
77
|
+
bundle viz(1)
|
78
78
|
Generate a visual representation of your dependencies
|
79
79
|
|
80
|
-
|
81
|
-
Generate a simple
|
80
|
+
bundle init(1)
|
81
|
+
Generate a simple Gemfile, placed in the current directory
|
82
82
|
|
83
|
-
[
|
83
|
+
[bundle gem(1)][bundle-gem]
|
84
84
|
Create a simple gem, suitable for development with bundler
|
85
85
|
|
86
|
-
[
|
86
|
+
[bundle platform(1)][bundle-platform]
|
87
87
|
Display platform compatibility information
|
88
88
|
|
89
|
-
|
89
|
+
bundle clean(1)
|
90
90
|
Clean up unused gems in your bundler directory
|
91
91
|
|
92
|
-
|
92
|
+
bundle doctor(1)
|
93
93
|
Display warnings about common potential problems
|
94
94
|
|
95
|
-
|
96
|
-
When
|
97
|
-
TIES,
|
98
|
-
|
95
|
+
PLUGINS
|
96
|
+
When running a command that isn't listed in PRIMARY COMMANDS or UTILI-
|
97
|
+
TIES, Bundler will try to find an executable on your path named
|
98
|
+
bundler-<command> and execute it, passing down any extra arguments to
|
99
99
|
it.
|
100
100
|
|
101
|
-
|
101
|
+
OBSOLETE
|
102
102
|
These commands are obsolete and should no longer be used
|
103
103
|
|
104
|
-
o
|
104
|
+
o bundle cache(1)
|
105
105
|
|
106
|
-
o
|
106
|
+
o bundle show(1)
|
107
107
|
|
108
108
|
|
109
109
|
|
110
110
|
|
111
111
|
|
112
112
|
|
113
|
-
|
113
|
+
July 2017 BUNDLE(1)
|
data/man/gemfile.5
CHANGED
data/man/gemfile.5.txt
CHANGED
@@ -2,24 +2,24 @@ GEMFILE(5) GEMFILE(5)
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
NAME
|
6
|
+
Gemfile - A format for describing gem dependencies for Ruby programs
|
7
7
|
|
8
|
-
|
9
|
-
A
|
8
|
+
SYNOPSIS
|
9
|
+
A Gemfile describes the gem dependencies required to execute associated
|
10
10
|
Ruby code.
|
11
11
|
|
12
|
-
Place the
|
13
|
-
ated code. For instance, in a Rails application, place the
|
14
|
-
the same directory as the
|
12
|
+
Place the Gemfile in the root of the directory containing the associ-
|
13
|
+
ated code. For instance, in a Rails application, place the Gemfile in
|
14
|
+
the same directory as the Rakefile.
|
15
15
|
|
16
|
-
|
17
|
-
A
|
16
|
+
SYNTAX
|
17
|
+
A Gemfile is evaluated as Ruby code, in a context which makes available
|
18
18
|
a number of methods used to describe the gem requirements.
|
19
19
|
|
20
|
-
|
21
|
-
At the top of the
|
22
|
-
tains the gems listed in the
|
20
|
+
GLOBAL SOURCES
|
21
|
+
At the top of the Gemfile, add a line for the Rubygems source that con-
|
22
|
+
tains the gems listed in the Gemfile.
|
23
23
|
|
24
24
|
|
25
25
|
|
@@ -28,18 +28,18 @@ GEMFILE(5) GEMFILE(5)
|
|
28
28
|
|
29
29
|
|
30
30
|
It is possible, but not recommended as of Bundler 1.7, to add multiple
|
31
|
-
global
|
31
|
+
global source lines. Each of these sources MUST be a valid Rubygems
|
32
32
|
repository.
|
33
33
|
|
34
34
|
Sources are checked for gems following the heuristics described in
|
35
|
-
|
35
|
+
SOURCE PRIORITY. If a gem is found in more than one global source,
|
36
36
|
Bundler will print a warning after installing the gem indicating which
|
37
37
|
source was used, and listing the other sources where the gem is avail-
|
38
38
|
able. A specific source can be selected for gems that need to use a
|
39
|
-
non-standard repository, suppressing this warning, by using the
|
40
|
-
option or a
|
39
|
+
non-standard repository, suppressing this warning, by using the :source
|
40
|
+
option or a source block.
|
41
41
|
|
42
|
-
|
42
|
+
CREDENTIALS
|
43
43
|
Some gem sources require a username and password. Use [bundle con-
|
44
44
|
fig(1)][bundle-config] to set the username and password for any of the
|
45
45
|
sources that need it. The command must be run once on each computer
|
@@ -62,14 +62,14 @@ GEMFILE(5) GEMFILE(5)
|
|
62
62
|
|
63
63
|
|
64
64
|
Credentials in the source URL will take precedence over credentials set
|
65
|
-
using
|
65
|
+
using config.
|
66
66
|
|
67
|
-
|
67
|
+
RUBY
|
68
68
|
If your application requires a specific Ruby version or engine, specify
|
69
|
-
your requirements using the
|
70
|
-
All parameters are
|
69
|
+
your requirements using the ruby method, with the following arguments.
|
70
|
+
All parameters are OPTIONAL unless otherwise specified.
|
71
71
|
|
72
|
-
|
72
|
+
VERSION (required)
|
73
73
|
The version of Ruby that your application requires. If your application
|
74
74
|
requires an alternate Ruby engine, such as JRuby or Rubinius, this
|
75
75
|
should be the Ruby version that the engine is compatible with.
|
@@ -80,32 +80,32 @@ GEMFILE(5) GEMFILE(5)
|
|
80
80
|
|
81
81
|
|
82
82
|
|
83
|
-
|
84
|
-
Each application
|
85
|
-
an engine version
|
83
|
+
ENGINE
|
84
|
+
Each application may specify a Ruby engine. If an engine is specified,
|
85
|
+
an engine version must also be specified.
|
86
86
|
|
87
87
|
What exactly is an Engine? - A Ruby engine is an implementation of the
|
88
88
|
Ruby language.
|
89
89
|
|
90
90
|
o For background: the reference or original implementation of the
|
91
91
|
Ruby programming language is called Matz's Ruby Interpreter
|
92
|
-
|
92
|
+
https://en.wikipedia.org/wiki/Ruby_MRI, or MRI for short. This is
|
93
93
|
named after Ruby creator Yukihiro Matsumoto, also known as Matz.
|
94
94
|
MRI is also known as CRuby, because it is written in C. MRI is the
|
95
95
|
most widely used Ruby engine.
|
96
96
|
|
97
|
-
o Other implementations
|
97
|
+
o Other implementations https://www.ruby-lang.org/en/about/ of Ruby
|
98
98
|
exist. Some of the more well-known implementations include Rubinius
|
99
|
-
|
99
|
+
https://rubinius.com/, and JRuby http://jruby.org/. Rubinius is an
|
100
100
|
alternative implementation of Ruby written in Ruby. JRuby is an
|
101
|
-
implementation
|
101
|
+
implementation of Ruby on the JVM, short for Java Virtual Machine.
|
102
102
|
|
103
103
|
|
104
104
|
|
105
|
-
|
106
|
-
Each
|
107
|
-
sion
|
108
|
-
"ruby" the engine version specified
|
105
|
+
ENGINE VERSION
|
106
|
+
Each application may specify a Ruby engine version. If an engine ver-
|
107
|
+
sion is specified, an engine must also be specified. If the engine is
|
108
|
+
"ruby" the engine version specified must match the Ruby version.
|
109
109
|
|
110
110
|
|
111
111
|
|
@@ -113,8 +113,8 @@ GEMFILE(5) GEMFILE(5)
|
|
113
113
|
|
114
114
|
|
115
115
|
|
116
|
-
|
117
|
-
Each application
|
116
|
+
PATCHLEVEL
|
117
|
+
Each application may specify a Ruby patchlevel.
|
118
118
|
|
119
119
|
|
120
120
|
|
@@ -122,12 +122,12 @@ GEMFILE(5) GEMFILE(5)
|
|
122
122
|
|
123
123
|
|
124
124
|
|
125
|
-
|
126
|
-
Specify gem requirements using the
|
127
|
-
ments. All parameters are
|
125
|
+
GEMS
|
126
|
+
Specify gem requirements using the gem method, with the following argu-
|
127
|
+
ments. All parameters are OPTIONAL unless otherwise specified.
|
128
128
|
|
129
|
-
|
130
|
-
For each gem requirement, list a single
|
129
|
+
NAME (required)
|
130
|
+
For each gem requirement, list a single gem line.
|
131
131
|
|
132
132
|
|
133
133
|
|
@@ -135,8 +135,8 @@ GEMFILE(5) GEMFILE(5)
|
|
135
135
|
|
136
136
|
|
137
137
|
|
138
|
-
|
139
|
-
Each
|
138
|
+
VERSION
|
139
|
+
Each gem MAY have one or more version specifiers.
|
140
140
|
|
141
141
|
|
142
142
|
|
@@ -145,10 +145,10 @@ GEMFILE(5) GEMFILE(5)
|
|
145
145
|
|
146
146
|
|
147
147
|
|
148
|
-
|
149
|
-
Each
|
150
|
-
|
151
|
-
file
|
148
|
+
REQUIRE AS
|
149
|
+
Each gem MAY specify files that should be used when autorequiring via
|
150
|
+
Bundler.require. You may pass an array with multiple files or true if
|
151
|
+
file you want required has same name as gem or false to prevent any
|
152
152
|
file from being autorequired.
|
153
153
|
|
154
154
|
|
@@ -159,7 +159,7 @@ GEMFILE(5) GEMFILE(5)
|
|
159
159
|
|
160
160
|
|
161
161
|
|
162
|
-
The
|
162
|
+
The argument defaults to the name of the gem. For example, these are
|
163
163
|
identical:
|
164
164
|
|
165
165
|
|
@@ -170,9 +170,9 @@ GEMFILE(5) GEMFILE(5)
|
|
170
170
|
|
171
171
|
|
172
172
|
|
173
|
-
|
174
|
-
Each
|
175
|
-
does
|
173
|
+
GROUPS
|
174
|
+
Each gem MAY specify membership in one or more groups. Any gem that
|
175
|
+
does not specify membership in any group is placed in the default
|
176
176
|
group.
|
177
177
|
|
178
178
|
|
@@ -182,8 +182,8 @@ GEMFILE(5) GEMFILE(5)
|
|
182
182
|
|
183
183
|
|
184
184
|
|
185
|
-
The
|
186
|
-
|
185
|
+
The Bundler runtime allows its two main methods, Bundler.setup and
|
186
|
+
Bundler.require, to limit their impact to particular groups.
|
187
187
|
|
188
188
|
|
189
189
|
|
@@ -202,9 +202,9 @@ GEMFILE(5) GEMFILE(5)
|
|
202
202
|
|
203
203
|
|
204
204
|
|
205
|
-
The
|
206
|
-
|
207
|
-
multiple
|
205
|
+
The Bundler CLI allows you to specify a list of groups whose gems bun-
|
206
|
+
dle install should not install with the --without option. To specify
|
207
|
+
multiple groups to ignore, specify a list of groups separated by spa-
|
208
208
|
ces.
|
209
209
|
|
210
210
|
|
@@ -214,46 +214,46 @@ GEMFILE(5) GEMFILE(5)
|
|
214
214
|
|
215
215
|
|
216
216
|
|
217
|
-
After running
|
217
|
+
After running bundle install --without test, bundler will remember that
|
218
218
|
you excluded the test group in the last installation. The next time you
|
219
|
-
run
|
219
|
+
run bundle install, without any --without option, bundler will recall
|
220
220
|
it.
|
221
221
|
|
222
|
-
Also,
|
223
|
-
|
224
|
-
via
|
222
|
+
Also, calling Bundler.setup with no parameters, or calling require
|
223
|
+
"bundler/setup" will setup all groups except for the ones you excluded
|
224
|
+
via --without (since they are not available).
|
225
225
|
|
226
|
-
Note
|
227
|
-
in
|
228
|
-
and
|
229
|
-
sions
|
230
|
-
Understanding Bundler
|
226
|
+
Note that on bundle install, bundler downloads and evaluates all gems,
|
227
|
+
in order to create a single canonical list of all of the required gems
|
228
|
+
and their dependencies. This means that you cannot list different ver-
|
229
|
+
sions of the same gems in different groups. For more details, see
|
230
|
+
Understanding Bundler http://bundler.io/rationale.html.
|
231
231
|
|
232
|
-
|
233
|
-
If
|
234
|
-
forms,
|
235
|
-
groups,
|
232
|
+
PLATFORMS
|
233
|
+
If a gem should only be used in a particular platform or set of plat-
|
234
|
+
forms, you can specify them. Platforms are essentially identical to
|
235
|
+
groups, except that you do not need to use the --without install-time
|
236
236
|
flag to exclude groups of gems for other platforms.
|
237
237
|
|
238
|
-
There are a number of
|
238
|
+
There are a number of Gemfile platforms:
|
239
239
|
|
240
|
-
|
240
|
+
ruby C Ruby (MRI) or Rubinius, but NOT Windows
|
241
241
|
|
242
|
-
|
242
|
+
mri Same as ruby, but not Rubinius
|
243
243
|
|
244
|
-
|
244
|
+
mingw Windows 32 bit 'mingw32' platform (aka RubyInstaller)
|
245
245
|
|
246
|
-
|
246
|
+
x64_mingw
|
247
247
|
Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
|
248
248
|
|
249
|
-
|
249
|
+
rbx Same as ruby, but only Rubinius (not MRI)
|
250
250
|
|
251
|
-
|
251
|
+
jruby JRuby
|
252
252
|
|
253
|
-
|
253
|
+
mswin Windows
|
254
254
|
|
255
|
-
You
|
256
|
-
|
255
|
+
You can restrict further by platform and version for all platforms
|
256
|
+
except for rbx, jruby, and mswin.
|
257
257
|
|
258
258
|
To specify a version in addition to a platform, append the version num-
|
259
259
|
ber without the delimiter to the platform. For example, to specify that
|
@@ -267,13 +267,13 @@ GEMFILE(5) GEMFILE(5)
|
|
267
267
|
|
268
268
|
The full list of platforms and supported versions includes:
|
269
269
|
|
270
|
-
|
270
|
+
ruby 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
271
271
|
|
272
|
-
|
272
|
+
mri 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
273
273
|
|
274
|
-
|
274
|
+
mingw 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
275
275
|
|
276
|
-
|
276
|
+
x64_mingw
|
277
277
|
2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
278
278
|
|
279
279
|
As with groups, you can specify one or more platforms:
|
@@ -286,12 +286,12 @@ GEMFILE(5) GEMFILE(5)
|
|
286
286
|
|
287
287
|
|
288
288
|
|
289
|
-
All
|
290
|
-
|
289
|
+
All operations involving groups (bundle install, Bundler.setup,
|
290
|
+
Bundler.require) behave exactly the same as if any groups not matching
|
291
291
|
the current platform were explicitly excluded.
|
292
292
|
|
293
|
-
|
294
|
-
You
|
293
|
+
SOURCE
|
294
|
+
You can select an alternate Rubygems repository for a gem using the
|
295
295
|
':source' option.
|
296
296
|
|
297
297
|
|
@@ -300,54 +300,54 @@ GEMFILE(5) GEMFILE(5)
|
|
300
300
|
|
301
301
|
|
302
302
|
|
303
|
-
This
|
304
|
-
global
|
303
|
+
This forces the gem to be loaded from this source and ignores any
|
304
|
+
global sources declared at the top level of the file. If the gem does
|
305
305
|
not exist in this source, it will not be installed.
|
306
306
|
|
307
307
|
Bundler will search for child dependencies of this gem by first looking
|
308
308
|
in the source selected for the parent, but if they are not found there,
|
309
|
-
it
|
310
|
-
|
309
|
+
it will fall back on global sources using the ordering described in
|
310
|
+
SOURCE PRIORITY.
|
311
311
|
|
312
|
-
Selecting
|
313
|
-
ambiguous gem warning described above in
|
312
|
+
Selecting a specific source repository this way also suppresses the
|
313
|
+
ambiguous gem warning described above in GLOBAL SOURCES (#source).
|
314
314
|
|
315
|
-
|
315
|
+
GIT
|
316
316
|
If necessary, you can specify that a gem is located at a particular git
|
317
|
-
repository using the
|
317
|
+
repository using the :git parameter. The repository can be accessed via
|
318
318
|
several protocols:
|
319
319
|
|
320
|
-
|
320
|
+
HTTP(S)
|
321
321
|
gem "rails", :git => "https://github.com/rails/rails.git"
|
322
322
|
|
323
|
-
|
323
|
+
SSH gem "rails", :git => "git@github.com:rails/rails.git"
|
324
324
|
|
325
|
-
|
325
|
+
git gem "rails", :git => "git://github.com/rails/rails.git"
|
326
326
|
|
327
|
-
If using SSH, the user that you use to run
|
328
|
-
appropriate keys available in their
|
327
|
+
If using SSH, the user that you use to run bundle install MUST have the
|
328
|
+
appropriate keys available in their $HOME/.ssh.
|
329
329
|
|
330
|
-
|
331
|
-
These
|
332
|
-
can
|
330
|
+
NOTE: http:// and git:// URLs should be avoided if at all possible.
|
331
|
+
These protocols are unauthenticated, so a man-in-the-middle attacker
|
332
|
+
can deliver malicious code and compromise your system. HTTPS and SSH
|
333
333
|
are strongly preferred.
|
334
334
|
|
335
|
-
The
|
335
|
+
The group, platforms, and require options are available and behave
|
336
336
|
exactly the same as they would for a normal gem.
|
337
337
|
|
338
|
-
A
|
339
|
-
directory
|
340
|
-
|
338
|
+
A git repository SHOULD have at least one file, at the root of the
|
339
|
+
directory containing the gem, with the extension .gemspec. This file
|
340
|
+
MUST contain a valid gem specification, as expected by the gem build
|
341
341
|
command.
|
342
342
|
|
343
|
-
If
|
343
|
+
If a git repository does not have a .gemspec, bundler will attempt to
|
344
344
|
create one, but it will not contain any dependencies, executables, or C
|
345
|
-
extension
|
345
|
+
extension compilation instructions. As a result, it may fail to prop-
|
346
346
|
erly integrate into your application.
|
347
347
|
|
348
|
-
If
|
349
|
-
to,
|
350
|
-
only
|
348
|
+
If a git repository does have a .gemspec for the gem you attached it
|
349
|
+
to, a version specifier, if provided, means that the git repository is
|
350
|
+
only valid if the .gemspec specifies a version matching the version
|
351
351
|
specifier. If not, bundler will print a warning.
|
352
352
|
|
353
353
|
|
@@ -358,35 +358,35 @@ GEMFILE(5) GEMFILE(5)
|
|
358
358
|
|
359
359
|
|
360
360
|
|
361
|
-
If
|
362
|
-
it to, a version specifier
|
363
|
-
sion in the simple
|
361
|
+
If a git repository does not have a .gemspec for the gem you attached
|
362
|
+
it to, a version specifier MUST be provided. Bundler will use this ver-
|
363
|
+
sion in the simple .gemspec it creates.
|
364
364
|
|
365
365
|
Git repositories support a number of additional options.
|
366
366
|
|
367
|
-
|
368
|
-
You
|
369
|
-
is
|
367
|
+
branch, tag, and ref
|
368
|
+
You MUST only specify at most one of these options. The default
|
369
|
+
is :branch => "master"
|
370
370
|
|
371
371
|
For example:
|
372
372
|
|
373
|
-
git
|
373
|
+
git "https://github.com/rails/rails.git", :branch => "5-0-sta-
|
374
374
|
ble" do
|
375
375
|
|
376
376
|
git "https://github.com/rails/rails.git", :tag => "v5.0.0" do
|
377
377
|
|
378
378
|
git "https://github.com/rails/rails.git", :ref => "4aded" do
|
379
379
|
|
380
|
-
|
381
|
-
For
|
382
|
-
|
383
|
-
have
|
384
|
-
tory. Specify
|
380
|
+
submodules
|
381
|
+
For reference, a git submodule
|
382
|
+
https://git-scm.com/book/en/v2/Git-Tools-Submodules lets you
|
383
|
+
have another git repository within a subfolder of your reposi-
|
384
|
+
tory. Specify :submodules => true to cause bundler to expand any
|
385
385
|
submodules included in the git repository
|
386
386
|
|
387
|
-
If
|
388
|
-
sents
|
389
|
-
|
387
|
+
If a git repository contains multiple .gemspecs, each .gemspec repre-
|
388
|
+
sents a gem located at the same place in the file system as the .gem-
|
389
|
+
spec.
|
390
390
|
|
391
391
|
|
392
392
|
|
@@ -400,16 +400,16 @@ GEMFILE(5) GEMFILE(5)
|
|
400
400
|
|
401
401
|
|
402
402
|
|
403
|
-
To
|
404
|
-
directory
|
405
|
-
installs the resulting gem. The
|
406
|
-
with
|
403
|
+
To install a gem located in a git repository, bundler changes to the
|
404
|
+
directory containing the gemspec, runs gem build name.gemspec and then
|
405
|
+
installs the resulting gem. The gem build command, which comes standard
|
406
|
+
with Rubygems, evaluates the .gemspec in the context of the directory
|
407
407
|
in which it is located.
|
408
408
|
|
409
|
-
|
410
|
-
A
|
411
|
-
the
|
412
|
-
argument
|
409
|
+
GIT SOURCE
|
410
|
+
A custom git source can be defined via the git_source method. Provide
|
411
|
+
the source's name as an argument, and a block which receives a single
|
412
|
+
argument and interpolates it into a string to return the full repo
|
413
413
|
address:
|
414
414
|
|
415
415
|
|
@@ -427,15 +427,15 @@ GEMFILE(5) GEMFILE(5)
|
|
427
427
|
|
428
428
|
|
429
429
|
|
430
|
-
|
431
|
-
|
432
|
-
rently expands to an insecure
|
430
|
+
GITHUB
|
431
|
+
NOTE: This shorthand should be avoided until Bundler 2.0, since it cur-
|
432
|
+
rently expands to an insecure git:// URL. This allows a man-in-the-mid-
|
433
433
|
dle attacker to compromise your system.
|
434
434
|
|
435
|
-
If
|
436
|
-
lic,
|
437
|
-
and
|
438
|
-
slash.
|
435
|
+
If the git repository you want to use is hosted on GitHub and is pub-
|
436
|
+
lic, you can use the :github shorthand to specify the github username
|
437
|
+
and repository name (without the trailing ".git"), separated by a
|
438
|
+
slash. If both the username and repository name are the same, you can
|
439
439
|
omit one.
|
440
440
|
|
441
441
|
|
@@ -453,12 +453,12 @@ GEMFILE(5) GEMFILE(5)
|
|
453
453
|
|
454
454
|
|
455
455
|
|
456
|
-
Since the
|
457
|
-
|
456
|
+
Since the github method is a specialization of git_source, it accepts a
|
457
|
+
:branch named argument.
|
458
458
|
|
459
|
-
|
459
|
+
GIST
|
460
460
|
If the git repository you want to use is hosted as a Github Gist and is
|
461
|
-
public,
|
461
|
+
public, you can use the :gist shorthand to specify the gist identifier
|
462
462
|
(without the trailing ".git").
|
463
463
|
|
464
464
|
|
@@ -475,14 +475,14 @@ GEMFILE(5) GEMFILE(5)
|
|
475
475
|
|
476
476
|
|
477
477
|
|
478
|
-
Since
|
479
|
-
|
478
|
+
Since the gist method is a specialization of git_source, it accepts a
|
479
|
+
:branch named argument.
|
480
480
|
|
481
|
-
|
482
|
-
If
|
483
|
-
public,
|
484
|
-
username
|
485
|
-
by
|
481
|
+
BITBUCKET
|
482
|
+
If the git repository you want to use is hosted on Bitbucket and is
|
483
|
+
public, you can use the :bitbucket shorthand to specify the bitbucket
|
484
|
+
username and repository name (without the trailing ".git"), separated
|
485
|
+
by a slash. If both the username and repository name are the same, you
|
486
486
|
can omit one.
|
487
487
|
|
488
488
|
|
@@ -500,19 +500,19 @@ GEMFILE(5) GEMFILE(5)
|
|
500
500
|
|
501
501
|
|
502
502
|
|
503
|
-
Since
|
504
|
-
accepts a
|
503
|
+
Since the bitbucket method is a specialization of git_source, it
|
504
|
+
accepts a :branch named argument.
|
505
505
|
|
506
|
-
|
507
|
-
You
|
506
|
+
PATH
|
507
|
+
You can specify that a gem is located in a particular location on the
|
508
508
|
file system. Relative paths are resolved relative to the directory con-
|
509
|
-
taining the
|
509
|
+
taining the Gemfile.
|
510
510
|
|
511
|
-
Similar
|
512
|
-
that
|
511
|
+
Similar to the semantics of the :git option, the :path option requires
|
512
|
+
that the directory in question either contains a .gemspec for the gem,
|
513
513
|
or that you specify an explicit version that bundler should use.
|
514
514
|
|
515
|
-
Unlike
|
515
|
+
Unlike :git, bundler does not compile C extensions for gems specified
|
516
516
|
as paths.
|
517
517
|
|
518
518
|
|
@@ -522,8 +522,8 @@ GEMFILE(5) GEMFILE(5)
|
|
522
522
|
|
523
523
|
|
524
524
|
If you would like to use multiple local gems directly from the filesys-
|
525
|
-
tem,
|
526
|
-
files. This will automatically load gemspec files from
|
525
|
+
tem, you can set a global path option to the path containing the gem's
|
526
|
+
files. This will automatically load gemspec files from subdirectories.
|
527
527
|
|
528
528
|
|
529
529
|
|
@@ -534,8 +534,8 @@ GEMFILE(5) GEMFILE(5)
|
|
534
534
|
|
535
535
|
|
536
536
|
|
537
|
-
|
538
|
-
The
|
537
|
+
BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
|
538
|
+
The :source, :git, :path, :group, and :platforms options may be applied
|
539
539
|
to a group of gems by using block form.
|
540
540
|
|
541
541
|
|
@@ -563,15 +563,15 @@ GEMFILE(5) GEMFILE(5)
|
|
563
563
|
|
564
564
|
|
565
565
|
In the case of the group block form the :optional option can be given
|
566
|
-
to prevent a group from being installed unless listed in the
|
567
|
-
option given to the
|
566
|
+
to prevent a group from being installed unless listed in the --with
|
567
|
+
option given to the bundle install command.
|
568
568
|
|
569
|
-
In the case of the
|
570
|
-
|
569
|
+
In the case of the git block form, the :ref, :branch, :tag, and :sub-
|
570
|
+
modules options may be passed to the git method, and all gems in the
|
571
571
|
block will inherit those options.
|
572
572
|
|
573
|
-
|
574
|
-
The
|
573
|
+
INSTALL_IF
|
574
|
+
The install_if method allows gems to be installed based on a proc or
|
575
575
|
lambda. This is especially useful for optional gems that can only be
|
576
576
|
used if certain software is installed or some other conditions are met.
|
577
577
|
|
@@ -583,54 +583,54 @@ GEMFILE(5) GEMFILE(5)
|
|
583
583
|
|
584
584
|
|
585
585
|
|
586
|
-
|
587
|
-
The
|
586
|
+
GEMSPEC
|
587
|
+
The .gemspec http://guides.rubygems.org/specification-reference/ file
|
588
588
|
is where you provide metadata about your gem to Rubygems. Some required
|
589
|
-
Gemspec
|
590
|
-
gem.
|
589
|
+
Gemspec attributes include the name, description, and homepage of your
|
590
|
+
gem. This is also where you specify the dependencies your gem needs to
|
591
591
|
run.
|
592
592
|
|
593
593
|
If you wish to use Bundler to help install dependencies for a gem while
|
594
|
-
it
|
595
|
-
cies listed in the
|
594
|
+
it is being developed, use the gemspec method to pull in the dependen-
|
595
|
+
cies listed in the .gemspec file.
|
596
596
|
|
597
|
-
The
|
598
|
-
the
|
599
|
-
requirements
|
600
|
-
ment on your project (
|
597
|
+
The gemspec method adds any runtime dependencies as gem requirements in
|
598
|
+
the default group. It also adds development dependencies as gem
|
599
|
+
requirements in the development group. Finally, it adds a gem require-
|
600
|
+
ment on your project (:path => '.'). In conjunction with Bundler.setup,
|
601
601
|
this allows you to require project files in your test code as you would
|
602
|
-
if
|
602
|
+
if the project were installed as a gem; you need not manipulate the
|
603
603
|
load path manually or require project files via relative paths.
|
604
604
|
|
605
|
-
The
|
606
|
-
|
607
|
-
the
|
608
|
-
spec"),
|
605
|
+
The gemspec method supports optional :path, :glob, :name, and :develop-
|
606
|
+
ment_group options, which control where bundler looks for the .gemspec,
|
607
|
+
the glob it uses to look for the gemspec (defaults to: "{,,/*}.gem-
|
608
|
+
spec"), what named .gemspec it uses (if more than one is present), and
|
609
609
|
which group development dependencies are included in.
|
610
610
|
|
611
|
-
When
|
612
|
-
tion,
|
613
|
-
even
|
614
|
-
for the
|
611
|
+
When a gemspec dependency encounters version conflicts during resolu-
|
612
|
+
tion, the local version under development will always be selected --
|
613
|
+
even if there are remote versions that better match other requirements
|
614
|
+
for the gemspec gem.
|
615
615
|
|
616
|
-
|
617
|
-
When
|
616
|
+
SOURCE PRIORITY
|
617
|
+
When attempting to locate a gem to satisfy a gem requirement, bundler
|
618
618
|
uses the following priority order:
|
619
619
|
|
620
|
-
1. The source explicitly attached to the gem (using
|
621
|
-
|
620
|
+
1. The source explicitly attached to the gem (using :source, :path, or
|
621
|
+
:git)
|
622
622
|
|
623
623
|
2. For implicit gems (dependencies of explicit gems), any source, git,
|
624
|
-
or
|
625
|
-
prioritizing
|
626
|
-
over ones from
|
624
|
+
or path repository declared on the parent. This results in bundler
|
625
|
+
prioritizing the ActiveSupport gem from the Rails git repository
|
626
|
+
over ones from rubygems.org
|
627
627
|
|
628
|
-
3. The
|
629
|
-
source in your
|
628
|
+
3. The sources specified via global source lines, searching each
|
629
|
+
source in your Gemfile from last added to first added.
|
630
630
|
|
631
631
|
|
632
632
|
|
633
633
|
|
634
634
|
|
635
635
|
|
636
|
-
|
636
|
+
July 2017 GEMFILE(5)
|