bundler 2.6.3 → 2.6.9

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.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +119 -6
  3. data/README.md +1 -1
  4. data/lib/bundler/build_metadata.rb +2 -2
  5. data/lib/bundler/checksum.rb +22 -12
  6. data/lib/bundler/cli/console.rb +8 -6
  7. data/lib/bundler/cli/doctor/diagnose.rb +167 -0
  8. data/lib/bundler/cli/doctor/ssl.rb +249 -0
  9. data/lib/bundler/cli/doctor.rb +27 -151
  10. data/lib/bundler/cli/info.rb +4 -4
  11. data/lib/bundler/cli/inject.rb +2 -2
  12. data/lib/bundler/cli/issue.rb +3 -3
  13. data/lib/bundler/cli/lock.rb +2 -1
  14. data/lib/bundler/cli/show.rb +1 -1
  15. data/lib/bundler/cli.rb +2 -11
  16. data/lib/bundler/compact_index_client/cache.rb +1 -1
  17. data/lib/bundler/compact_index_client/parser.rb +1 -1
  18. data/lib/bundler/compact_index_client/updater.rb +2 -1
  19. data/lib/bundler/current_ruby.rb +23 -33
  20. data/lib/bundler/definition.rb +220 -184
  21. data/lib/bundler/dependency.rb +92 -47
  22. data/lib/bundler/dsl.rb +84 -80
  23. data/lib/bundler/endpoint_specification.rb +10 -3
  24. data/lib/bundler/errors.rb +22 -0
  25. data/lib/bundler/friendly_errors.rb +1 -1
  26. data/lib/bundler/gem_helpers.rb +4 -10
  27. data/lib/bundler/gem_version_promoter.rb +0 -2
  28. data/lib/bundler/injector.rb +9 -9
  29. data/lib/bundler/installer.rb +2 -2
  30. data/lib/bundler/lazy_specification.rb +67 -45
  31. data/lib/bundler/lockfile_parser.rb +8 -5
  32. data/lib/bundler/man/bundle-add.1 +1 -1
  33. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  34. data/lib/bundler/man/bundle-cache.1 +1 -1
  35. data/lib/bundler/man/bundle-check.1 +1 -1
  36. data/lib/bundler/man/bundle-clean.1 +1 -1
  37. data/lib/bundler/man/bundle-config.1 +6 -6
  38. data/lib/bundler/man/bundle-config.1.ronn +9 -4
  39. data/lib/bundler/man/bundle-console.1 +1 -1
  40. data/lib/bundler/man/bundle-doctor.1 +1 -1
  41. data/lib/bundler/man/bundle-env.1 +1 -1
  42. data/lib/bundler/man/bundle-exec.1 +3 -3
  43. data/lib/bundler/man/bundle-exec.1.ronn +2 -2
  44. data/lib/bundler/man/bundle-fund.1 +1 -1
  45. data/lib/bundler/man/bundle-gem.1 +1 -1
  46. data/lib/bundler/man/bundle-help.1 +1 -1
  47. data/lib/bundler/man/bundle-info.1 +1 -1
  48. data/lib/bundler/man/bundle-init.1 +1 -1
  49. data/lib/bundler/man/bundle-inject.1 +1 -1
  50. data/lib/bundler/man/bundle-install.1 +1 -1
  51. data/lib/bundler/man/bundle-issue.1 +1 -1
  52. data/lib/bundler/man/bundle-licenses.1 +1 -1
  53. data/lib/bundler/man/bundle-list.1 +1 -1
  54. data/lib/bundler/man/bundle-lock.1 +1 -1
  55. data/lib/bundler/man/bundle-open.1 +1 -1
  56. data/lib/bundler/man/bundle-outdated.1 +1 -1
  57. data/lib/bundler/man/bundle-platform.1 +1 -1
  58. data/lib/bundler/man/bundle-plugin.1 +1 -1
  59. data/lib/bundler/man/bundle-pristine.1 +1 -1
  60. data/lib/bundler/man/bundle-remove.1 +1 -1
  61. data/lib/bundler/man/bundle-show.1 +1 -1
  62. data/lib/bundler/man/bundle-update.1 +1 -1
  63. data/lib/bundler/man/bundle-version.1 +1 -1
  64. data/lib/bundler/man/bundle-viz.1 +1 -1
  65. data/lib/bundler/man/bundle.1 +1 -1
  66. data/lib/bundler/man/gemfile.5 +1 -1
  67. data/lib/bundler/match_metadata.rb +13 -0
  68. data/lib/bundler/plugin/api/source.rb +1 -1
  69. data/lib/bundler/plugin/index.rb +1 -1
  70. data/lib/bundler/plugin/installer/path.rb +8 -0
  71. data/lib/bundler/plugin.rb +1 -1
  72. data/lib/bundler/resolver/candidate.rb +12 -9
  73. data/lib/bundler/resolver/package.rb +7 -3
  74. data/lib/bundler/resolver/spec_group.rb +1 -25
  75. data/lib/bundler/resolver/strategy.rb +40 -0
  76. data/lib/bundler/resolver.rb +29 -27
  77. data/lib/bundler/rubygems_ext.rb +97 -81
  78. data/lib/bundler/rubygems_integration.rb +2 -3
  79. data/lib/bundler/runtime.rb +27 -29
  80. data/lib/bundler/shared_helpers.rb +4 -0
  81. data/lib/bundler/source/gemspec.rb +1 -4
  82. data/lib/bundler/source/git/git_proxy.rb +14 -3
  83. data/lib/bundler/source/git.rb +5 -1
  84. data/lib/bundler/source/path.rb +2 -2
  85. data/lib/bundler/source/rubygems/remote.rb +11 -3
  86. data/lib/bundler/source/rubygems.rb +19 -4
  87. data/lib/bundler/source.rb +2 -0
  88. data/lib/bundler/source_list.rb +33 -11
  89. data/lib/bundler/spec_set.rb +98 -40
  90. data/lib/bundler/templates/newgem/Gemfile.tt +1 -0
  91. data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +53 -3
  92. data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  93. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +11 -0
  94. data/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +4 -24
  95. data/lib/bundler/vendor/pub_grub/lib/pub_grub/strategy.rb +42 -0
  96. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +20 -8
  97. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +17 -29
  98. data/lib/bundler/vendor/uri/lib/uri/common.rb +7 -3
  99. data/lib/bundler/vendor/uri/lib/uri/generic.rb +12 -11
  100. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +6 -6
  101. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  102. data/lib/bundler/version.rb +1 -1
  103. metadata +7 -4
  104. data/lib/bundler/compact_index_client/gem_parser.rb +0 -32
