bundler 2.4.21 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +74 -0
  3. data/README.md +1 -2
  4. data/bundler.gemspec +4 -2
  5. data/exe/bundle +1 -10
  6. data/lib/bundler/build_metadata.rb +3 -3
  7. data/lib/bundler/capistrano.rb +1 -1
  8. data/lib/bundler/checksum.rb +245 -0
  9. data/lib/bundler/ci_detector.rb +75 -0
  10. data/lib/bundler/cli/add.rb +3 -3
  11. data/lib/bundler/cli/binstubs.rb +4 -4
  12. data/lib/bundler/cli/cache.rb +1 -1
  13. data/lib/bundler/cli/check.rb +1 -1
  14. data/lib/bundler/cli/common.rb +9 -1
  15. data/lib/bundler/cli/config.rb +8 -7
  16. data/lib/bundler/cli/console.rb +3 -2
  17. data/lib/bundler/cli/doctor.rb +2 -2
  18. data/lib/bundler/cli/exec.rb +1 -1
  19. data/lib/bundler/cli/gem.rb +31 -23
  20. data/lib/bundler/cli/info.rb +2 -13
  21. data/lib/bundler/cli/install.rb +5 -4
  22. data/lib/bundler/cli/issue.rb +1 -1
  23. data/lib/bundler/cli/lock.rb +4 -4
  24. data/lib/bundler/cli/open.rb +1 -1
  25. data/lib/bundler/cli/outdated.rb +6 -6
  26. data/lib/bundler/cli/plugin.rb +7 -14
  27. data/lib/bundler/cli/pristine.rb +38 -30
  28. data/lib/bundler/cli/show.rb +2 -2
  29. data/lib/bundler/cli/update.rb +5 -5
  30. data/lib/bundler/cli.rb +215 -263
  31. data/lib/bundler/compact_index_client/cache.rb +29 -9
  32. data/lib/bundler/compact_index_client/cache_file.rb +153 -0
  33. data/lib/bundler/compact_index_client/gem_parser.rb +7 -3
  34. data/lib/bundler/compact_index_client/updater.rb +79 -81
  35. data/lib/bundler/compact_index_client.rb +14 -7
  36. data/lib/bundler/constants.rb +1 -1
  37. data/lib/bundler/current_ruby.rb +5 -21
  38. data/lib/bundler/definition.rb +43 -16
  39. data/lib/bundler/dependency.rb +16 -12
  40. data/lib/bundler/digest.rb +2 -2
  41. data/lib/bundler/dsl.rb +43 -25
  42. data/lib/bundler/endpoint_specification.rb +6 -2
  43. data/lib/bundler/env.rb +1 -3
  44. data/lib/bundler/errors.rb +58 -0
  45. data/lib/bundler/fetcher/base.rb +3 -1
  46. data/lib/bundler/fetcher/compact_index.rb +4 -4
  47. data/lib/bundler/fetcher/downloader.rb +13 -11
  48. data/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
  49. data/lib/bundler/fetcher/index.rb +1 -1
  50. data/lib/bundler/fetcher.rb +28 -25
  51. data/lib/bundler/friendly_errors.rb +5 -5
  52. data/lib/bundler/gem_helper.rb +1 -1
  53. data/lib/bundler/gem_helpers.rb +12 -2
  54. data/lib/bundler/graph.rb +9 -9
  55. data/lib/bundler/index.rb +1 -2
  56. data/lib/bundler/injector.rb +1 -1
  57. data/lib/bundler/inline.rb +3 -3
  58. data/lib/bundler/installer/gem_installer.rb +10 -10
  59. data/lib/bundler/installer/parallel_installer.rb +16 -8
  60. data/lib/bundler/installer/standalone.rb +2 -3
  61. data/lib/bundler/installer.rb +9 -9
  62. data/lib/bundler/lazy_specification.rb +28 -17
  63. data/lib/bundler/lockfile_generator.rb +9 -0
  64. data/lib/bundler/lockfile_parser.rb +81 -10
  65. data/lib/bundler/man/bundle-add.1 +3 -26
  66. data/lib/bundler/man/bundle-binstubs.1 +4 -16
  67. data/lib/bundler/man/bundle-cache.1 +3 -24
  68. data/lib/bundler/man/bundle-check.1 +3 -12
  69. data/lib/bundler/man/bundle-clean.1 +3 -10
  70. data/lib/bundler/man/bundle-config.1 +20 -211
  71. data/lib/bundler/man/bundle-config.1.ronn +6 -0
  72. data/lib/bundler/man/bundle-console.1 +4 -22
  73. data/lib/bundler/man/bundle-doctor.1 +4 -18
  74. data/lib/bundler/man/bundle-exec.1 +12 -73
  75. data/lib/bundler/man/bundle-gem.1 +13 -49
  76. data/lib/bundler/man/bundle-help.1 +3 -7
  77. data/lib/bundler/man/bundle-info.1 +3 -9
  78. data/lib/bundler/man/bundle-init.1 +3 -12
  79. data/lib/bundler/man/bundle-inject.1 +6 -19
  80. data/lib/bundler/man/bundle-install.1 +27 -125
  81. data/lib/bundler/man/bundle-install.1.ronn +1 -0
  82. data/lib/bundler/man/bundle-list.1 +4 -19
  83. data/lib/bundler/man/bundle-lock.1 +5 -29
  84. data/lib/bundler/man/bundle-open.1 +7 -27
  85. data/lib/bundler/man/bundle-outdated.1 +3 -55
  86. data/lib/bundler/man/bundle-outdated.1.ronn +1 -0
  87. data/lib/bundler/man/bundle-platform.1 +5 -27
  88. data/lib/bundler/man/bundle-plugin.1 +3 -29
  89. data/lib/bundler/man/bundle-pristine.1 +5 -16
  90. data/lib/bundler/man/bundle-remove.1 +4 -14
  91. data/lib/bundler/man/bundle-show.1 +3 -10
  92. data/lib/bundler/man/bundle-update.1 +18 -137
  93. data/lib/bundler/man/bundle-version.1 +3 -16
  94. data/lib/bundler/man/bundle-viz.1 +4 -16
  95. data/lib/bundler/man/bundle.1 +5 -44
  96. data/lib/bundler/man/gemfile.5 +24 -301
  97. data/lib/bundler/man/gemfile.5.ronn +4 -0
  98. data/lib/bundler/match_metadata.rb +4 -0
  99. data/lib/bundler/match_platform.rb +1 -1
  100. data/lib/bundler/plugin/api/source.rb +3 -2
  101. data/lib/bundler/plugin/index.rb +8 -0
  102. data/lib/bundler/plugin/installer.rb +1 -1
  103. data/lib/bundler/plugin.rb +12 -5
  104. data/lib/bundler/resolver/base.rb +1 -1
  105. data/lib/bundler/resolver/incompatibility.rb +1 -1
  106. data/lib/bundler/resolver/spec_group.rb +1 -4
  107. data/lib/bundler/resolver.rb +16 -16
  108. data/lib/bundler/ruby_dsl.rb +20 -12
  109. data/lib/bundler/ruby_version.rb +1 -1
  110. data/lib/bundler/rubygems_ext.rb +27 -54
  111. data/lib/bundler/rubygems_gem_installer.rb +23 -58
  112. data/lib/bundler/rubygems_integration.rb +25 -94
  113. data/lib/bundler/runtime.rb +2 -2
  114. data/lib/bundler/self_manager.rb +23 -7
  115. data/lib/bundler/settings.rb +27 -7
  116. data/lib/bundler/setup.rb +4 -1
  117. data/lib/bundler/shared_helpers.rb +35 -13
  118. data/lib/bundler/source/git/git_proxy.rb +22 -14
  119. data/lib/bundler/source/git.rb +4 -3
  120. data/lib/bundler/source/metadata.rb +16 -16
  121. data/lib/bundler/source/path.rb +7 -6
  122. data/lib/bundler/source/rubygems.rb +21 -14
  123. data/lib/bundler/source.rb +2 -0
  124. data/lib/bundler/spec_set.rb +43 -12
  125. data/lib/bundler/stub_specification.rb +1 -0
  126. data/lib/bundler/templates/Executable.bundler +1 -1
  127. data/lib/bundler/templates/newgem/README.md.tt +3 -3
  128. data/lib/bundler/templates/newgem/Rakefile.tt +2 -6
  129. data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
  130. data/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
  131. data/lib/bundler/templates/newgem/standard.yml.tt +1 -1
  132. data/lib/bundler/ui/shell.rb +2 -2
  133. data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  134. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +53 -6
  135. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +8 -20
  136. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +4 -3
  137. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +23 -11
  138. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +1 -1
  139. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +36 -36
  140. data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +3 -2
  141. data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +1 -1
  142. data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +1 -1
  143. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +8 -10
  144. data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +15 -4
  145. data/lib/bundler/vendor/thor/lib/thor/actions.rb +15 -15
  146. data/lib/bundler/vendor/thor/lib/thor/base.rb +140 -14
  147. data/lib/bundler/vendor/thor/lib/thor/command.rb +13 -4
  148. data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +4 -0
  149. data/lib/bundler/vendor/thor/lib/thor/error.rb +16 -25
  150. data/lib/bundler/vendor/thor/lib/thor/group.rb +1 -1
  151. data/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -1
  152. data/lib/bundler/vendor/thor/lib/thor/nested_context.rb +2 -2
  153. data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +20 -1
  154. data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +33 -17
  155. data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +27 -8
  156. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +44 -6
  157. data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +2 -2
  158. data/lib/bundler/vendor/thor/lib/thor/runner.rb +40 -30
  159. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +26 -150
  160. data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +4 -46
  161. data/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
  162. data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +3 -45
  163. data/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb +49 -0
  164. data/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +134 -0
  165. data/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
  166. data/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
  167. data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
  168. data/lib/bundler/vendor/thor/lib/thor/util.rb +8 -7
  169. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  170. data/lib/bundler/vendor/thor/lib/thor.rb +155 -8
  171. data/lib/bundler/vendor/tsort/lib/tsort.rb +3 -0
  172. data/lib/bundler/vendor/uri/lib/uri/common.rb +256 -132
  173. data/lib/bundler/vendor/uri/lib/uri/generic.rb +1 -0
  174. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +95 -31
  175. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  176. data/lib/bundler/vendored_net_http.rb +8 -0
  177. data/lib/bundler/vendored_persistent.rb +0 -4
  178. data/lib/bundler/vendored_timeout.rb +8 -0
  179. data/lib/bundler/version.rb +1 -1
  180. data/lib/bundler/vlad.rb +1 -1
  181. data/lib/bundler/yaml_serializer.rb +9 -4
  182. data/lib/bundler.rb +38 -35
  183. metadata +16 -5
