bundler 1.0.21 → 1.1.rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +7 -0
- data/CHANGELOG.md +153 -1
- data/README.md +3 -3
- data/Rakefile +15 -27
- data/bin/bundle +7 -0
- data/bundler.gemspec +1 -1
- data/lib/bundler/cli.rb +126 -45
- data/lib/bundler/definition.rb +22 -5
- data/lib/bundler/dep_proxy.rb +35 -0
- data/lib/bundler/dsl.rb +17 -34
- data/lib/bundler/endpoint_specification.rb +69 -0
- data/lib/bundler/fetcher.rb +221 -0
- data/lib/bundler/gem_helper.rb +0 -1
- data/lib/bundler/gem_helpers.rb +23 -0
- data/lib/bundler/index.rb +77 -38
- data/lib/bundler/installer.rb +43 -1
- data/lib/bundler/man/bundle-benchmark +19 -0
- data/lib/bundler/man/bundle-benchmark.txt +27 -0
- data/lib/bundler/man/bundle-config +1 -1
- data/lib/bundler/man/bundle-config.txt +3 -3
- data/lib/bundler/man/bundle-install +288 -0
- data/lib/bundler/man/bundle-install.txt +74 -79
- data/lib/bundler/man/bundle-package +1 -1
- data/lib/bundler/man/bundle-package.txt +1 -1
- data/lib/bundler/man/bundle-update +1 -1
- data/lib/bundler/man/bundle-update.txt +41 -41
- data/lib/bundler/man/gemfile.5 +6 -7
- data/lib/bundler/man/gemfile.5.txt +9 -9
- data/lib/bundler/match_platform.rb +13 -0
- data/lib/bundler/remote_specification.rb +6 -8
- data/lib/bundler/resolver.rb +32 -19
- data/lib/bundler/rubygems_ext.rb +2 -86
- data/lib/bundler/rubygems_integration.rb +35 -0
- data/lib/bundler/runtime.rb +84 -1
- data/lib/bundler/source.rb +85 -88
- data/lib/bundler/spec_set.rb +2 -0
- data/lib/bundler/templates/Executable +1 -1
- data/lib/bundler/templates/newgem/Gemfile.tt +1 -1
- data/lib/bundler/templates/newgem/Rakefile.tt +1 -0
- data/lib/bundler/templates/newgem/bin/newgem.tt +1 -1
- data/lib/bundler/templates/newgem/gitignore.tt +14 -1
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +13 -20
- data/lib/bundler/ui.rb +32 -17
- data/lib/bundler/vendor/net/http/faster.rb +27 -0
- data/lib/bundler/vendor/net/http/persistent.rb +468 -0
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler.rb +56 -23
- data/man/bundle-install.ronn +7 -0
- data/man/bundle.ronn +3 -0
- data/man/gemfile.5.ronn +6 -6
- data/spec/bundler/dsl_spec.rb +22 -0
- data/spec/bundler/source_spec.rb +25 -0
- data/spec/install/deprecated_spec.rb +2 -3
- data/spec/install/gems/dependency_api_spec.rb +358 -0
- data/spec/install/gems/flex_spec.rb +1 -1
- data/spec/install/gems/groups_spec.rb +17 -8
- data/spec/install/gems/platform_spec.rb +16 -0
- data/spec/install/gems/post_install_spec.rb +47 -0
- data/spec/install/gems/simple_case_spec.rb +61 -64
- data/spec/install/gems/standalone_spec.rb +238 -0
- data/spec/install/git_spec.rb +62 -0
- data/spec/other/check_spec.rb +30 -0
- data/spec/other/clean_spec.rb +397 -0
- data/spec/other/exec_spec.rb +0 -29
- data/spec/other/newgem_spec.rb +39 -0
- data/spec/other/outdated_spec.rb +93 -0
- data/spec/other/show_spec.rb +6 -0
- data/spec/quality_spec.rb +1 -1
- data/spec/realworld/edgecases_spec.rb +12 -0
- data/spec/runtime/executable_spec.rb +10 -0
- data/spec/runtime/require_spec.rb +8 -9
- data/spec/runtime/with_clean_env_spec.rb +60 -7
- data/spec/spec_helper.rb +8 -1
- data/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb +13 -0
- data/spec/support/artifice/endpoint.rb +54 -0
- data/spec/support/artifice/endpoint_500.rb +37 -0
- data/spec/support/artifice/endpoint_api_missing.rb +16 -0
- data/spec/support/artifice/endpoint_basic_authentication.rb +13 -0
- data/spec/support/artifice/endpoint_extra.rb +27 -0
- data/spec/support/artifice/endpoint_extra_missing.rb +15 -0
- data/spec/support/artifice/endpoint_fallback.rb +18 -0
- data/spec/support/artifice/endpoint_marshal_fail.rb +11 -0
- data/spec/support/artifice/endpoint_redirect.rb +15 -0
- data/spec/support/builders.rb +7 -0
- data/spec/support/fakeweb/rack-1.0.0.marshal +2 -0
- data/spec/support/fakeweb/windows.rb +23 -0
- data/spec/support/helpers.rb +36 -3
- data/spec/support/path.rb +2 -0
- data/spec/support/rubygems_ext.rb +3 -3
- metadata +48 -74
|
@@ -60,9 +60,9 @@ OPTIONS
|
|
|
60
60
|
|
|
61
61
|
--local
|
|
62
62
|
Do not attempt to connect to rubygems.org, instead using just
|
|
63
|
-
the gems
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
the gems already present in Rubygems' cache or in vendor/cache.
|
|
64
|
+
Note that if a more appropriate platform-specific gem exists on
|
|
65
|
+
rubygems.org, it will not be found.
|
|
66
66
|
|
|
67
67
|
--deployment
|
|
68
68
|
Switches bundler's defaults into deployment mode. Do not use
|
|
@@ -82,11 +82,6 @@ OPTIONS
|
|
|
82
82
|
also generates a bundle/bundler/setup.rb file to replace
|
|
83
83
|
Bundler's own setup.
|
|
84
84
|
|
|
85
|
-
--platform=<platform>
|
|
86
|
-
Force the platform used by bundler to determine the gems to be
|
|
87
|
-
installed. By default bundler will use runtime detection to
|
|
88
|
-
determine the target platform.
|
|
89
|
-
|
|
90
85
|
DEPLOYMENT MODE
|
|
91
86
|
Bundler's defaults are optimized for development. To switch to defaults
|
|
92
87
|
optimized for deployment, use the --deployment flag. Do not activate
|
|
@@ -129,14 +124,14 @@ DEPLOYMENT MODE
|
|
|
129
124
|
|
|
130
125
|
|
|
131
126
|
SUDO USAGE
|
|
132
|
-
By default, bundler installs gems to the same location as gem
|
|
127
|
+
By default, bundler installs gems to the same location as gem install.
|
|
133
128
|
|
|
134
|
-
In
|
|
129
|
+
In some cases, that location may not be writable by your Unix user. In
|
|
135
130
|
that case, bundler will stage everything in a temporary directory, then
|
|
136
|
-
ask
|
|
131
|
+
ask you for your sudo password in order to copy the gems into their
|
|
137
132
|
system location.
|
|
138
133
|
|
|
139
|
-
From
|
|
134
|
+
From your perspective, this is identical to installing them gems
|
|
140
135
|
directly into the system.
|
|
141
136
|
|
|
142
137
|
You should never use sudo bundle install. This is because several other
|
|
@@ -150,36 +145,36 @@ SUDO USAGE
|
|
|
150
145
|
|
|
151
146
|
|
|
152
147
|
|
|
153
|
-
Of
|
|
154
|
-
chowning
|
|
155
|
-
only
|
|
156
|
-
user.
|
|
148
|
+
Of these three, the first two could theoretically be performed by
|
|
149
|
+
chowning the resulting files to $SUDO_USER. The third, however, can
|
|
150
|
+
only be performed by actually invoking the git command as the current
|
|
151
|
+
user. Therefore, git gems are downloaded and installed into ~/.bundle
|
|
157
152
|
rather than $GEM_HOME or $BUNDLE_PATH.
|
|
158
153
|
|
|
159
|
-
As
|
|
154
|
+
As a result, you should run bundle install as the current user, and
|
|
160
155
|
bundler will ask for your password if it is needed to put the gems into
|
|
161
156
|
their final location.
|
|
162
157
|
|
|
163
158
|
INSTALLING GROUPS
|
|
164
|
-
By
|
|
159
|
+
By default, bundle install will install all gems in all groups in your
|
|
165
160
|
Gemfile(5), except those declared for a different platform.
|
|
166
161
|
|
|
167
|
-
However,
|
|
168
|
-
groups
|
|
162
|
+
However, you can explicitly tell bundler to skip installing certain
|
|
163
|
+
groups with the --without option. This option takes a space-separated
|
|
169
164
|
list of groups.
|
|
170
165
|
|
|
171
|
-
While
|
|
172
|
-
fied
|
|
166
|
+
While the --without option will skip installing the gems in the speci-
|
|
167
|
+
fied groups, it will still download those gems and use them to resolve
|
|
173
168
|
the dependencies of every gem in your Gemfile(5).
|
|
174
169
|
|
|
175
170
|
This is so that installing a different set of groups on another machine
|
|
176
|
-
(such
|
|
171
|
+
(such as a production server) will not change the gems and versions
|
|
177
172
|
that you have already developed and tested against.
|
|
178
173
|
|
|
179
174
|
Bundler offers a rock-solid guarantee that the third-party code you are
|
|
180
175
|
running in development and testing is also the third-party code you are
|
|
181
|
-
running
|
|
182
|
-
different
|
|
176
|
+
running in production. You can choose to exclude some of that code in
|
|
177
|
+
different environments, but you will never be caught flat-footed by
|
|
183
178
|
different versions of third-party code being used in different environ-
|
|
184
179
|
ments.
|
|
185
180
|
|
|
@@ -197,86 +192,86 @@ INSTALLING GROUPS
|
|
|
197
192
|
|
|
198
193
|
|
|
199
194
|
|
|
200
|
-
In
|
|
195
|
+
In this case, sinatra depends on any version of Rack (>= 1.0, while
|
|
201
196
|
rack-perftools-profiler depends on 1.x (~> 1.0).
|
|
202
197
|
|
|
203
|
-
When
|
|
204
|
-
look
|
|
205
|
-
you
|
|
206
|
-
APIs
|
|
198
|
+
When you run bundle install --without production in development, we
|
|
199
|
+
look at the dependencies of rack-perftools-profiler as well. That way,
|
|
200
|
+
you do not spend all your time developing against Rack 2.0, using new
|
|
201
|
+
APIs unavailable in Rack 1.x, only to have bundler switch to Rack 1.2
|
|
207
202
|
when the production group is used.
|
|
208
203
|
|
|
209
|
-
This
|
|
210
|
-
attempt
|
|
204
|
+
This should not cause any problems in practice, because we do not
|
|
205
|
+
attempt to install the gems in the excluded groups, and only evaluate
|
|
211
206
|
as part of the dependency resolution process.
|
|
212
207
|
|
|
213
|
-
This
|
|
214
|
-
gem
|
|
208
|
+
This also means that you cannot include different versions of the same
|
|
209
|
+
gem in different groups, because doing so would result in different
|
|
215
210
|
sets of dependencies used in development and production. Because of the
|
|
216
|
-
vagaries
|
|
217
|
-
more
|
|
211
|
+
vagaries of the dependency resolution process, this usually affects
|
|
212
|
+
more than just the gems you list in your Gemfile(5), and can (surpris-
|
|
218
213
|
ingly) radically change the gems you are using.
|
|
219
214
|
|
|
220
215
|
REMEMBERED OPTIONS
|
|
221
|
-
Some
|
|
216
|
+
Some options (marked above in the OPTIONS section) are remembered
|
|
222
217
|
between calls to bundle install, and by the Bundler runtime.
|
|
223
218
|
|
|
224
|
-
For
|
|
225
|
-
call
|
|
219
|
+
For instance, if you run bundle install --without test, a subsequent
|
|
220
|
+
call to bundle install that does not include a --without flag will
|
|
226
221
|
remember your previous choice.
|
|
227
222
|
|
|
228
|
-
In
|
|
229
|
-
in
|
|
223
|
+
In addition, a call to Bundler.setup will not attempt to make the gems
|
|
224
|
+
in those groups available on the Ruby load path, as they were not
|
|
230
225
|
installed.
|
|
231
226
|
|
|
232
227
|
The settings that are remembered are:
|
|
233
228
|
|
|
234
229
|
--deployment
|
|
235
|
-
At
|
|
230
|
+
At runtime, this remembered setting will also result in Bundler
|
|
236
231
|
raising an exception if the Gemfile.lock is out of date.
|
|
237
232
|
|
|
238
|
-
--path Subsequent
|
|
239
|
-
directory
|
|
240
|
-
look
|
|
233
|
+
--path Subsequent calls to bundle install will install gems to the
|
|
234
|
+
directory originally passed to --path. The Bundler runtime will
|
|
235
|
+
look for gems in that location. You can revert this option by
|
|
241
236
|
running bundle install --system.
|
|
242
237
|
|
|
243
238
|
--binstubs
|
|
244
|
-
Bundler
|
|
239
|
+
Bundler will update the executables every subsequent call to
|
|
245
240
|
bundle install.
|
|
246
241
|
|
|
247
242
|
--without
|
|
248
|
-
As
|
|
249
|
-
--without
|
|
243
|
+
As described above, Bundler will skip the gems specified by
|
|
244
|
+
--without in subsequent calls to bundle install. The Bundler
|
|
250
245
|
runtime will also not try to make the gems in the skipped groups
|
|
251
246
|
available.
|
|
252
247
|
|
|
253
248
|
THE GEMFILE.LOCK
|
|
254
|
-
When
|
|
255
|
-
versions
|
|
249
|
+
When you run bundle install, Bundler will persist the full names and
|
|
250
|
+
versions of all gems that you used (including dependencies of the gems
|
|
256
251
|
specified in the Gemfile(5)) into a file called Gemfile.lock.
|
|
257
252
|
|
|
258
253
|
Bundler uses this file in all subsequent calls to bundle install, which
|
|
259
254
|
guarantees that you always use the same exact code, even as your appli-
|
|
260
255
|
cation moves across machines.
|
|
261
256
|
|
|
262
|
-
Because
|
|
257
|
+
Because of the way dependency resolution works, even a seemingly small
|
|
263
258
|
change (for instance, an update to a point-release of a dependency of a
|
|
264
|
-
gem
|
|
259
|
+
gem in your Gemfile(5)) can result in radically different gems being
|
|
265
260
|
needed to satisfy all dependencies.
|
|
266
261
|
|
|
267
|
-
As
|
|
262
|
+
As a result, you SHOULD check your Gemfile.lock into version control.
|
|
268
263
|
If you do not, every machine that checks out your repository (including
|
|
269
264
|
your production server) will resolve all dependencies again, which will
|
|
270
|
-
result
|
|
271
|
-
the
|
|
265
|
+
result in different versions of third-party code being used if any of
|
|
266
|
+
the gems in the Gemfile(5) or any of their dependencies have been
|
|
272
267
|
updated.
|
|
273
268
|
|
|
274
269
|
CONSERVATIVE UPDATING
|
|
275
|
-
When
|
|
270
|
+
When you make a change to the Gemfile(5) and then run bundle install,
|
|
276
271
|
Bundler will update only the gems that you modified.
|
|
277
272
|
|
|
278
|
-
In
|
|
279
|
-
called
|
|
273
|
+
In other words, if a gem that you did not modify worked before you
|
|
274
|
+
called bundle install, it will continue to use the exact same versions
|
|
280
275
|
of all dependencies as it used before the update.
|
|
281
276
|
|
|
282
277
|
Let's take a look at an example. Here's your original Gemfile(5):
|
|
@@ -290,13 +285,13 @@ CONSERVATIVE UPDATING
|
|
|
290
285
|
|
|
291
286
|
|
|
292
287
|
|
|
293
|
-
In
|
|
294
|
-
port.
|
|
295
|
-
1.1.0,
|
|
288
|
+
In this case, both actionpack and activemerchant depend on activesup-
|
|
289
|
+
port. The actionpack gem depends on activesupport 2.3.8 and rack ~>
|
|
290
|
+
1.1.0, while the activemerchant gem depends on activesupport >= 2.3.2,
|
|
296
291
|
braintree >= 2.0.0, and builder >= 2.0.0.
|
|
297
292
|
|
|
298
|
-
When
|
|
299
|
-
activesupport
|
|
293
|
+
When the dependencies are first resolved, Bundler will select
|
|
294
|
+
activesupport 2.3.8, which satisfies the requirements of both gems in
|
|
300
295
|
your Gemfile(5).
|
|
301
296
|
|
|
302
297
|
Next, you modify your Gemfile(5) to:
|
|
@@ -310,40 +305,40 @@ CONSERVATIVE UPDATING
|
|
|
310
305
|
|
|
311
306
|
|
|
312
307
|
|
|
313
|
-
The
|
|
314
|
-
updates
|
|
308
|
+
The actionpack 3.0.0.rc gem has a number of new dependencies, and
|
|
309
|
+
updates the activesupport dependency to = 3.0.0.rc and the rack depen-
|
|
315
310
|
dency to ~> 1.2.1.
|
|
316
311
|
|
|
317
|
-
When
|
|
318
|
-
actionpack
|
|
312
|
+
When you run bundle install, Bundler notices that you changed the
|
|
313
|
+
actionpack gem, but not the activemerchant gem. It evaluates the gems
|
|
319
314
|
currently being used to satisfy its requirements:
|
|
320
315
|
|
|
321
316
|
activesupport 2.3.8
|
|
322
|
-
also
|
|
317
|
+
also used to satisfy a dependency in activemerchant, which is
|
|
323
318
|
not being updated
|
|
324
319
|
|
|
325
320
|
rack ~> 1.1.0
|
|
326
321
|
not currently being used to satify another dependency
|
|
327
322
|
|
|
328
|
-
Because
|
|
329
|
-
not
|
|
330
|
-
ever,
|
|
323
|
+
Because you did not explicitly ask to update activemerchant, you would
|
|
324
|
+
not expect it to suddenly stop working after updating actionpack. How-
|
|
325
|
+
ever, satisfying the new activesupport 3.0.0.rc dependency of action-
|
|
331
326
|
pack requires updating one of its dependencies.
|
|
332
327
|
|
|
333
|
-
Even
|
|
334
|
-
retically
|
|
335
|
-
Gemfile(5)
|
|
328
|
+
Even though activemerchant declares a very loose dependency that theo-
|
|
329
|
+
retically matches activesupport 3.0.0.rc, bundler treats gems in your
|
|
330
|
+
Gemfile(5) that have not changed as an atomic unit together with their
|
|
336
331
|
dependencies. In this case, the activemerchant dependency is treated as
|
|
337
|
-
activemerchant
|
|
332
|
+
activemerchant 1.7.1 + activesupport 2.3.8, so bundle install will
|
|
338
333
|
report that it cannot update actionpack.
|
|
339
334
|
|
|
340
335
|
To explicitly update actionpack, including its dependencies which other
|
|
341
|
-
gems
|
|
336
|
+
gems in the Gemfile(5) still depend on, run bundle update actionpack
|
|
342
337
|
(see bundle update(1)).
|
|
343
338
|
|
|
344
|
-
Summary:
|
|
345
|
-
should
|
|
346
|
-
other
|
|
339
|
+
Summary: In general, after making a change to the Gemfile(5) , you
|
|
340
|
+
should first try to run bundle install, which will guarantee that no
|
|
341
|
+
other gems in the Gemfile(5) are impacted by the change. If that does
|
|
347
342
|
not work, run bundle update(1) bundle-update.1.html.
|
|
348
343
|
|
|
349
344
|
|
|
@@ -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" "January 2011" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-package\fR \- Package your needed \fB\.gem\fR files into your application
|
|
@@ -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" "January 2011" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-update\fR \- Update your gems to the latest available versions
|
|
@@ -14,18 +14,18 @@ DESCRIPTION
|
|
|
14
14
|
eral, you should use bundle install(1) bundle-install.1.html to install
|
|
15
15
|
the same exact gems and versions across machines.
|
|
16
16
|
|
|
17
|
-
You would use bundle update to explicitly update the version of a
|
|
17
|
+
You would use bundle update to explicitly update the version of a gem.
|
|
18
18
|
|
|
19
19
|
OPTIONS
|
|
20
20
|
--source=<name>
|
|
21
|
-
The
|
|
22
|
-
instance,
|
|
23
|
-
http://github.com/rails/rails.git,
|
|
21
|
+
The name of a :git or :path source used in the Gemfile(5). For
|
|
22
|
+
instance, with a :git source of
|
|
23
|
+
http://github.com/rails/rails.git, you would call bundle update
|
|
24
24
|
--source rails
|
|
25
25
|
|
|
26
26
|
UPDATING ALL GEMS
|
|
27
|
-
If
|
|
28
|
-
previously
|
|
27
|
+
If you run bundle update with no parameters, bundler will ignore any
|
|
28
|
+
previously installed gems and resolve all dependencies again based on
|
|
29
29
|
the latest versions of all gems available in the sources.
|
|
30
30
|
|
|
31
31
|
Consider the following Gemfile(5):
|
|
@@ -39,8 +39,8 @@ UPDATING ALL GEMS
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
When
|
|
43
|
-
bundler
|
|
42
|
+
When you run bundle install(1) bundle-install.1.html the first time,
|
|
43
|
+
bundler will resolve all of the dependencies, all the way down, and
|
|
44
44
|
install what you need:
|
|
45
45
|
|
|
46
46
|
|
|
@@ -76,44 +76,44 @@ UPDATING ALL GEMS
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
As
|
|
80
|
-
your
|
|
81
|
-
Bundler
|
|
82
|
-
next
|
|
83
|
-
skips
|
|
79
|
+
As you can see, even though you have just two gems in the Gemfile(5),
|
|
80
|
+
your application actually needs 25 different gems in order to run.
|
|
81
|
+
Bundler remembers the exact versions it installed in Gemfile.lock. The
|
|
82
|
+
next time you run bundle install(1) bundle-install.1.html, bundler
|
|
83
|
+
skips the dependency resolution and installs the same gems as it
|
|
84
84
|
installed last time.
|
|
85
85
|
|
|
86
|
-
After
|
|
87
|
-
on
|
|
88
|
-
will
|
|
86
|
+
After checking in the Gemfile.lock into version control and cloning it
|
|
87
|
+
on another machine, running bundle install(1) bundle-install.1.html
|
|
88
|
+
will still install the gems that you installed last time. You don't
|
|
89
89
|
need to worry that a new release of erubis or mail changes the gems you
|
|
90
90
|
use.
|
|
91
91
|
|
|
92
|
-
However,
|
|
93
|
-
using
|
|
92
|
+
However, from time to time, you might want to update the gems you are
|
|
93
|
+
using to the newest versions that still match the gems in your Gem-
|
|
94
94
|
file(5).
|
|
95
95
|
|
|
96
|
-
To
|
|
97
|
-
resolve
|
|
98
|
-
result
|
|
99
|
-
requirements
|
|
96
|
+
To do this, run bundle update, which will ignore the Gemfile.lock, and
|
|
97
|
+
resolve all the dependencies again. Keep in mind that this process can
|
|
98
|
+
result in a significantly different set of the 25 gems, based on the
|
|
99
|
+
requirements of new gems that the gem authors released since the last
|
|
100
100
|
time you ran bundle update.
|
|
101
101
|
|
|
102
102
|
UPDATING A LIST OF GEMS
|
|
103
103
|
Sometimes, you want to update a single gem in the Gemfile(5), and leave
|
|
104
|
-
the
|
|
104
|
+
the rest of the gems that you specified locked to the versions in the
|
|
105
105
|
Gemfile.lock.
|
|
106
106
|
|
|
107
|
-
For
|
|
107
|
+
For instance, in the scenario above, imagine that nokogiri releases
|
|
108
108
|
version 1.4.4, and you want to update it without updating Rails and all
|
|
109
109
|
of its dependencies. To do this, run bundle update nokogiri.
|
|
110
110
|
|
|
111
|
-
Bundler
|
|
111
|
+
Bundler will update nokogiri and any of its dependencies, but leave
|
|
112
112
|
alone Rails and its dependencies.
|
|
113
113
|
|
|
114
114
|
OVERLAPPING DEPENDENCIES
|
|
115
|
-
Sometimes,
|
|
116
|
-
the
|
|
115
|
+
Sometimes, multiple gems declared in your Gemfile(5) are satisfied by
|
|
116
|
+
the same second-level dependency. For instance, consider the case of
|
|
117
117
|
thin and rack-perftools-profiler.
|
|
118
118
|
|
|
119
119
|
|
|
@@ -125,7 +125,7 @@ OVERLAPPING DEPENDENCIES
|
|
|
125
125
|
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
The
|
|
128
|
+
The thin gem depends on rack >= 1.0, while rack-perftools-profiler
|
|
129
129
|
depends on rack ~> 1.0. If you run bundle install, you get:
|
|
130
130
|
|
|
131
131
|
|
|
@@ -143,24 +143,24 @@ OVERLAPPING DEPENDENCIES
|
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
In this case, the two gems have their own set of dependencies, but they
|
|
146
|
-
share
|
|
147
|
-
update
|
|
148
|
-
but
|
|
149
|
-
rack-perftools_profiler.
|
|
146
|
+
share rack in common. If you run bundle update thin, bundler will
|
|
147
|
+
update daemons, eventmachine and rack, which are dependencies of thin,
|
|
148
|
+
but not open4 or perftools.rb, which are dependencies of
|
|
149
|
+
rack-perftools_profiler. Note that bundle update thin will update rack
|
|
150
150
|
even though it's also a dependency of rack-perftools_profiler.
|
|
151
151
|
|
|
152
|
-
In
|
|
153
|
-
update
|
|
152
|
+
In short, when you update a gem using bundle update, bundler will
|
|
153
|
+
update all dependencies of that gem, including those that are also
|
|
154
154
|
dependencies of another gem.
|
|
155
155
|
|
|
156
156
|
In this scenario, updating the thin version manually in the Gemfile(5),
|
|
157
|
-
and
|
|
158
|
-
update
|
|
157
|
+
and then running bundle install(1) bundle-install.1.html will only
|
|
158
|
+
update daemons and eventmachine, but not rack. For more information,
|
|
159
159
|
see the CONSERVATIVE UPDATING section of bundle install(1) bun-
|
|
160
160
|
dle-install.1.html.
|
|
161
161
|
|
|
162
162
|
RECOMMENDED WORKFLOW
|
|
163
|
-
In
|
|
163
|
+
In general, when working with an application managed with bundler, you
|
|
164
164
|
should use the following workflow:
|
|
165
165
|
|
|
166
166
|
o After you create your Gemfile(5) for the first time, run
|
|
@@ -171,7 +171,7 @@ RECOMMENDED WORKFLOW
|
|
|
171
171
|
|
|
172
172
|
$ git add Gemfile.lock
|
|
173
173
|
|
|
174
|
-
o When
|
|
174
|
+
o When checking out this repository on another development machine,
|
|
175
175
|
run
|
|
176
176
|
|
|
177
177
|
$ bundle install
|
|
@@ -180,7 +180,7 @@ RECOMMENDED WORKFLOW
|
|
|
180
180
|
|
|
181
181
|
$ bundle install --deployment
|
|
182
182
|
|
|
183
|
-
o After
|
|
183
|
+
o After changing the Gemfile(5) to reflect a new or update depen-
|
|
184
184
|
dency, run
|
|
185
185
|
|
|
186
186
|
$ bundle install
|
|
@@ -194,7 +194,7 @@ RECOMMENDED WORKFLOW
|
|
|
194
194
|
|
|
195
195
|
$ bundle update rails thin
|
|
196
196
|
|
|
197
|
-
o If
|
|
197
|
+
o If you want to update all the gems to the latest possible versions
|
|
198
198
|
that still match the gems listed in the Gemfile(5), run
|
|
199
199
|
|
|
200
200
|
$ bundle update
|
|
@@ -204,4 +204,4 @@ RECOMMENDED WORKFLOW
|
|
|
204
204
|
|
|
205
205
|
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
January 2011 BUNDLE-UPDATE(1)
|
data/lib/bundler/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" "October 2011" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
|
|
@@ -63,20 +63,22 @@ gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
|
|
|
63
63
|
.IP "" 0
|
|
64
64
|
.
|
|
65
65
|
.SS "REQUIRE AS (:require)"
|
|
66
|
-
Each \fIgem\fR \fBMAY\fR specify
|
|
66
|
+
Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring via \fBBundler\.require\fR\. You may pass an array with multiple files, or \fBfalse\fR to prevent any file from being autorequired\.
|
|
67
67
|
.
|
|
68
68
|
.IP "" 4
|
|
69
69
|
.
|
|
70
70
|
.nf
|
|
71
71
|
|
|
72
72
|
gem "sqlite3\-ruby", :require => "sqlite3"
|
|
73
|
+
gem "redis", :require => ["redis/connection/hiredis", "redis"]
|
|
74
|
+
gem "webmock", :require => false
|
|
73
75
|
.
|
|
74
76
|
.fi
|
|
75
77
|
.
|
|
76
78
|
.IP "" 0
|
|
77
79
|
.
|
|
78
80
|
.P
|
|
79
|
-
|
|
81
|
+
The argument defaults to the name of the gem\. For example, these are identical:
|
|
80
82
|
.
|
|
81
83
|
.IP "" 4
|
|
82
84
|
.
|
|
@@ -89,9 +91,6 @@ gem "nokogiri", :require => "nokogiri"
|
|
|
89
91
|
.
|
|
90
92
|
.IP "" 0
|
|
91
93
|
.
|
|
92
|
-
.P
|
|
93
|
-
Specify \fB:require => false\fR to prevent bundler from requiring the gem, but still install it and maintain dependencies\.
|
|
94
|
-
.
|
|
95
94
|
.SS "GROUPS (:group or :groups)"
|
|
96
95
|
Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\fR that does not specify membership in any group is placed in the \fBdefault\fR group\.
|
|
97
96
|
.
|
|
@@ -365,7 +364,7 @@ The source explicitly attached to the gem (using \fB:path\fR or \fB:git\fR)
|
|
|
365
364
|
For implicit gems (dependencies of explicit gems), any git or path repository otherwise declared\. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from \fBrubygems\.org\fR
|
|
366
365
|
.
|
|
367
366
|
.IP "3." 4
|
|
368
|
-
The sources specified via \fBsource\fR,
|
|
367
|
+
The sources specified via \fBsource\fR, searching each source in your \fBGemfile\fR from last added to first added\.
|
|
369
368
|
.
|
|
370
369
|
.IP "" 0
|
|
371
370
|
|
|
@@ -54,16 +54,19 @@ GEMS (#gem)
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
REQUIRE AS (:require)
|
|
57
|
-
Each gem MAY specify
|
|
58
|
-
|
|
57
|
+
Each gem MAY specify files that should be used when autorequiring via
|
|
58
|
+
Bundler.require. You may pass an array with multiple files, or false to
|
|
59
|
+
prevent any file from being autorequired.
|
|
59
60
|
|
|
60
61
|
|
|
61
62
|
|
|
62
63
|
gem "sqlite3-ruby", :require => "sqlite3"
|
|
64
|
+
gem "redis", :require => ["redis/connection/hiredis", "redis"]
|
|
65
|
+
gem "webmock", :require => false
|
|
63
66
|
|
|
64
67
|
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
The argument defaults to the name of the gem. For example, these are
|
|
67
70
|
identical:
|
|
68
71
|
|
|
69
72
|
|
|
@@ -73,9 +76,6 @@ GEMS (#gem)
|
|
|
73
76
|
|
|
74
77
|
|
|
75
78
|
|
|
76
|
-
Specify :require => false to prevent bundler from requiring the gem,
|
|
77
|
-
but still install it and maintain dependencies.
|
|
78
|
-
|
|
79
79
|
GROUPS (:group or :groups)
|
|
80
80
|
Each gem MAY specify membership in one or more groups. Any gem that
|
|
81
81
|
does not specify membership in any group is placed in the default
|
|
@@ -337,12 +337,12 @@ SOURCE PRIORITY
|
|
|
337
337
|
the ActiveSupport gem from the Rails git repository over ones from
|
|
338
338
|
rubygems.org
|
|
339
339
|
|
|
340
|
-
3. The sources specified
|
|
341
|
-
|
|
340
|
+
3. The sources specified via source, searching each source in your
|
|
341
|
+
Gemfile from last added to first added.
|
|
342
342
|
|
|
343
343
|
|
|
344
344
|
|
|
345
345
|
|
|
346
346
|
|
|
347
347
|
|
|
348
|
-
|
|
348
|
+
October 2011 GEMFILE(5)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require 'bundler/gem_helpers'
|
|
2
|
+
|
|
3
|
+
module Bundler
|
|
4
|
+
module MatchPlatform
|
|
5
|
+
include GemHelpers
|
|
6
|
+
|
|
7
|
+
def match_platform(p)
|
|
8
|
+
Gem::Platform::RUBY == platform or
|
|
9
|
+
platform.nil? or p == platform or
|
|
10
|
+
generic(Gem::Platform.new(platform)) == p
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|