@@ -121,13 +121,10 @@ module Bundler
121
121
  out
122
122
  end
123
123
 
124
- def materialize_strictly
125
- source.local!
126
-
127
- matching_specs = source.specs.search(self)
128
- return self if matching_specs.empty?
124
+ def materialize_for_cache
125
+ source.remote!
129
126
 
130
- __materialize__(matching_specs)
127
+ materialize(self, &:first)
131
128
  end
132
129
 
133
130
  def materialized_for_installation
@@ -140,53 +137,25 @@ module Bundler
140
137
  source.local!
141
138
 
142
139
  if use_exact_resolved_specifications?
143
- materialize_strictly
140
+ materialize(self) do |matching_specs|
141
+ choose_compatible(matching_specs)
142
+ end
144
143
  else
145
- matching_specs = source.specs.search([name, version])
146
- return self if matching_specs.empty?
144
+ materialize([name, version]) do |matching_specs|
145
+ target_platform = source.is_a?(Source::Path) ? platform : local_platform
147
146
 
148
- target_platform = source.is_a?(Source::Path) ? platform : local_platform
147
+ installable_candidates = GemHelpers.select_best_platform_match(matching_specs, target_platform)
149
148
 
150
- installable_candidates = GemHelpers.select_best_platform_match(matching_specs, target_platform)
151
-
152
- specification = __materialize__(installable_candidates, fallback_to_non_installable: false)
153
- return specification unless specification.nil?
154
-
155
- if target_platform != platform
156
- installable_candidates = GemHelpers.select_best_platform_match(matching_specs, platform)
157
- end
149
+ specification = choose_compatible(installable_candidates, fallback_to_non_installable: false)
150
+ return specification unless specification.nil?
158
151
 