@@ -1,239 +1,143 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "GEMFILE" "5" "October 2023" "" ""
5
- .
1
+ .\" generated with nRonn/v0.11.1
2
+ .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
+ .TH "GEMFILE" "5" "December 2023" ""
6
4
  .SH "NAME"
7
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
8
- .
9
6
  .SH "SYNOPSIS"
10
7
  A \fBGemfile\fR describes the gem dependencies required to execute associated Ruby code\.
11
- .
12
8
  .P
13
9
  Place the \fBGemfile\fR in the root of the directory containing the associated code\. For instance, in a Rails application, place the \fBGemfile\fR in the same directory as the \fBRakefile\fR\.
14
- .
15
10
  .SH "SYNTAX"
16
11
  A \fBGemfile\fR is evaluated as Ruby code, in a context which makes available a number of methods used to describe the gem requirements\.
17
- .
18
12
  .SH "GLOBAL SOURCE"
19
13
  At the top of the \fBGemfile\fR, add a single line for the \fBRubyGems\fR source that contains the gems listed in the \fBGemfile\fR\.
20
- .
21
14
  .IP "" 4
22
- .
23
15
  .nf
24
-
25
16
  source "https://rubygems\.org"
26
- .
27
17
  .fi
28
- .
29
18
  .IP "" 0
