shopify-bundler 1.10.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +96 -0
  5. data/.rubocop_todo.yml +177 -0
  6. data/.travis.yml +104 -0
  7. data/CHANGELOG.md +2131 -0
  8. data/CODE_OF_CONDUCT.md +42 -0
  9. data/CONTRIBUTING.md +32 -0
  10. data/DEVELOPMENT.md +118 -0
  11. data/ISSUES.md +96 -0
  12. data/LICENSE.md +23 -0
  13. data/README.md +40 -0
  14. data/Rakefile +309 -0
  15. data/bin/rake +14 -0
  16. data/bin/rspec +10 -0
  17. data/bin/rubocop +11 -0
  18. data/bundler.gemspec +34 -0
  19. data/exe/bundle +21 -0
  20. data/exe/bundle_ruby +60 -0
  21. data/exe/bundler +21 -0
  22. data/lib/bundler.rb +499 -0
  23. data/lib/bundler/capistrano.rb +16 -0
  24. data/lib/bundler/cli.rb +435 -0
  25. data/lib/bundler/cli/binstubs.rb +37 -0
  26. data/lib/bundler/cli/cache.rb +34 -0
  27. data/lib/bundler/cli/check.rb +37 -0
  28. data/lib/bundler/cli/clean.rb +25 -0
  29. data/lib/bundler/cli/common.rb +56 -0
  30. data/lib/bundler/cli/config.rb +88 -0
  31. data/lib/bundler/cli/console.rb +37 -0
  32. data/lib/bundler/cli/exec.rb +51 -0
  33. data/lib/bundler/cli/gem.rb +208 -0
  34. data/lib/bundler/cli/init.rb +32 -0
  35. data/lib/bundler/cli/inject.rb +32 -0
  36. data/lib/bundler/cli/install.rb +188 -0
  37. data/lib/bundler/cli/lock.rb +35 -0
  38. data/lib/bundler/cli/open.rb +22 -0
  39. data/lib/bundler/cli/outdated.rb +86 -0
  40. data/lib/bundler/cli/package.rb +45 -0
  41. data/lib/bundler/cli/platform.rb +42 -0
  42. data/lib/bundler/cli/show.rb +74 -0
  43. data/lib/bundler/cli/update.rb +72 -0
  44. data/lib/bundler/cli/viz.rb +26 -0
  45. data/lib/bundler/constants.rb +5 -0
  46. data/lib/bundler/current_ruby.rb +218 -0
  47. data/lib/bundler/definition.rb +675 -0
  48. data/lib/bundler/dep_proxy.rb +45 -0
  49. data/lib/bundler/dependency.rb +119 -0
  50. data/lib/bundler/deployment.rb +62 -0
  51. data/lib/bundler/deprecate.rb +17 -0
  52. data/lib/bundler/dsl.rb +478 -0
  53. data/lib/bundler/endpoint_specification.rb +100 -0
  54. data/lib/bundler/env.rb +82 -0
  55. data/lib/bundler/environment.rb +41 -0
  56. data/lib/bundler/fetcher.rb +288 -0
  57. data/lib/bundler/fetcher/base.rb +26 -0
  58. data/lib/bundler/fetcher/dependency.rb +88 -0
  59. data/lib/bundler/fetcher/downloader.rb +60 -0
  60. data/lib/bundler/fetcher/index.rb +32 -0
  61. data/lib/bundler/friendly_errors.rb +92 -0
  62. data/lib/bundler/gem_helper.rb +191 -0
  63. data/lib/bundler/gem_helpers.rb +26 -0
  64. data/lib/bundler/gem_installer.rb +9 -0
  65. data/lib/bundler/gem_path_manipulation.rb +8 -0
  66. data/lib/bundler/gem_tasks.rb +5 -0
  67. data/lib/bundler/graph.rb +173 -0
  68. data/lib/bundler/index.rb +199 -0
  69. data/lib/bundler/injector.rb +62 -0
  70. data/lib/bundler/inline.rb +58 -0
  71. data/lib/bundler/installer.rb +242 -0
  72. data/lib/bundler/installer/parallel_installer.rb +122 -0
  73. data/lib/bundler/installer/standalone.rb +48 -0
  74. data/lib/bundler/lazy_specification.rb +82 -0
  75. data/lib/bundler/lockfile_parser.rb +199 -0
  76. data/lib/bundler/match_platform.rb +13 -0
  77. data/lib/bundler/psyched_yaml.rb +26 -0
  78. data/lib/bundler/remote_specification.rb +82 -0
  79. data/lib/bundler/resolver.rb +350 -0
  80. data/lib/bundler/retry.rb +60 -0
  81. data/lib/bundler/ruby_dsl.rb +11 -0
  82. data/lib/bundler/ruby_version.rb +116 -0
  83. data/lib/bundler/rubygems_ext.rb +175 -0
  84. data/lib/bundler/rubygems_integration.rb +674 -0
  85. data/lib/bundler/runtime.rb +285 -0
  86. data/lib/bundler/settings.rb +263 -0
  87. data/lib/bundler/setup.rb +26 -0
  88. data/lib/bundler/shared_helpers.rb +176 -0
  89. data/lib/bundler/similarity_detector.rb +61 -0
  90. data/lib/bundler/source.rb +35 -0
  91. data/lib/bundler/source/git.rb +286 -0
  92. data/lib/bundler/source/git/git_proxy.rb +190 -0
  93. data/lib/bundler/source/path.rb +224 -0
  94. data/lib/bundler/source/path/installer.rb +43 -0
  95. data/lib/bundler/source/rubygems.rb +436 -0
  96. data/lib/bundler/source/rubygems/remote.rb +38 -0
  97. data/lib/bundler/source_list.rb +101 -0
  98. data/lib/bundler/spec_set.rb +156 -0
  99. data/lib/bundler/ssl_certs/.document +1 -0
  100. data/lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem +25 -0
  101. data/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem +32 -0
  102. data/lib/bundler/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem +14 -0
  103. data/lib/bundler/ssl_certs/DigiCertHighAssuranceEVRootCA.pem +23 -0
  104. data/lib/bundler/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem +28 -0
  105. data/lib/bundler/ssl_certs/GeoTrustGlobalCA.pem +20 -0
  106. data/lib/bundler/ssl_certs/certificate_manager.rb +64 -0
  107. data/lib/bundler/stub_specification.rb +23 -0
  108. data/lib/bundler/templates/Executable +16 -0
  109. data/lib/bundler/templates/Executable.standalone +12 -0
  110. data/lib/bundler/templates/Gemfile +4 -0
  111. data/lib/bundler/templates/newgem/.travis.yml.tt +4 -0
  112. data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +22 -0
  113. data/lib/bundler/templates/newgem/Gemfile.tt +4 -0
  114. data/lib/bundler/templates/newgem/LICENSE.txt.tt +21 -0
  115. data/lib/bundler/templates/newgem/README.md.tt +41 -0
  116. data/lib/bundler/templates/newgem/Rakefile.tt +29 -0
  117. data/lib/bundler/templates/newgem/bin/console.tt +14 -0
  118. data/lib/bundler/templates/newgem/bin/setup.tt +8 -0
  119. data/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
  120. data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +3 -0
  121. data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +9 -0
  122. data/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +6 -0
  123. data/lib/bundler/templates/newgem/gitignore.tt +16 -0
  124. data/lib/bundler/templates/newgem/lib/newgem.rb.tt +12 -0
  125. data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +7 -0
  126. data/lib/bundler/templates/newgem/newgem.gemspec.tt +43 -0
  127. data/lib/bundler/templates/newgem/rspec.tt +2 -0
  128. data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +11 -0
  129. data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -0
  130. data/lib/bundler/templates/newgem/test/newgem_test.rb.tt +11 -0
  131. data/lib/bundler/templates/newgem/test/test_helper.rb.tt +4 -0
  132. data/lib/bundler/ui.rb +7 -0
  133. data/lib/bundler/ui/rg_proxy.rb +17 -0
  134. data/lib/bundler/ui/shell.rb +108 -0
  135. data/lib/bundler/ui/silent.rb +44 -0
  136. data/lib/bundler/vendor/molinillo/lib/molinillo.rb +5 -0
  137. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +277 -0
  138. data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +69 -0
  139. data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +3 -0
  140. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +99 -0
  141. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +63 -0
  142. data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +434 -0
  143. data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +43 -0
  144. data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +51 -0
  145. data/lib/bundler/vendor/net/http/faster.rb +26 -0
  146. data/lib/bundler/vendor/net/http/persistent.rb +1230 -0
  147. data/lib/bundler/vendor/net/http/persistent/ssl_reuse.rb +128 -0
  148. data/lib/bundler/vendor/thor/lib/thor.rb +484 -0
  149. data/lib/bundler/vendor/thor/lib/thor/actions.rb +319 -0
  150. data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +103 -0
  151. data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +59 -0
  152. data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +118 -0
  153. data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +135 -0
  154. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +316 -0
  155. data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +107 -0
  156. data/lib/bundler/vendor/thor/lib/thor/base.rb +656 -0
  157. data/lib/bundler/vendor/thor/lib/thor/command.rb +133 -0
  158. data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +77 -0
  159. data/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +10 -0
  160. data/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +98 -0
  161. data/lib/bundler/vendor/thor/lib/thor/error.rb +32 -0
  162. data/lib/bundler/vendor/thor/lib/thor/group.rb +281 -0
  163. data/lib/bundler/vendor/thor/lib/thor/invocation.rb +178 -0
  164. data/lib/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
  165. data/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +35 -0
  166. data/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
  167. data/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -0
  168. data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +73 -0
  169. data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +175 -0
  170. data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +125 -0
  171. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +218 -0
  172. data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +71 -0
  173. data/lib/bundler/vendor/thor/lib/thor/runner.rb +322 -0
  174. data/lib/bundler/vendor/thor/lib/thor/shell.rb +81 -0
  175. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +421 -0
  176. data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +149 -0
  177. data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +126 -0
  178. data/lib/bundler/vendor/thor/lib/thor/util.rb +267 -0
  179. data/lib/bundler/vendor/thor/lib/thor/version.rb +3 -0
  180. data/lib/bundler/vendored_molinillo.rb +2 -0
  181. data/lib/bundler/vendored_persistent.rb +11 -0
  182. data/lib/bundler/vendored_thor.rb +3 -0
  183. data/lib/bundler/version.rb +6 -0
  184. data/lib/bundler/vlad.rb +11 -0
  185. data/lib/bundler/worker.rb +72 -0
  186. data/man/bundle-config.ronn +187 -0
  187. data/man/bundle-exec.ronn +136 -0
  188. data/man/bundle-gem.ronn +77 -0
  189. data/man/bundle-install.ronn +398 -0
  190. data/man/bundle-package.ronn +66 -0
  191. data/man/bundle-platform.ronn +42 -0
  192. data/man/bundle-update.ronn +188 -0
  193. data/man/bundle.ronn +98 -0
  194. data/man/gemfile.5.ronn +495 -0
  195. data/man/index.txt +8 -0
  196. metadata +346 -0