159
- __materialize__(installable_candidates)
160
- end
161
- end
162
-
163
- # If in frozen mode, we fallback to a non-installable candidate because by
164
- # doing this we avoid re-resolving and potentially end up changing the
165
- # lock file, which is not allowed. In that case, we will give a proper error
166
- # about the mismatch higher up the stack, right before trying to install the
167
- # bad gem.
168
- def __materialize__(candidates, fallback_to_non_installable: Bundler.frozen_bundle?)
169
- search = candidates.reverse.find do |spec|
170
- spec.is_a?(StubSpecification) || spec.matches_current_metadata?
171
- end
172
- if search.nil? && fallback_to_non_installable
173
- search = candidates.last
174
- elsif search && search.full_name == full_name
175
- # We don't validate locally installed dependencies but accept what's in
176
- # the lockfile instead for performance, since loading locally installed
177
- # dependencies would mean evaluating all gemspecs, which would affect
178
- # `bundler/setup` performance
179
- if search.is_a?(StubSpecification)
180
- search.dependencies = dependencies
181
- else
182
- if !source.is_a?(Source::Path) && search.runtime_dependencies.sort != dependencies.sort
183
- raise IncorrectLockfileDependencies.new(self)
152
+ if target_platform != platform
153
+ installable_candidates = GemHelpers.select_best_platform_match(matching_specs, platform)
184
154
  end
185
155
 
186
- search.locked_platform = platform if search.instance_of?(RemoteSpecification) || search.instance_of?(EndpointSpecification)
156
+ choose_compatible(installable_candidates)
187
157
  end
188
158
  end
189
- search
190
159
  end
191
160
 
192
161
  def inspect
@@ -206,6 +175,14 @@ module Bundler
206
175
  @force_ruby_platform = true
207
176
  end
208
177
 
178
+ def replace_source_with!(gemfile_source)
179
+ return unless gemfile_source.can_lock?(self)
180
+
181
+ @source = gemfile_source
182
+
183
+ true
184
+ end
185
+
209
186
  private
210
187
 
211
188
  def use_exact_resolved_specifications?
@@ -217,5 +194,50 @@ module Bundler
217
194
 
218
195
  (most_specific_locked_platform != generic_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]
219
196
  end
197
+
198
+ def materialize(query)
199
+ matching_specs = source.specs.search(query)
200
+ return self if matching_specs.empty?
201
+
202
+ yield matching_specs
203
+ end
204
+
205
+ # If in frozen mode, we fallback to a non-installable candidate because by
206
+ # doing this we avoid re-resolving and potentially end up changing the
207
+ # lockfile, which is not allowed. In that case, we will give a proper error
208
+ # about the mismatch higher up the stack, right before trying to install the
209
+ # bad gem.
210
+ def choose_compatible(candidates, fallback_to_non_installable: Bundler.frozen_bundle?)
211
+ search = candidates.reverse.find do |spec|
212
+ spec.is_a?(StubSpecification) || spec.matches_current_metadata?
213
+ end
214
+ if search.nil? && fallback_to_non_installable
215
+ search = candidates.last
216
+ end
217
+
218
+ if search
219
+ validate_dependencies(search) if search.platform == platform
220
+
221
+ search.locked_platform = platform if search.instance_of?(RemoteSpecification) || search.instance_of?(EndpointSpecification)
222
+ end
223
+ search
224
+ end
225
+
226
+ # Validate dependencies of this locked spec are consistent with dependencies
227
+ # of the actual spec that was materialized.
228
+ #
229
+ # Note that we don't validate dependencies of locally installed gems but
230
+ # accept what's in the lockfile instead for performance, since loading
231
+ # dependencies of locally installed gems would mean evaluating all gemspecs,
232
+ # which would affect `bundler/setup` performance.
233
+ def validate_dependencies(spec)
234
+ if spec.is_a?(StubSpecification)
235
+ spec.dependencies = dependencies
236
+ else
237
+ if !source.is_a?(Source::Path) && spec.runtime_dependencies.sort != dependencies.sort
238
+ raise IncorrectLockfileDependencies.new(self)
239
+ end
240
+ end
241
+ end
220
242
  end
221
243
  end
@@ -239,7 +239,6 @@ module Bundler
239
239
  spaces = $1
240
240
  return unless spaces.size == 2
241
241
  checksums = $6
242
- return unless checksums
243
242
  name = $2
244
243
  version = $3
245
244
  platform = $4
@@ -249,10 +248,14 @@ module Bundler
249
248
  full_name = Gem::NameTuple.new(name, version, platform).full_name
250
249
  return unless spec = @specs[full_name]
251
250
 