30
- .
31
19
  .P
32
20
  You can add only one global source\. In Bundler 1\.13, adding multiple global sources was deprecated\. The \fBsource\fR \fBMUST\fR be a valid RubyGems repository\.
33
- .
34
21
  .P
35
22
  To use more than one source of RubyGems, you should use \fI\fBsource\fR block\fR\.
36
- .
37
23
  .P
38
24
  A source is checked for gems following the heuristics described in \fISOURCE PRIORITY\fR\.
39
- .
40
25
  .P
41
26
  \fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: If a gem is found in more than one global source, Bundler will print a warning after installing the gem indicating which source was used, and listing the other sources where the gem is available\. A specific source can be selected for gems that need to use a non\-standard repository, suppressing this warning, by using the \fI\fB:source\fR option\fR or \fBsource\fR block\.
42
- .
43
27
  .SS "CREDENTIALS"
44
28
  Some gem sources require a username and password\. Use bundle config(1) \fIbundle\-config\.1\.html\fR to set the username and password for any of the sources that need it\. The command must be run once on each computer that will install the Gemfile, but this keeps the credentials from being stored in plain text in version control\.
45
- .
46
29
  .IP "" 4
47
- .
48
30
  .nf
49
-
50
31
  bundle config gems\.example\.com user:password
51
- .
52
32
  .fi
53
- .
54
33
  .IP "" 0
55
- .
56
34
  .P
57
35
  For some sources, like a company Gemfury account, it may be easier to include the credentials in the Gemfile as part of the source URL\.
58
- .
59
36
  .IP "" 4
60
- .
61
37
  .nf
62
-
63
38
  source "https://user:password@gems\.example\.com"
64
- .
65
39
  .fi
66
- .
67
40
  .IP "" 0
68
- .
69
41
  .P
70
42
  Credentials in the source URL will take precedence over credentials set using \fBconfig\fR\.
71
- .
72
43
  .SH "RUBY"
73
44
  If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
74
- .
75
45
  .SS "VERSION (required)"
76
46
  The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc\., this should be the Ruby version that the engine is compatible with\.
77
- .
78
47
  .IP "" 4
79
- .
80
48
  .nf
81
-
82
49
  ruby "3\.1\.2"
83
- .
84
50
  .fi
85
- .
86
51
  .IP "" 0
87
- .
88
52
  .P
89
53
  If you wish to derive your Ruby version from a version file (ie \.ruby\-version), you can use the \fBfile\fR option instead\.
90
- .
91
54
  .IP "" 4
92
- .
93
55
  .nf
94
-
95
56
  ruby file: "\.ruby\-version"
96
- .
97
57
  .fi
98
- .
99
58
  .IP "" 0
100
- .
101
59
  .P
102
60
  The version file should conform to any of the following formats:
103
- .
104
61
  .IP "\(bu" 4
105
62
  \fB3\.1\.2\fR (\.ruby\-version)
106
- .
107
63
  .IP "\(bu" 4