@@ -0,0 +1,398 @@
1
+ bundle-install(1) -- Install the dependencies specified in your Gemfile
2
+ =======================================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `bundle install` [--binstubs[=DIRECTORY]]
7
+ [--clean]
8
+ [--full-index]
9
+ [--gemfile=GEMFILE]
10
+ [--jobs=NUMBER]
11
+ [--local]
12
+ [--deployment]
13
+ [--force]
14
+ [--no-cache]
15
+ [--no-prune]
16
+ [--path PATH]
17
+ [--system]
18
+ [--quiet]
19
+ [--retry=NUMBER]
20
+ [--shebang]
21
+ [--standalone[=GROUP[ GROUP...]]]
22
+ [--trust-policy=POLICY]
23
+ [--without=GROUP[ GROUP...]]
24
+ [--with=GROUP[ GROUP...]]
25
+
26
+ ## DESCRIPTION
27
+
28
+ Install the gems specified in your Gemfile(5). If this is the first
29
+ time you run bundle install (and a `Gemfile.lock` does not exist),
30
+ Bundler will fetch all remote sources, resolve dependencies and
31
+ install all needed gems.
32
+
33
+ If a `Gemfile.lock` does exist, and you have not updated your Gemfile(5),
34
+ Bundler will fetch all remote sources, but use the dependencies
35
+ specified in the `Gemfile.lock` instead of resolving dependencies.
36
+
37
+ If a `Gemfile.lock` does exist, and you have updated your Gemfile(5),
38
+ Bundler will use the dependencies in the `Gemfile.lock` for all gems
39
+ that you did not update, but will re-resolve the dependencies of
40
+ gems that you did update. You can find more information about this
41
+ update process below under [CONSERVATIVE UPDATING][].
42
+
43
+ ## OPTIONS
44
+
45
+ * `--binstubs[=<directory>]`:
46
+ Creates a directory (defaults to `~/bin`) and place any executables from the
47
+ gem there. These executables run in Bundler's context. If used, you might add
48
+ this directory to your environment's `PATH` variable. For instance, if the
49
+ `rails` gem comes with a `rails` executable, this flag will create a
50
+ `bin/rails` executable that ensures that all referred dependencies will be
51
+ resolved using the bundled gems.
52
+
53
+ * `--clean`:
54
+ On finishing the installation Bundler is going to remove any gems not present
55
+ in the current Gemfile(5). Don't worry, gems currently in use will not be
56
+ removed.
57
+
58
+ * `--full-index`:
59
+ Bundler will not call Rubygems' API endpoint (default) but download and cache
60
+ a (currently big) index file of all gems. Performance can be improved for
61
+ large bundles that seldomly change by enabling this option.
62
+
63
+ * `--gemfile=<gemfile>`:
64
+ The location of the Gemfile(5) which Bundler should use. This defaults
65
+ to a Gemfile(5) in the current working directory. In general, Bundler
66
+ will assume that the location of the Gemfile(5) is also the project's
67
+ root and will try to find `Gemfile.lock` and `vendor/cache` relative
68
+ to this location.
69
+
70
+ * `--jobs=[<number>]`:
71
+ Install gems by starting <number> of workers parallely.
72
+
73
+ * `--local`:
74
+ Do not attempt to connect to `rubygems.org`. Instead, Bundler will use the
75
+ gems already present in Rubygems' cache or in `vendor/cache`. Note that if a
76
+ appropriate platform-specific gem exists on `rubygems.org` it will not be
77
+ found.
78
+
79
+ * `--deployment`:
80
+ In [deployment mode][DEPLOYMENT MODE], Bundler will 'roll-out' the bundle for
81
+ production or CI use. Please check carefully if you want to have this option
82
+ enabled in your development environment.
83
+
84
+ * `--force`:
85
+ Force download every gem, even if the required versions are already available
86
+ locally.
87
+
88
+ * `--system`:
89
+ Installs the gems specified in the bundle to the system's Rubygems location.
90
+ This overrides any previous [remembered][REMEMBERED OPTIONS] use of `--path`.
91
+
92
+ * `--no-cache`:
93
+ Do not update the cache in `vendor/cache` with the newly bundled gems. This
94
+ does not remove any gems in the cache but keeps the newly bundled gems from
95
+ being cached during the install.
96
+
97
+ * `--no-prune`:
98
+ Don't remove stale gems from the cache when the installation finishes.
99
+
100
+ * `--path=<path>`:
101
+ The location to install the specified gems to. This defaults to Rubygems'
102
+ setting. Bundler shares this location with Rubygems, `gem install ...` will
103
+ have gem installed there, too. Therefore, gems installed without a
104
+ `--path ...` setting will show up by calling `gem list`. Accodingly, gems
105
+ installed to other locations will not get listed. This setting is a
106
+ [remembered option][REMEMBERED OPTIONS].
107
+
108
+ * `--quiet`:
109
+ Do not print progress information to the standard output. Instead, Bundler
110
+ will exit using a status code (`$?`).
111
+
112
+ * `--retry=[<number>]`:
113
+ Retry failed network or git requests for <number> times.
114
+
115
+ * `--shebang=<ruby-executable>`:
116
+ Uses the specified ruby executable (usually `ruby`) to execute the scripts
117
+ created with `--binstubs`. In addition, if you use `--binstubs` together with
118
+ `--shebang jruby` these executables will be changed to execute `jruby`
119
+ instead.
120
+
121
+ * `--standalone[=<list>]`:
122
+ Makes a bundle that can work without depending on Rubygems or Bundler at
123
+ runtime. A space separated list of groups to install has to be specified.
124
+ Bundler creates a directory named `bundle` and installs the bundle there. It
125
+ also generates a `bundle/bundler/setup.rb` file to replace Bundler's own setup
126
+ in the manner required. Using this option implicitly sets `path`, which is a
127
+ [remembered option][REMEMBERED OPTIONS].
128
+
129
+ * `--trust-policy=[<policy>]`:
130
+ Apply the Rubygems security policy <policy>, where policy is one of
131
+ `HighSecurity`, `MediumSecurity`, `LowSecurity`, `AlmostNoSecurity`, or
132
+ `NoSecurity`. For more details, please see the Rubygems signing documentation
133
+ linked below in [SEE ALSO][].
134
+
135
+ * `--without=<list>`:
136
+ A space-separated list of groups referencing gems to skip during installation.
137
+ If a group is given that is in the remembered list of groups given
138
+ to --with, it is removed from that list.
139
+ This is a [remembered option][REMEMBERED OPTIONS].
140
+
141
+ * `--with=<list>`:
142
+ A space-separated list of groups referencing gems to install. If an
143
+ optional group is given it is installed. If a group is given that is
144
+ in the remembered list of groups given to --without, it is removed
145
+ from that list. This is a [remembered option][REMEMBERED OPTIONS].
146
+
147
+
148
+ ## DEPLOYMENT MODE
149
+
150
+ Bundler's defaults are optimized for development. To switch to
151
+ defaults optimized for deployment and for CI, use the `--deployment`
152
+ flag. Do not activate deployment mode on development machines, as it
153
+ will cause an error when the Gemfile(5) is modified.
154
+
155
+ 1. A `Gemfile.lock` is required.
156
+
157
+ To ensure that the same versions of the gems you developed with
158
+ and tested with are also used in deployments, a `Gemfile.lock`
159
+ is required.
160
+
161
+ This is mainly to ensure that you remember to check your
162
+ `Gemfile.lock` into version control.
163
+
164
+ 2. The `Gemfile.lock` must be up to date
165
+
166
+ In development, you can modify your Gemfile(5) and re-run
167
+ `bundle install` to [conservatively update][CONSERVATIVE UPDATING]
168
+ your `Gemfile.lock` snapshot.
169
+
170
+ In deployment, your `Gemfile.lock` should be up-to-date with
171
+ changes made in your Gemfile(5).
172
+
173
+ 3. Gems are installed to `vendor/bundle` not your default system location
174
+
175
+ In development, it's convenient to share the gems used in your
176
+ application with other applications and other scripts run on
177
+ the system.
178
+
179
+ In deployment, isolation is a more important default. In addition,
180
+ the user deploying the application may not have permission to install
181
+ gems to the system, or the web server may not have permission to
182
+ read them.
183
+
184
+ As a result, `bundle install --deployment` installs gems to
185
+ the `vendor/bundle` directory in the application. This may be
186
+ overridden using the `--path` option.
187
+
188
+ ## SUDO USAGE
189
+
190
+ By default, Bundler installs gems to the same location as `gem install`.
191
+
192
+ In some cases, that location may not be writable by your Unix user. In
193
+ that case, Bundler will stage everything in a temporary directory,
194
+ then ask you for your `sudo` password in order to copy the gems into
195
+ their system location.
196
+
197
+ From your perspective, this is identical to installing them gems
198
+ directly into the system.
199
+
200
+ You should never use `sudo bundle install`. This is because several
201
+ other steps in `bundle install` must be performed as the current user:
202
+
203
+ * Updating your `Gemfile.lock`
204
+ * Updating your `vendor/cache`, if necessary
205
+ * Checking out private git repositories using your user's SSH keys
206
+
207
+ Of these three, the first two could theoretically be performed by
208
+ `chown`ing the resulting files to `$SUDO_USER`. The third, however,
209
+ can only be performed by actually invoking the `git` command as
210
+ the current user. Therefore, git gems are downloaded and installed
211
+ into `~/.bundle` rather than $GEM_HOME or $BUNDLE_PATH.
212
+
213
+ As a result, you should run `bundle install` as the current user,
214
+ and Bundler will ask for your password if it is needed to put the
215
+ gems into their final location.
216
+
217
+ ## INSTALLING GROUPS
218
+
219
+ By default, `bundle install` will install all gems in all groups
220
+ in your Gemfile(5), except those declared for a different platform.
221
+
222
+ However, you can explicitly tell Bundler to skip installing
223
+ certain groups with the `--without` option. This option takes
224
+ a space-separated list of groups.
225
+
226
+ While the `--without` option will skip _installing_ the gems in the
227
+ specified groups, it will still _download_ those gems and use them to
228
+ resolve the dependencies of every gem in your Gemfile(5).
229
+
230
+ This is so that installing a different set of groups on another
231
+ machine (such as a production server) will not change the
232
+ gems and versions that you have already developed and tested against.
233
+
234
+ `Bundler offers a rock-solid guarantee that the third-party
235
+ code you are running in development and testing is also the
236
+ third-party code you are running in production. You can choose
237
+ to exclude some of that code in different environments, but you
238
+ will never be caught flat-footed by different versions of
239
+ third-party code being used in different environments.`
240
+
241
+ For a simple illustration, consider the following Gemfile(5):
242
+
243
+ source 'https://rubygems.org'
244
+
245
+ gem 'sinatra'
246
+
247
+ group :production do
248
+ gem 'rack-perftools-profiler'
249
+ end
250
+
251
+ In this case, `sinatra` depends on any version of Rack (`>= 1.0`), while
252
+ `rack-perftools-profiler` depends on 1.x (`~> 1.0`).
253
+
254
+ When you run `bundle install --without production` in development, we
255
+ look at the dependencies of `rack-perftools-profiler` as well. That way,
256
+ you do not spend all your time developing against Rack 2.0, using new
257
+ APIs unavailable in Rack 1.x, only to have Bundler switch to Rack 1.2
258
+ when the `production` group _is_ used.
259
+
260
+ This should not cause any problems in practice, because we do not
261
+ attempt to `install` the gems in the excluded groups, and only evaluate
262
+ as part of the dependency resolution process.
263
+
264
+ This also means that you cannot include different versions of the same
265
+ gem in different groups, because doing so would result in different
266
+ sets of dependencies used in development and production. Because of
267
+ the vagaries of the dependency resolution process, this usually
268
+ affects more than just the gems you list in your Gemfile(5), and can
269
+ (surprisingly) radically change the gems you are using.
270
+
271
+ ## REMEMBERED OPTIONS
272
+
273
+ Some options (marked above in the [OPTIONS][] section) are remembered
274
+ between calls to `bundle install`, and by the Bundler runtime.
275
+
276
+ For instance, if you run `bundle install --without test`, a subsequent
277
+ call to `bundle install` that does not include a `--without` flag will
278
+ remember your previous choice.
279
+
280
+ In addition, a call to `Bundler.setup` will not attempt to make the
281
+ gems in those groups available on the Ruby load path, as they were
282
+ not installed.
283
+
284
+ The settings that are remembered are:
285
+
286
+ * `--deployment`:
287
+ At runtime, this remembered setting will also result in Bundler
288
+ raising an exception if the `Gemfile.lock` is out of date.
289
+
290
+ * `--path`:
291
+ Subsequent calls to `bundle install` will install gems to the
292
+ directory originally passed to `--path`. The Bundler runtime
293
+ will look for gems in that location. You can revert this
294
+ option by running `bundle install --system`.
295
+
296
+ * `--binstubs`:
297
+ Bundler will update the executables every subsequent call to
298
+ `bundle install`.
299
+
300
+ * `--without`:
301
+ As described above, Bundler will skip the gems specified by
302
+ `--without` in subsequent calls to `bundle install`. The
303
+ Bundler runtime will also not try to make the gems in the
304
+ skipped groups available.
305
+
306
+ ## THE GEMFILE.LOCK
307
+
308
+ When you run `bundle install`, Bundler will persist the full names
309
+ and versions of all gems that you used (including dependencies of
310
+ the gems specified in the Gemfile(5)) into a file called `Gemfile.lock`.
311
+
312
+ Bundler uses this file in all subsequent calls to `bundle install`,
313
+ which guarantees that you always use the same exact code, even
314
+ as your application moves across machines.
315
+
316
+ Because of the way dependency resolution works, even a
317
+ seemingly small change (for instance, an update to a point-release
318
+ of a dependency of a gem in your Gemfile(5)) can result in radically
319
+ different gems being needed to satisfy all dependencies.
320
+
321
+ As a result, you `SHOULD` check your `Gemfile.lock` into version
322
+ control. If you do not, every machine that checks out your
323
+ repository (including your production server) will resolve all
324
+ dependencies again, which will result in different versions of
325
+ third-party code being used if `any` of the gems in the Gemfile(5)
326
+ or any of their dependencies have been updated.
327
+
328
+ ## CONSERVATIVE UPDATING
329
+
330
+ When you make a change to the Gemfile(5) and then run `bundle install`,
331
+ Bundler will update only the gems that you modified.
332
+
333
+ In other words, if a gem that you `did not modify` worked before
334
+ you called `bundle install`, it will continue to use the exact
335
+ same versions of all dependencies as it used before the update.
336
+
337
+ Let's take a look at an example. Here's your original Gemfile(5):
338
+
339
+ source 'https://rubygems.org'
340
+
341
+ gem 'actionpack', '2.3.8'
342
+ gem 'activemerchant'
343
+
344
+ In this case, both `actionpack` and `activemerchant` depend on
345
+ `activesupport`. The `actionpack` gem depends on `activesupport 2.3.8`
346
+ and `rack ~> 1.1.0`, while the `activemerchant` gem depends on
347
+ `activesupport >= 2.3.2`, `braintree >= 2.0.0`, and `builder >= 2.0.0`.
348
+
349
+ When the dependencies are first resolved, Bundler will select
350
+ `activesupport 2.3.8`, which satisfies the requirements of both
351
+ gems in your Gemfile(5).
352
+
353
+ Next, you modify your Gemfile(5) to:
354
+
355
+ source 'https://rubygems.org'
356
+
357
+ gem 'actionpack', '3.0.0.rc'
358
+ gem 'activemerchant'
359
+
360
+ The `actionpack 3.0.0.rc` gem has a number of new dependencies,
361
+ and updates the `activesupport` dependency to `= 3.0.0.rc` and
362
+ the `rack` dependency to `~> 1.2.1`.
363
+
364
+ When you run `bundle install`, Bundler notices that you changed
365
+ the `actionpack` gem, but not the `activemerchant` gem. It
366
+ evaluates the gems currently being used to satisfy its requirements:
367
+
368
+ * `activesupport 2.3.8`:
369
+ also used to satisfy a dependency in `activemerchant`,
370
+ which is not being updated
371
+ * `rack ~> 1.1.0`:
372
+ not currently being used to satisfy another dependency
373
+
374
+ Because you did not explicitly ask to update `activemerchant`,
375
+ you would not expect it to suddenly stop working after updating
376
+ `actionpack`. However, satisfying the new `activesupport 3.0.0.rc`
377
+ dependency of actionpack requires updating one of its dependencies.
378
+
379
+ Even though `activemerchant` declares a very loose dependency
380
+ that theoretically matches `activesupport 3.0.0.rc`, Bundler treats
381
+ gems in your Gemfile(5) that have not changed as an atomic unit
382
+ together with their dependencies. In this case, the `activemerchant`
383
+ dependency is treated as `activemerchant 1.7.1 + activesupport 2.3.8`,
384
+ so `bundle install` will report that it cannot update `actionpack`.
385
+
386
+ To explicitly update `actionpack`, including its dependencies
387
+ which other gems in the Gemfile(5) still depend on, run
388
+ `bundle update actionpack` (see `bundle update(1)`).
389
+
390
+ `Summary`: In general, after making a change to the Gemfile(5) , you
391
+ should first try to run `bundle install`, which will guarantee that no
392
+ other gems in the Gemfile(5) are impacted by the change. If that
393
+ does not work, run [bundle update(1)][bundle-update].
394
+
395
+ ## SEE ALSO
396
+
397
+ * Gem install docs: http://guides.rubygems.org/rubygems-basics/#installing-gems
398
+ * Rubygems signing docs: http://guides.rubygems.org/security/
@@ -0,0 +1,66 @@
1
+ bundle-package(1) -- Package your needed `.gem` files into your application
2
+ ===========================================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `bundle package`
7
+
8
+ ## DESCRIPTION
9
+
10
+ Copy all of the `.gem` files needed to run the application into the
11
+ `vendor/cache` directory. In the future, when running [bundle install(1)][bundle-install],
12
+ use the gems in the cache in preference to the ones on `rubygems.org`.
13
+
14
+ ## GIT AND PATH GEMS
15
+
16
+ Since Bundler 1.2, the `bundle package` command can also package `:git` and
17
+ `:path` dependencies besides .gem files. This needs to be explicitly enabled
18
+ via the `--all` option. Once used, the `--all` option will be remembered.
19
+
20
+ ## SUPPORT FOR MULTIPLE PLATFORMS
21
+
22
+ When using gems that have different packages for different platforms, Bundler
23
+ 1.8 and newer support caching of gems for other platforms in `vendor/cache`.
24
+ This needs to be enabled via the `--all-platforms` option. This setting will be
25
+ remembered in your local bundler configuration.
26
+
27
+ ## REMOTE FETCHING
28
+
29
+ By default, if you simply run [bundle install(1)][bundle-install] after running
30
+ [bundle package(1)][bundle-package], bundler will still connect to `rubygems.org`
31
+ to check whether a platform-specific gem exists for any of the gems
32
+ in `vendor/cache`.
33
+
34
+ For instance, consider this Gemfile(5):
35
+
36
+ source "https://rubygems.org"
37
+
38
+ gem "nokogiri"
39
+
40
+ If you run `bundle package` under C Ruby, bundler will retrieve
41
+ the version of `nokogiri` for the `"ruby"` platform. If you deploy
42
+ to JRuby and run `bundle install`, bundler is forced to check to
43
+ see whether a `"java"` platformed `nokogiri` exists.
44
+
45
+ Even though the `nokogiri` gem for the Ruby platform is
46
+ _technically_ acceptable on JRuby, it actually has a C extension
47
+ that does not run on JRuby. As a result, bundler will, by default,
48
+ still connect to `rubygems.org` to check whether it has a version
49
+ of one of your gems more specific to your platform.
50
+
51
+ This problem is also not just limited to the `"java"` platform.
52
+ A similar (common) problem can happen when developing on Windows
53
+ and deploying to Linux, or even when developing on OSX and
54
+ deploying to Linux.
55
+
56
+ If you know for sure that the gems packaged in `vendor/cache`
57
+ are appropriate for the platform you are on, you can run
58
+ `bundle install --local` to skip checking for more appropriate
59
+ gems, and just use the ones in `vendor/cache`.
60
+
61
+ One way to be sure that you have the right platformed versions
62
+ of all your gems is to run `bundle package` on an identical
63
+ machine and check in the gems. For instance, you can run
64
+ `bundle package` on an identical staging box during your
65
+ staging process, and check in the `vendor/cache` before
66
+ deploying to production.