252
- checksums.split(",") do |lock_checksum|
253
- column = line.index(lock_checksum) + 1
254
- checksum = Checksum.from_lock(lock_checksum, "#{@lockfile_path}:#{@pos.line}:#{column}")
255
- spec.source.checksum_store.register(spec, checksum)
251
+ if checksums
252
+ checksums.split(",") do |lock_checksum|
253
+ column = line.index(lock_checksum) + 1
254
+ checksum = Checksum.from_lock(lock_checksum, "#{@lockfile_path}:#{@pos.line}:#{column}")
255
+ spec.source.checksum_store.register(spec, checksum)
256
+ end
257
+ else
258
+ spec.source.checksum_store.register(spec, nil)
256
259
  end
257
260
  end
258
261
 
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-ADD" "1" "January 2025" ""
3
+ .TH "BUNDLE\-ADD" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-BINSTUBS" "1" "January 2025" ""
3
+ .TH "BUNDLE\-BINSTUBS" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-CACHE" "1" "January 2025" ""
3
+ .TH "BUNDLE\-CACHE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-CHECK" "1" "January 2025" ""
3
+ .TH "BUNDLE\-CHECK" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-CLEAN" "1" "January 2025" ""
3
+ .TH "BUNDLE\-CLEAN" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-CONFIG" "1" "January 2025" ""
3
+ .TH "BUNDLE\-CONFIG" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-config\fR \- Set bundler configuration options
6
6
  .SH "SYNOPSIS"
@@ -56,16 +56,16 @@ Creates a directory (defaults to \fB~/bin\fR) and place any executables from the
56
56
  In deployment mode, Bundler will 'roll\-out' the bundle for \fBproduction\fR use\. Please check carefully if you want to have this option enabled in \fBdevelopment\fR or \fBtest\fR environments\.
57
57
  .TP
58
58
  \fBonly\fR
59
- A space\-separated list of groups to install only gems of the specified groups\.
59
+ A space\-separated list of groups to install only gems of the specified groups\. Please check carefully if you want to install also gems without a group, cause they get put inside \fBdefault\fR group\. For example \fBonly test:default\fR will install all gems specified in test group and without one\.
60
60
  .TP
61
61
  \fBpath\fR
62
62
  The location to install the specified gems to\. This defaults to Rubygems' setting\. Bundler shares this location with Rubygems, \fBgem install \|\.\|\.\|\.\fR will have gem installed there, too\. Therefore, gems installed without a \fB\-\-path \|\.\|\.\|\.\fR setting will show up by calling \fBgem list\fR\. Accordingly, gems installed to other locations will not get listed\.
63
63
  .TP
64
64
  \fBwithout\fR
65
- A space\-separated list of groups referencing gems to skip during installation\.
65
+ A space\-separated or \fB:\fR\-separated list of groups referencing gems to skip during installation\.
66
66
  .TP
67
67
  \fBwith\fR
68
- A space\-separated list of \fBoptional\fR groups referencing gems to include during installation\.
68
+ A space\-separated or \fB:\fR\-separated list of \fBoptional\fR groups referencing gems to include during installation\.
69
69
  .SH "BUILD OPTIONS"
70
70
  You can use \fBbundle config\fR to give Bundler the flags to pass to the gem installer every time bundler tries to install a particular gem\.
71
71
  .P
@@ -197,9 +197,9 @@ The following is a list of all configuration keys and their purpose\. You can le
197
197
  .IP "\(bu" 4
198
198
  \fBversion\fR (\fBBUNDLE_VERSION\fR): The version of Bundler to use when running under Bundler environment\. Defaults to \fBlockfile\fR\. You can also specify \fBsystem\fR or \fBx\.y\.z\fR\. \fBlockfile\fR will use the Bundler version specified in the \fBGemfile\.lock\fR, \fBsystem\fR will use the system version of Bundler, and \fBx\.y\.z\fR will use the specified version of Bundler\.
199
199
  .IP "\(bu" 4
200
- \fBwith\fR (\fBBUNDLE_WITH\fR): A \fB:\fR\-separated list of groups whose gems bundler should install\.
200
+ \fBwith\fR (\fBBUNDLE_WITH\fR): A space\-separated or \fB:\fR\-separated list of groups whose gems bundler should install\.
201
201
  .IP "\(bu" 4
202
- \fBwithout\fR (\fBBUNDLE_WITHOUT\fR): A \fB:\fR\-separated list of groups whose gems bundler should not install\.
202
+ \fBwithout\fR (\fBBUNDLE_WITHOUT\fR): A space\-separated or \fB:\fR\-separated list of groups whose gems bundler should not install\.
203
203
  .IP "" 0
204
204
  .SH "LOCAL GIT REPOS"