108
64
  \fBruby 3\.1\.2\fR (\.tool\-versions, read: https://asdf\-vm\.com/manage/configuration\.html#tool\-versions)
109
- .
110
65
  .IP "" 0
111
- .
112
66
  .SS "ENGINE"
113
67
  Each application \fImay\fR specify a Ruby engine\. If an engine is specified, an engine version \fImust\fR also be specified\.
114
- .
115
68
  .P
116
- What exactly is an Engine? \- A Ruby engine is an implementation of the Ruby language\.
117
- .
69
+ What exactly is an Engine?
118
70
  .IP "\(bu" 4
119
- For background: the reference or original implementation of the Ruby programming language is called Matz\'s Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\.
120
- .
71
+ A Ruby engine is an implementation of the Ruby language\.
72
+ .IP "\(bu" 4
73
+ For background: the reference or original implementation of the Ruby programming language is called Matz's Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\.
121
74
  .IP "\(bu" 4
122
75
  Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttp://jruby\.org/\fR and TruffleRuby \fIhttps://www\.graalvm\.org/ruby/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM\.
123
- .
124
76
  .IP "" 0
125
- .
126
77
  .SS "ENGINE VERSION"
127
78
  Each application \fImay\fR specify a Ruby engine version\. If an engine version is specified, an engine \fImust\fR also be specified\. If the engine is "ruby" the engine version specified \fImust\fR match the Ruby version\.
128
- .
129
79
  .IP "" 4
130
- .
131
80
  .nf
132
-
133
81
  ruby "2\.6\.8", engine: "jruby", engine_version: "9\.3\.8\.0"
134
- .
135
82
  .fi
136
- .
137
83
  .IP "" 0
138
- .
139
84
  .SS "PATCHLEVEL"
140
85
  Each application \fImay\fR specify a Ruby patchlevel\. Specifying the patchlevel has been meaningless since Ruby 2\.1\.0 was released as the patchlevel is now uniquely determined by a combination of major, minor, and teeny version numbers\.
141
- .
142
86
  .P
143
87
  This option was implemented in Bundler 1\.4\.0 for Ruby 2\.0 or earlier\.
144
- .
145
88
  .IP "" 4
146
- .
147
89
  .nf
148
-
149
90
  ruby "3\.1\.2", patchlevel: "20"
150
- .
151
91
  .fi
152
- .
153
92
  .IP "" 0
154
- .
155
93
  .SH "GEMS"
156
94
  Specify gem requirements using the \fBgem\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
157
- .
158
95
  .SS "NAME (required)"
159
96
  For each gem requirement, list a single \fIgem\fR line\.
160
- .
161
97
  .IP "" 4
162
- .
163
98
  .nf
164
-
165
99
  gem "nokogiri"
166
- .
167
100
  .fi
168
- .
169
101
  .IP "" 0
170
- .
171
102
  .SS "VERSION"
172
103
  Each \fIgem\fR \fBMAY\fR have one or more version specifiers\.
173
- .
174
104
  .IP "" 4
175
- .
176
105
  .nf
177
-
178
106
  gem "nokogiri", ">= 1\.4\.2"
179
107
  gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
180
- .
181
108
  .fi
182
- .
183
109
  .IP "" 0
184
- .
185
110
  .SS "REQUIRE AS"
186
111
  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 \fBtrue\fR if the file you want \fBrequired\fR has the same name as \fIgem\fR or \fBfalse\fR to prevent any file from being autorequired\.
187
- .
188
112
  .IP "" 4
189
- .
190
113
  .nf
191
-
192
114
  gem "redis", require: ["redis/connection/hiredis", "redis"]
193
115
  gem "webmock", require: false
194
116
  gem "byebug", require: true
195
- .
196
117
  .fi
197
- .
198
118
  .IP "" 0
199
- .
200
119
  .P
201
120
  The argument defaults to the name of the gem\. For example, these are identical:
202
- .
203
121
  .IP "" 4
204
- .
205
122
  .nf
206
-
207
123
  gem "nokogiri"
208
124
  gem "nokogiri", require: "nokogiri"
209
125
  gem "nokogiri", require: true
210
- .
211
126
  .fi
212
- .
213
127
  .IP "" 0
214
- .
215
128
  .SS "GROUPS"
216
129
  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\.
217
- .
218
130
  .IP "" 4
219
- .
220
131
  .nf
221
-
222
132
  gem "rspec", group: :test
223
133
  gem "wirble", groups: [:development, :test]
224
- .
225
134
  .fi
226
- .
227
135
  .IP "" 0
228
- .
229
136
  .P
230
137
  The Bundler runtime allows its two main methods, \fBBundler\.setup\fR and \fBBundler\.require\fR, to limit their impact to particular groups\.
231
- .
232
138
  .IP "" 4
233
- .
234
139
  .nf
235
-
236
- # setup adds gems to Ruby\'s load path
140
+ # setup adds gems to Ruby's load path
237
141
  Bundler\.setup # defaults to all groups
238
142
  require "bundler/setup" # same as Bundler\.setup
239
143
  Bundler\.setup(:default) # only set up the _default_ group
@@ -245,429 +149,269 @@ Bundler\.require # defaults to the _default_ group
245
149
  Bundler\.require(:default) # identical
246
150
  Bundler\.require(:default, :test) # requires the _default_ and _test_ groups
247
151
  Bundler\.require(:test) # requires the _test_ group
248
- .
249
152
  .fi
250
- .
251
153
  .IP "" 0
252
- .
253
154
  .P
254
155
  The Bundler CLI allows you to specify a list of groups whose gems \fBbundle install\fR should not install with the \fBwithout\fR configuration\.
255
- .
256
156
  .P
257
157
  To specify multiple groups to ignore, specify a list of groups separated by spaces\.
258
- .
259
158
  .IP "" 4
260
- .
261
159
  .nf
262
-
263
160
  bundle config set \-\-local without test
264
161
  bundle config set \-\-local without development test
265
- .
266
162
  .fi
267
- .
268
163
  .IP "" 0
269
- .
270
164
  .P
271
165
  Also, calling \fBBundler\.setup\fR with no parameters, or calling \fBrequire "bundler/setup"\fR will setup all groups except for the ones you excluded via \fB\-\-without\fR (since they are not available)\.
272
- .
273
166
  .P
274
167
  Note that on \fBbundle install\fR, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies\. This means that you cannot list different versions of the same gems in different groups\. For more details, see Understanding Bundler \fIhttps://bundler\.io/rationale\.html\fR\.
275
- .
276
168
  .SS "PLATFORMS"
277
169
  If a gem should only be used in a particular platform or set of platforms, you can specify them\. Platforms are essentially identical to groups, except that you do not need to use the \fB\-\-without\fR install\-time flag to exclude groups of gems for other platforms\.
278
- .
279
170
  .P
280
171
  There are a number of \fBGemfile\fR platforms:
281
- .
282
172
  .TP
283
173
  \fBruby\fR
284
174
  C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
285
- .
286
175
  .TP
287
176
  \fBmri\fR
288
177
  C Ruby (MRI) only, but not Windows
289
- .
290
178
  .TP
291
179
  \fBwindows\fR
292
180
  Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
293
- .
294
181
  .TP
295
182
  \fBmswin\fR
296
183
  Windows C Ruby (MRI), including RubyInstaller 32\-bit versions
297
- .
298
184
  .TP
299
185
  \fBmswin64\fR
300
186
  Windows C Ruby (MRI), including RubyInstaller 64\-bit versions
301
- .
302
187
  .TP
303
188
  \fBrbx\fR
304
189
  Rubinius
305
- .
306
190
  .TP
307
191
  \fBjruby\fR
308
192
  JRuby
309
- .
310
193
  .TP
311
194
  \fBtruffleruby\fR
312
195
  TruffleRuby
313
- .
314
196
  .P
315
197
  On platforms \fBruby\fR, \fBmri\fR, \fBmswin\fR, \fBmswin64\fR, and \fBwindows\fR, you may additionally specify a version by appending the major and minor version numbers without a delimiter\. For example, to specify that a gem should only be used on platform \fBruby\fR version 3\.1, use:
316
- .
317
198
  .IP "" 4
318
- .
319
199
  .nf
320
-
321
200
  ruby_31
322
- .
323
201
  .fi
324
- .
325
202
  .IP "" 0
326
- .
327
203
  .P
328
204
  As with groups (above), you may specify one or more platforms:
329
- .
330
205
  .IP "" 4
331
- .
332
206
  .nf
333
-
334
207
  gem "weakling", platforms: :jruby
335
208
  gem "ruby\-debug", platforms: :mri_31
336
209
  gem "nokogiri", platforms: [:windows_31, :jruby]
337
- .
338
210
  .fi
339
- .
340
211
  .IP "" 0
341
- .
342
212
  .P
343
213
  All operations involving groups (\fBbundle install\fR \fIbundle\-install\.1\.html\fR, \fBBundler\.setup\fR, \fBBundler\.require\fR) behave exactly the same as if any groups not matching the current platform were explicitly excluded\.
344
- .
214
+ .P
215
+ The following platform values are deprecated and should be replaced with \fBwindows\fR:
216
+ .IP "\(bu" 4
217
+ \fBmswin\fR, \fBmswin64\fR, \fBmingw32\fR, \fBx64_mingw\fR
218
+ .IP "" 0
345
219
  .SS "FORCE_RUBY_PLATFORM"
346
220
  If you always want the pure ruby variant of a gem to be chosen over platform specific variants, you can use the \fBforce_ruby_platform\fR option:
347
- .
348
221
  .IP "" 4
349
- .
350
222
  .nf
351
-
352
223
  gem "ffi", force_ruby_platform: true
353
- .
354
224
  .fi
355
- .
356
225
  .IP "" 0
357
- .
358
226
  .P
359
227
  This can be handy (assuming the pure ruby variant works fine) when:
360
- .
361
228
  .IP "\(bu" 4
362
- You\'re having issues with the platform specific variant\.
363
- .
229
+ You're having issues with the platform specific variant\.
364
230
  .IP "\(bu" 4
365
231
  The platform specific variant does not yet support a newer ruby (and thus has a \fBrequired_ruby_version\fR upper bound), but you still want your Gemfile{\.lock} files to resolve under that ruby\.
366
- .
367
232
  .IP "" 0
368
- .
369
233
  .SS "SOURCE"
370
- You can select an alternate RubyGems repository for a gem using the \':source\' option\.
371
- .
234
+ You can select an alternate RubyGems repository for a gem using the ':source' option\.
372
235
  .IP "" 4
373
- .
374
236
  .nf
375
-
376
237
  gem "some_internal_gem", source: "https://gems\.example\.com"
377
- .
378
238
  .fi
379
- .
380
239
  .IP "" 0
381
- .
382
240
  .P
383
241
  This forces the gem to be loaded from this source and ignores the global source declared at the top level of the file\. If the gem does not exist in this source, it will not be installed\.
384
- .
385
242
  .P
386
243
  Bundler will search for child dependencies of this gem by first looking in the source selected for the parent, but if they are not found there, it will fall back on the global source\.
387
- .
388
244
  .P
389
245
  \fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL SOURCE\fR\.
390
- .
391
246
  .P
392
247
  Using the \fB:source\fR option for an individual gem will also make that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when adding gems with explicit sources, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources\.
393
- .
394
248
  .SS "GIT"
395
249
  If necessary, you can specify that a gem is located at a particular git repository using the \fB:git\fR parameter\. The repository can be accessed via several protocols:
396
- .
397
250
  .TP
398
251
  \fBHTTP(S)\fR
399
252
  gem "rails", git: "https://github\.com/rails/rails\.git"
400
- .
401
253
  .TP
402
254
  \fBSSH\fR
403
255
  gem "rails", git: "git@github\.com:rails/rails\.git"
404
- .
405
256
  .TP
406
257
  \fBgit\fR
407
258
  gem "rails", git: "git://github\.com/rails/rails\.git"
408
- .
409
259
  .P
410
260
  If using SSH, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
411
- .
412
261
  .P
413
262
  \fBNOTE\fR: \fBhttp://\fR and \fBgit://\fR URLs should be avoided if at all possible\. These protocols are unauthenticated, so a man\-in\-the\-middle attacker can deliver malicious code and compromise your system\. HTTPS and SSH are strongly preferred\.
414
- .
415
263
  .P
416
264
  The \fBgroup\fR, \fBplatforms\fR, and \fBrequire\fR options are available and behave exactly the same as they would for a normal gem\.
417
- .
418
265
  .P
419
266
  A git repository \fBSHOULD\fR have at least one file, at the root of the directory containing the gem, with the extension \fB\.gemspec\fR\. This file \fBMUST\fR contain a valid gem specification, as expected by the \fBgem build\fR command\.
420
- .
421
267
  .P
422
268
  If a git repository does not have a \fB\.gemspec\fR, bundler will attempt to create one, but it will not contain any dependencies, executables, or C extension compilation instructions\. As a result, it may fail to properly integrate into your application\.
423
- .
424
269
  .P
425
270
  If a git repository does have a \fB\.gemspec\fR for the gem you attached it to, a version specifier, if provided, means that the git repository is only valid if the \fB\.gemspec\fR specifies a version matching the version specifier\. If not, bundler will print a warning\.
426
- .
427
271
  .IP "" 4
428
- .
429
272
  .nf
430
-
431
273
  gem "rails", "2\.3\.8", git: "https://github\.com/rails/rails\.git"
432
274
  # bundle install will fail, because the \.gemspec in the rails
433
- # repository\'s master branch specifies version 3\.0\.0
434
- .
275
+ # repository's master branch specifies version 3\.0\.0
435
276
  .fi
436
- .
437
277
  .IP "" 0
438
- .
439
278
  .P
440
279
  If a git repository does \fBnot\fR have a \fB\.gemspec\fR for the gem you attached it to, a version specifier \fBMUST\fR be provided\. Bundler will use this version in the simple \fB\.gemspec\fR it creates\.
441
- .
442
280
  .P
443
281
  Git repositories support a number of additional options\.
444
- .
445
282
  .TP
446
283
  \fBbranch\fR, \fBtag\fR, and \fBref\fR
447
284
  You \fBMUST\fR only specify at most one of these options\. The default is \fBbranch: "master"\fR\. For example:
448
- .
449
285
  .IP
450
286
  gem "rails", git: "https://github\.com/rails/rails\.git", branch: "5\-0\-stable"
451
- .
452
287
  .IP
453
288
  gem "rails", git: "https://github\.com/rails/rails\.git", tag: "v5\.0\.0"
454
- .
455
289
  .IP
456
290
  gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
457
- .
458
291
  .TP
459
292
  \fBsubmodules\fR
460
293
  For reference, a git submodule \fIhttps://git\-scm\.com/book/en/v2/Git\-Tools\-Submodules\fR lets you have another git repository within a subfolder of your repository\. Specify \fBsubmodules: true\fR to cause bundler to expand any submodules included in the git repository
461
- .
462
294
  .P
463
295
  If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR represents a gem located at the same place in the file system as the \fB\.gemspec\fR\.
464
- .
465
296
  .IP "" 4
466
- .
467
297
  .nf
468
-
469
298
  |~rails [git root]
470
299
  | |\-rails\.gemspec [rails gem located here]
471
300
  |~actionpack
472
301
  | |\-actionpack\.gemspec [actionpack gem located here]
473
302
  |~activesupport
474
303
  | |\-activesupport\.gemspec [activesupport gem located here]
475
- |\.\.\.
476
- .
304
+ |\|\.\|\.\|\.
477
305
  .fi
478
- .
479
306
  .IP "" 0
480
- .
481
307
  .P
482
308
  To install a gem located in a git repository, bundler changes to the directory containing the gemspec, runs \fBgem build name\.gemspec\fR and then installs the resulting gem\. The \fBgem build\fR command, which comes standard with Rubygems, evaluates the \fB\.gemspec\fR in the context of the directory in which it is located\.
483
- .
484
309
  .SS "GIT SOURCE"
485
- A custom git source can be defined via the \fBgit_source\fR method\. Provide the source\'s name as an argument, and a block which receives a single argument and interpolates it into a string to return the full repo address:
486
- .
310
+ A custom git source can be defined via the \fBgit_source\fR method\. Provide the source's name as an argument, and a block which receives a single argument and interpolates it into a string to return the full repo address:
487
311
  .IP "" 4
488
- .
489
312
  .nf
490
-
491
313
  git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
492
- gem \'rails\', stash: \'forks/rails\'
493
- .
314
+ gem 'rails', stash: 'forks/rails'
494
315
  .fi
495
- .
496
316
  .IP "" 0
497
- .
498
317
  .P
499
318
  In addition, if you wish to choose a specific branch:
500
- .
501
319
  .IP "" 4
502
- .
503
320
  .nf
504
-
505
321
  gem "rails", stash: "forks/rails", branch: "branch_name"
506
- .
507
322
  .fi
508
- .
509
323
  .IP "" 0
510
- .
511
324
  .SS "GITHUB"
512
325
  \fBNOTE\fR: This shorthand should be avoided until Bundler 2\.0, since it currently expands to an insecure \fBgit://\fR URL\. This allows a man\-in\-the\-middle attacker to compromise your system\.
513
- .
514
326
  .P
515
327
  If the git repository you want to use is hosted on GitHub and is public, you can use the :github shorthand to specify the github username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
516
- .
517
328
  .IP "" 4
518
- .
519
329
  .nf
520
-
521
330
  gem "rails", github: "rails/rails"
522
331
  gem "rails", github: "rails"
523
- .
524
332
  .fi
525
- .
526
333
  .IP "" 0
527
- .
528
334
  .P
529
335
  Are both equivalent to
530
- .
531
336
  .IP "" 4
532
- .
533
337
  .nf
534
-
535
338
  gem "rails", git: "https://github\.com/rails/rails\.git"
536
- .
537
339
  .fi
538
- .
539
340
  .IP "" 0
540
- .
541
341
  .P
542
342
  Since the \fBgithub\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
543
- .
544
343
  .P
545
344
  You can also directly pass a pull request URL:
546
- .
547
345
  .IP "" 4
548
- .
549
346
  .nf
550
-
551
347
  gem "rails", github: "https://github\.com/rails/rails/pull/43753"
552
- .
553
348
  .fi
554
- .
555
349
  .IP "" 0
556
- .
557
350
  .P
558
351
  Which is equivalent to:
559
- .
560
352
  .IP "" 4
561
- .
562
353
  .nf
563
-
564
354
  gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
565
- .
566
355
  .fi
567
- .
568
356
  .IP "" 0
569
- .
570
357
  .SS "GIST"
571
358
  If the git repository you want to use is hosted as a GitHub Gist and is public, you can use the :gist shorthand to specify the gist identifier (without the trailing "\.git")\.
572
- .
573
359
  .IP "" 4
574
- .
575
360
  .nf
576
-
577
361
  gem "the_hatch", gist: "4815162342"
578
- .
579
362
  .fi
580
- .
581
363
  .IP "" 0
582
- .
583
364
  .P
584
365
  Is equivalent to:
585
- .
586
366
  .IP "" 4
587
- .
588
367
  .nf
589
-
590
368
  gem "the_hatch", git: "https://gist\.github\.com/4815162342\.git"
591
- .
592
369
  .fi
593
- .
594
370
  .IP "" 0
595
- .
596
371
  .P
597
372
  Since the \fBgist\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
598
- .
599
373
  .SS "BITBUCKET"
600
374
  If the git repository you want to use is hosted on Bitbucket and is public, you can use the :bitbucket shorthand to specify the bitbucket username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
601
- .
602
375
  .IP "" 4
603
- .
604
376
  .nf
605
-
606
377
  gem "rails", bitbucket: "rails/rails"
607
378
  gem "rails", bitbucket: "rails"
608
- .
609
379
  .fi
610
- .
611
380
  .IP "" 0
612
- .
613
381
  .P
614
382
  Are both equivalent to
615
- .
616
383
  .IP "" 4
617
- .
618
384
  .nf
619
-
620
385
  gem "rails", git: "https://rails@bitbucket\.org/rails/rails\.git"
621
- .
622
386
  .fi
623
- .
624
387
  .IP "" 0
625
- .
626
388
  .P
627
389
  Since the \fBbitbucket\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
628
- .
629
390
  .SS "PATH"
630
391
  You can specify that a gem is located in a particular location on the file system\. Relative paths are resolved relative to the directory containing the \fBGemfile\fR\.
631
- .
632
392
  .P
633
393
  Similar to the semantics of the \fB:git\fR option, the \fB:path\fR option requires that the directory in question either contains a \fB\.gemspec\fR for the gem, or that you specify an explicit version that bundler should use\.
634
- .
635
394
  .P
636
395
  Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as paths\.
637
- .
638
396
  .IP "" 4
639
- .
640
397
  .nf
641
-
642
398
  gem "rails", path: "vendor/rails"
643
- .
644
399
  .fi
645
- .
646
400
  .IP "" 0
647
- .
648
401
  .P
649
- If you would like to use multiple local gems directly from the filesystem, you can set a global \fBpath\fR option to the path containing the gem\'s files\. This will automatically load gemspec files from subdirectories\.
650
- .
402
+ If you would like to use multiple local gems directly from the filesystem, you can set a global \fBpath\fR option to the path containing the gem's files\. This will automatically load gemspec files from subdirectories\.
651
403
  .IP "" 4
652
- .
653
404
  .nf
654
-
655
- path \'components\' do
656
- gem \'admin_ui\'
657
- gem \'public_ui\'
405
+ path 'components' do
406
+ gem 'admin_ui'
407
+ gem 'public_ui'
658
408
  end
659
- .
660
409
  .fi
661
- .
662
410
  .IP "" 0
663
- .
664
411
  .SH "BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS"
665
412
  The \fB:source\fR, \fB:git\fR, \fB:path\fR, \fB:group\fR, and \fB:platforms\fR options may be applied to a group of gems by using block form\.
666
- .
667
413
  .IP "" 4
668
- .
669
414
  .nf
670
-
671
415
  source "https://gems\.example\.com" do
672
416
  gem "some_internal_gem"
673
417
  gem "another_internal_gem"
@@ -687,61 +431,40 @@ group :development, optional: true do
687
431
  gem "wirble"
688
432
  gem "faker"
689
433
  end
690
- .
691
434
  .fi
692
- .
693
435
  .IP "" 0
694
- .
695
436
  .P
696
437
  In the case of the group block form the :optional option can be given to prevent a group from being installed unless listed in the \fB\-\-with\fR option given to the \fBbundle install\fR command\.
697
- .
698
438
  .P
699
439
  In the case of the \fBgit\fR block form, the \fB:ref\fR, \fB:branch\fR, \fB:tag\fR, and \fB:submodules\fR options may be passed to the \fBgit\fR method, and all gems in the block will inherit those options\.
700
- .
701
440
  .P
702
441
  The presence of a \fBsource\fR block in a Gemfile also makes that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when defining source blocks, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources, either via source blocks or \fB:source\fR directives on individual gems\.
703
- .
704
442
  .SH "INSTALL_IF"
705
443
  The \fBinstall_if\fR method allows gems to be installed based on a proc or lambda\. This is especially useful for optional gems that can only be used if certain software is installed or some other conditions are met\.
706
- .
707
444
  .IP "" 4
708
- .
709
445
  .nf
710
-
711
446
  install_if \-> { RUBY_PLATFORM =~ /darwin/ } do
712
447
  gem "pasteboard"
713
448
  end
714
- .
715
449
  .fi
716
- .
717
450
  .IP "" 0
718
- .
719
451
  .SH "GEMSPEC"
720
452
  The \fB\.gemspec\fR \fIhttp://guides\.rubygems\.org/specification\-reference/\fR file is where you provide metadata about your gem to Rubygems\. Some required Gemspec attributes include the name, description, and homepage of your gem\. This is also where you specify the dependencies your gem needs to run\.
721
- .
722
453
  .P
723
454
  If you wish to use Bundler to help install dependencies for a gem while it is being developed, use the \fBgemspec\fR method to pull in the dependencies listed in the \fB\.gemspec\fR file\.
724
- .
725
455
  .P
726
- The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath: \'\.\'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files via relative paths\.
727
- .
456
+ The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath: '\.'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files via relative paths\.
728
457
  .P
729
458
  The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to: \fB{,*,*/*}\.gemspec\fR), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
730
- .
731
459
  .P
732
460
  When a \fBgemspec\fR dependency encounters version conflicts during resolution, the local version under development will always be selected \-\- even if there are remote versions that better match other requirements for the \fBgemspec\fR gem\.
733
- .
734
461
  .SH "SOURCE PRIORITY"
735
462
  When attempting to locate a gem to satisfy a gem requirement, bundler uses the following priority order:
736
- .
737
463
  .IP "1." 4
738
464
  The source explicitly attached to the gem (using \fB:source\fR, \fB:path\fR, or \fB:git\fR)
739
- .
740
465
  .IP "2." 4
741
466
  For implicit gems (dependencies of explicit gems), any source, git, or path repository declared on the parent\. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from \fBrubygems\.org\fR
742
- .
743
467
  .IP "3." 4
744
468
  If neither of the above conditions are met, the global source will be used\. If multiple global sources are specified, they will be prioritized from last to first, but this is deprecated since Bundler 1\.13, so Bundler prints a warning and will abort with an error in the future\.
745
- .
746
469
  .IP "" 0
747
470