205
205
  Bundler also allows you to work against a git repository locally instead of using the remote version\. This can be achieved by setting up a local override:
@@ -79,6 +79,9 @@ The options that can be configured are:
79
79
 
80
80
  * `only`:
81
81
  A space-separated list of groups to install only gems of the specified groups.
82
+ Please check carefully if you want to install also gems without a group, cause
83
+ they get put inside `default` group. For example `only test:default` will install
84
+ all gems specified in test group and without one.
82
85
 
83
86
  * `path`:
84
87
  The location to install the specified gems to. This defaults to Rubygems'
@@ -88,10 +91,12 @@ The options that can be configured are:
88
91
  installed to other locations will not get listed.
89
92
 
90
93
  * `without`:
91
- A space-separated list of groups referencing gems to skip during installation.
94
+ A space-separated or `:`-separated list of groups referencing gems to skip during
95
+ installation.
92
96
 
93
97
  * `with`:
94
- A space-separated list of **optional** groups referencing gems to include during installation.
98
+ A space-separated or `:`-separated list of **optional** groups referencing gems to
99
+ include during installation.
95
100
 
96
101
  ## BUILD OPTIONS
97
102
 
@@ -280,9 +285,9 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
280
285
  `system` will use the system version of Bundler, and `x.y.z` will use
281
286
  the specified version of Bundler.
282
287
  * `with` (`BUNDLE_WITH`):
283
- A `:`-separated list of groups whose gems bundler should install.
288
+ A space-separated or `:`-separated list of groups whose gems bundler should install.
284
289
  * `without` (`BUNDLE_WITHOUT`):
285
- A `:`-separated list of groups whose gems bundler should not install.
290
+ A space-separated or `:`-separated list of groups whose gems bundler should not install.
286
291
 
287
292
  ## LOCAL GIT REPOS
288
293
 
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-CONSOLE" "1" "January 2025" ""
3
+ .TH "BUNDLE\-CONSOLE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-console\fR \- Open an IRB session with the bundle pre\-loaded
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-DOCTOR" "1" "January 2025" ""
3
+ .TH "BUNDLE\-DOCTOR" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-ENV" "1" "January 2025" ""
3
+ .TH "BUNDLE\-ENV" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-env\fR \- Print information about the environment Bundler is running under
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-EXEC" "1" "January 2025" ""
3
+ .TH "BUNDLE\-EXEC" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-exec\fR \- Execute a command in the context of the bundle
6
6
  .SH "SYNOPSIS"
@@ -74,8 +74,8 @@ end
74
74
  Bundler provides convenience helpers that wrap \fBsystem\fR and \fBexec\fR, and they can be used like this:
75
75
  .IP "" 4
76
76
  .nf
77
- Bundler\.clean_system('brew install wget')
78
- Bundler\.clean_exec('brew install wget')
77
+ Bundler\.unbundled_system('brew install wget')
78
+ Bundler\.unbundled_exec('brew install wget')
79
79
  .fi
80
80
  .IP "" 0
81
81
  .SH "RUBYGEMS PLUGINS"
@@ -108,8 +108,8 @@ need to use `with_unbundled_env`.
108
108
  Bundler provides convenience helpers that wrap `system` and `exec`, and they
109
109
  can be used like this:
110
110
 
111
- Bundler.clean_system('brew install wget')
112
- Bundler.clean_exec('brew install wget')
111
+ Bundler.unbundled_system('brew install wget')
112
+ Bundler.unbundled_exec('brew install wget')
113
113
 
114
114
 
115
115
  ## RUBYGEMS PLUGINS
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-FUND" "1" "January 2025" ""
3
+ .TH "BUNDLE\-FUND" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-fund\fR \- Lists information about gems seeking funding assistance
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-GEM" "1" "January 2025" ""
3
+ .TH "BUNDLE\-GEM" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-HELP" "1" "January 2025" ""
3
+ .TH "BUNDLE\-HELP" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-help\fR \- Displays detailed help for each subcommand
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INFO" "1" "January 2025" ""
3
+ .TH "BUNDLE\-INFO" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-info\fR \- Show information for the given gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INIT" "1" "January 2025" ""
3
+ .TH "BUNDLE\-INIT" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-init\fR \- Generates a Gemfile into the current working directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INJECT" "1" "January 2025" ""
3
+ .TH "BUNDLE\-INJECT" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INSTALL" "1" "January 2025" ""
3
+ .TH "BUNDLE\-INSTALL" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-ISSUE" "1" "January 2025" ""
3
+ .TH "BUNDLE\-ISSUE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-issue\fR \- Get help reporting Bundler issues
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LICENSES" "1" "January 2025" ""
3
+ .TH "BUNDLE\-LICENSES" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-licenses\fR \- Print the license of all gems in the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LIST" "1" "January 2025" ""
3
+ .TH "BUNDLE\-LIST" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-list\fR \- List all the gems in the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LOCK" "1" "January 2025" ""
3
+ .TH "BUNDLE\-LOCK" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-OPEN" "1" "January 2025" ""
3
+ .TH "BUNDLE\-OPEN" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-OUTDATED" "1" "January 2025" ""
3
+ .TH "BUNDLE\-OUTDATED" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PLATFORM" "1" "January 2025" ""
3
+ .TH "BUNDLE\-PLATFORM" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-platform\fR \- Displays platform compatibility information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PLUGIN" "1" "January 2025" ""
3
+ .TH "BUNDLE\-PLUGIN" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-plugin\fR \- Manage Bundler plugins
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PRISTINE" "1" "January 2025" ""
3
+ .TH "BUNDLE\-PRISTINE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-REMOVE" "1" "January 2025" ""
3
+ .TH "BUNDLE\-REMOVE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-SHOW" "1" "January 2025" ""
3
+ .TH "BUNDLE\-SHOW" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-UPDATE" "1" "January 2025" ""
3
+ .TH "BUNDLE\-UPDATE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-update\fR \- Update your gems to the latest available versions
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-VERSION" "1" "January 2025" ""
3
+ .TH "BUNDLE\-VERSION" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-version\fR \- Prints Bundler version information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-VIZ" "1" "January 2025" ""
3
+ .TH "BUNDLE\-VIZ" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE" "1" "January 2025" ""
3
+ .TH "BUNDLE" "1" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\fR \- Ruby Dependency Management
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "GEMFILE" "5" "January 2025" ""
3
+ .TH "GEMFILE" "5" "March 2025" ""
4
4
  .SH "NAME"
5
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
6
6
  .SH "SYNOPSIS"
@@ -13,5 +13,18 @@ module Bundler
13
13
  def matches_current_rubygems?
14
14
  @required_rubygems_version.satisfied_by?(Gem.rubygems_version)
15
15
  end
16
+
17
+ def expanded_dependencies
18
+ runtime_dependencies + [
19
+ metadata_dependency("Ruby", @required_ruby_version),
20
+ metadata_dependency("RubyGems", @required_rubygems_version),
21
+ ].compact
22
+ end
23
+
24
+ def metadata_dependency(name, requirement)
25
+ return if requirement.nil? || requirement.none?
26
+
27
+ Gem::Dependency.new("#{name}\0", requirement)
28
+ end
16
29
  end
17
30
  end
@@ -67,7 +67,7 @@ module Bundler
67
67
  # to check out same version of gem later.
68
68
  #
69
69
  # There options are passed when the source plugin is created from the
70
- # lock file.
70
+ # lockfile.
71
71
  #
72
72
  # @return [Hash]
73
73
  def options_to_lock
@@ -31,7 +31,7 @@ module Bundler
31
31
 
32
32
  begin
33
33
  load_index(global_index_file, true)
34
- rescue GenericSystemCallError
34
+ rescue PermissionError
35
35
  # no need to fail when on a read-only FS, for example
36
36
  nil
37
37
  rescue ArgumentError => e
@@ -8,6 +8,14 @@ module Bundler
8
8
  SharedHelpers.in_bundle? ? Bundler.root : Plugin.root
9
9
  end
10
10
 
11
+ def eql?(other)
12
+ return unless other.class == self.class
13
+ expanded_original_path == other.expanded_original_path &&
14
+ version == other.version
15
+ end
16
+
17
+ alias_method :==, :eql?
18
+
11
19
  def generate_bin(spec, disable_extensions = false)
12
20
  # Need to find a way without code duplication
13
21
  # For now, we can ignore this
@@ -195,7 +195,7 @@ module Bundler
195
195
  @sources[name]
196
196
  end
197
197
 
198
- # @param [Hash] The options that are present in the lock file
198
+ # @param [Hash] The options that are present in the lockfile
199
199
  # @return [API::Source] the instance of the class that handles the source
200
200
  # type passed in locked_opts
201
201
  def from_lock(locked_opts)