bundler 2.4.13 → 2.4.15
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/exe/bundle +5 -13
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/definition.rb +70 -38
- data/lib/bundler/installer.rb +1 -1
- data/lib/bundler/lockfile_generator.rb +1 -1
- data/lib/bundler/lockfile_parser.rb +1 -0
- data/lib/bundler/resolver.rb +16 -2
- data/lib/bundler/runtime.rb +1 -1
- data/lib/bundler/settings.rb +3 -2
- data/lib/bundler/source/rubygems.rb +7 -5
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -1
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +9 -4
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler.rb +4 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d86d908aad51054ecd34b5431e5b831aa1290d51b1a0b84bbfa72993479f8bbe
|
4
|
+
data.tar.gz: ba67e60139c27838dc8a945f026d7551721b7a83c519631d595ab01a6ad42bf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0111c1f28e1069aece178f51b86a7786c335f2942c2df13efdc2c52066ae6ba1ad52eb249092f3e5bcb3729063249f5c2043e2e2d43263d6a029e6dac09c4c7c
|
7
|
+
data.tar.gz: 91e31ddab4115b5ae57385cb26e7b2eb66590bc1850ca008f3dd9fade35d7e28d147aac2dcb7a15904e4a2b60d430b5af4b7124d0f8de3a45304b1cd47ab6301
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,29 @@
|
|
1
|
+
# 2.4.15 (June 29, 2023)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Improve edge case error message [#6733](https://github.com/rubygems/rubygems/pull/6733)
|
6
|
+
|
7
|
+
## Bug fixes:
|
8
|
+
|
9
|
+
- Fix `bundle lock --update --bundler` [#6213](https://github.com/rubygems/rubygems/pull/6213)
|
10
|
+
|
11
|
+
# 2.4.14 (June 12, 2023)
|
12
|
+
|
13
|
+
## Enhancements:
|
14
|
+
|
15
|
+
- Stop publishing Gemfile in default gem template [#6723](https://github.com/rubygems/rubygems/pull/6723)
|
16
|
+
- Avoid infinite loops when hitting resolution bugs [#6722](https://github.com/rubygems/rubygems/pull/6722)
|
17
|
+
- Make `LockfileParser` usable with just a lockfile [#6694](https://github.com/rubygems/rubygems/pull/6694)
|
18
|
+
- Always rely on `$LOAD_PATH` when jumping from `exe/` to `lib/` [#6702](https://github.com/rubygems/rubygems/pull/6702)
|
19
|
+
- Make `frozen` setting take precedence over `deployment` setting [#6685](https://github.com/rubygems/rubygems/pull/6685)
|
20
|
+
- Show an error when trying to update bundler in frozen mode [#6684](https://github.com/rubygems/rubygems/pull/6684)
|
21
|
+
|
22
|
+
## Bug fixes:
|
23
|
+
|
24
|
+
- Fix `deployment` vs `path` precedence [#6703](https://github.com/rubygems/rubygems/pull/6703)
|
25
|
+
- Fix inline mode with multiple sources [#6699](https://github.com/rubygems/rubygems/pull/6699)
|
26
|
+
|
1
27
|
# 2.4.13 (May 9, 2023)
|
2
28
|
|
3
29
|
## Bug fixes:
|
data/exe/bundle
CHANGED
@@ -10,11 +10,11 @@ end
|
|
10
10
|
base_path = File.expand_path("../lib", __dir__)
|
11
11
|
|
12
12
|
if File.exist?(base_path)
|
13
|
-
|
14
|
-
else
|
15
|
-
require "bundler"
|
13
|
+
$LOAD_PATH.unshift(base_path)
|
16
14
|
end
|
17
15
|
|
16
|
+
require "bundler"
|
17
|
+
|
18
18
|
if Gem.rubygems_version < Gem::Version.new("3.2.3") && Gem.ruby_version < Gem::Version.new("2.7.a") && !ENV["BUNDLER_NO_OLD_RUBYGEMS_WARNING"]
|
19
19
|
Bundler.ui.warn \
|
20
20
|
"Your RubyGems version (#{Gem::VERSION}) has a bug that prevents " \
|
@@ -24,18 +24,10 @@ if Gem.rubygems_version < Gem::Version.new("3.2.3") && Gem.ruby_version < Gem::V
|
|
24
24
|
"and silence this warning by running `gem update --system 3.2.3`"
|
25
25
|
end
|
26
26
|
|
27
|
-
|
28
|
-
require_relative "../lib/bundler/friendly_errors"
|
29
|
-
else
|
30
|
-
require "bundler/friendly_errors"
|
31
|
-
end
|
27
|
+
require "bundler/friendly_errors"
|
32
28
|
|
33
29
|
Bundler.with_friendly_errors do
|
34
|
-
|
35
|
-
require_relative "../lib/bundler/cli"
|
36
|
-
else
|
37
|
-
require "bundler/cli"
|
38
|
-
end
|
30
|
+
require "bundler/cli"
|
39
31
|
|
40
32
|
# Allow any command to use --help flag to show help for that command
|
41
33
|
help_flags = %w[--help -h]
|
@@ -4,8 +4,8 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "2023-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2023-06-29".freeze
|
8
|
+
@git_commit_sha = "702f922bf2".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
data/lib/bundler/definition.rb
CHANGED
@@ -76,8 +76,11 @@ module Bundler
|
|
76
76
|
|
77
77
|
@lockfile = lockfile
|
78
78
|
@lockfile_contents = String.new
|
79
|
+
|
79
80
|
@locked_bundler_version = nil
|
80
|
-
@
|
81
|
+
@resolved_bundler_version = nil
|
82
|
+
|
83
|
+
@locked_ruby_version = nil
|
81
84
|
@new_platform = nil
|
82
85
|
@removed_platform = nil
|
83
86
|
|
@@ -146,7 +149,7 @@ module Bundler
|
|
146
149
|
@dependency_changes = converge_dependencies
|
147
150
|
@local_changes = converge_locals
|
148
151
|
|
149
|
-
@
|
152
|
+
@missing_lockfile_dep = check_missing_lockfile_dep
|
150
153
|
end
|
151
154
|
|
152
155
|
def gem_version_promoter
|
@@ -217,6 +220,7 @@ module Bundler
|
|
217
220
|
rescue BundlerError => e
|
218
221
|
@resolve = nil
|
219
222
|
@resolver = nil
|
223
|
+
@resolution_packages = nil
|
220
224
|
@specs = nil
|
221
225
|
@gem_version_promoter = nil
|
222
226
|
|
@@ -233,6 +237,14 @@ module Bundler
|
|
233
237
|
end
|
234
238
|
|
235
239
|
def current_dependencies
|
240
|
+
filter_relevant(dependencies)
|
241
|
+
end
|
242
|
+
|
243
|
+
def current_locked_dependencies
|
244
|
+
filter_relevant(locked_dependencies)
|
245
|
+
end
|
246
|
+
|
247
|
+
def filter_relevant(dependencies)
|
236
248
|
dependencies.select do |d|
|
237
249
|
d.should_include? && !d.gem_platforms([generic_local_platform]).empty?
|
238
250
|
end
|
@@ -272,7 +284,7 @@ module Bundler
|
|
272
284
|
@resolve ||= if Bundler.frozen_bundle?
|
273
285
|
Bundler.ui.debug "Frozen, using resolution from the lockfile"
|
274
286
|
@locked_specs
|
275
|
-
elsif
|
287
|
+
elsif no_resolve_needed?
|
276
288
|
if deleted_deps.any?
|
277
289
|
Bundler.ui.debug "Some dependencies were deleted, using a subset of the resolution from the lockfile"
|
278
290
|
SpecSet.new(filter_specs(@locked_specs, @dependencies - deleted_deps))
|
@@ -309,7 +321,7 @@ module Bundler
|
|
309
321
|
|
310
322
|
if @locked_bundler_version
|
311
323
|
locked_major = @locked_bundler_version.segments.first
|
312
|
-
current_major =
|
324
|
+
current_major = bundler_version_to_lock.segments.first
|
313
325
|
|
314
326
|
updating_major = locked_major < current_major
|
315
327
|
end
|
@@ -349,27 +361,16 @@ module Bundler
|
|
349
361
|
end
|
350
362
|
end
|
351
363
|
|
364
|
+
def bundler_version_to_lock
|
365
|
+
@resolved_bundler_version || Bundler.gem_version
|
366
|
+
end
|
367
|
+
|
352
368
|
def to_lock
|
353
369
|
require_relative "lockfile_generator"
|
354
370
|
LockfileGenerator.generate(self)
|
355
371
|
end
|
356
372
|
|
357
373
|
def ensure_equivalent_gemfile_and_lockfile(explicit_flag = false)
|
358
|
-
msg = String.new
|
359
|
-
msg << "You are trying to install in deployment mode after changing\n" \
|
360
|
-
"your Gemfile. Run `bundle install` elsewhere and add the\n" \
|
361
|
-
"updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control."
|
362
|
-
|
363
|
-
unless explicit_flag
|
364
|
-
suggested_command = if Bundler.settings.locations("frozen").keys.&([:global, :local]).any?
|
365
|
-
"bundle config unset frozen"
|
366
|
-
elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
|
367
|
-
"bundle config unset deployment"
|
368
|
-
end
|
369
|
-
msg << "\n\nIf this is a development machine, remove the #{Bundler.default_gemfile} " \
|
370
|
-
"freeze \nby running `#{suggested_command}`." if suggested_command
|
371
|
-
end
|
372
|
-
|
373
374
|
added = []
|
374
375
|
deleted = []
|
375
376
|
changed = []
|
@@ -383,13 +384,8 @@ module Bundler
|
|
383
384
|
deleted.concat deleted_deps.map {|d| "* #{pretty_dep(d)}" } if deleted_deps.any?
|
384
385
|
|
385
386
|
both_sources = Hash.new {|h, k| h[k] = [] }
|
386
|
-
|
387
|
-
|
388
|
-
locked_dependencies.each do |d|
|
389
|
-
next if !Bundler.feature_flag.bundler_3_mode? && @locked_specs[d.name].empty?
|
390
|
-
|
391
|
-
both_sources[d.name][1] = d
|
392
|
-
end
|
387
|
+
current_dependencies.each {|d| both_sources[d.name][0] = d }
|
388
|
+
current_locked_dependencies.each {|d| both_sources[d.name][1] = d }
|
393
389
|
|
394
390
|
both_sources.each do |name, (dep, lock_dep)|
|
395
391
|
next if dep.nil? || lock_dep.nil?
|
@@ -404,11 +400,20 @@ module Bundler
|
|
404
400
|
end
|
405
401
|
|
406
402
|
reason = change_reason
|
407
|
-
msg
|
403
|
+
msg = String.new
|
404
|
+
msg << "#{reason.capitalize.strip}, but the lockfile can't be updated because frozen mode is set"
|
408
405
|
msg << "\n\nYou have added to the Gemfile:\n" << added.join("\n") if added.any?
|
409
406
|
msg << "\n\nYou have deleted from the Gemfile:\n" << deleted.join("\n") if deleted.any?
|
410
407
|
msg << "\n\nYou have changed in the Gemfile:\n" << changed.join("\n") if changed.any?
|
411
|
-
msg << "\n"
|
408
|
+
msg << "\n\nRun `bundle install` elsewhere and add the updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control.\n"
|
409
|
+
|
410
|
+
unless explicit_flag
|
411
|
+
suggested_command = unless Bundler.settings.locations("frozen").keys.include?(:env)
|
412
|
+
"bundle config set frozen false"
|
413
|
+
end
|
414
|
+
msg << "If this is a development machine, remove the #{Bundler.default_gemfile.relative_path_from(SharedHelpers.pwd)} " \
|
415
|
+
"freeze by running `#{suggested_command}`." if suggested_command
|
416
|
+
end
|
412
417
|
|
413
418
|
raise ProductionError, msg if added.any? || deleted.any? || changed.any? || !nothing_changed?
|
414
419
|
end
|
@@ -473,7 +478,11 @@ module Bundler
|
|
473
478
|
private :sources
|
474
479
|
|
475
480
|
def nothing_changed?
|
476
|
-
!@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes && !@
|
481
|
+
!@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes && !@missing_lockfile_dep && !@unlocking_bundler
|
482
|
+
end
|
483
|
+
|
484
|
+
def no_resolve_needed?
|
485
|
+
!unlocking? && nothing_changed?
|
477
486
|
end
|
478
487
|
|
479
488
|
def unlocking?
|
@@ -487,7 +496,14 @@ module Bundler
|
|
487
496
|
end
|
488
497
|
|
489
498
|
def expanded_dependencies
|
490
|
-
|
499
|
+
dependencies_with_bundler + metadata_dependencies
|
500
|
+
end
|
501
|
+
|
502
|
+
def dependencies_with_bundler
|
503
|
+
return dependencies unless @unlocking_bundler
|
504
|
+
return dependencies if dependencies.map(&:name).include?("bundler")
|
505
|
+
|
506
|
+
[Dependency.new("bundler", @unlocking_bundler)] + dependencies
|
491
507
|
end
|
492
508
|
|
493
509
|
def resolution_packages
|
@@ -553,6 +569,8 @@ module Bundler
|
|
553
569
|
def start_resolution
|
554
570
|
result = resolver.start
|
555
571
|
|
572
|
+
@resolved_bundler_version = result.find {|spec| spec.name == "bundler" }&.version
|
573
|
+
|
556
574
|
SpecSet.new(SpecSet.new(result).for(dependencies, false, @platforms))
|
557
575
|
end
|
558
576
|
|
@@ -610,7 +628,8 @@ module Bundler
|
|
610
628
|
[@new_platform, "you added a new platform to your gemfile"],
|
611
629
|
[@path_changes, "the gemspecs for path gems changed"],
|
612
630
|
[@local_changes, "the gemspecs for git local gems changed"],
|
613
|
-
[@
|
631
|
+
[@missing_lockfile_dep, "your lock file is missing \"#{@missing_lockfile_dep}\""],
|
632
|
+
[@unlocking_bundler, "an update to the version of Bundler itself was requested"],
|
614
633
|
].select(&:first).map(&:last).join(", ")
|
615
634
|
end
|
616
635
|
|
@@ -665,7 +684,7 @@ module Bundler
|
|
665
684
|
!sources_with_changes.each {|source| @unlock[:sources] << source.name }.empty?
|
666
685
|
end
|
667
686
|
|
668
|
-
def
|
687
|
+
def check_missing_lockfile_dep
|
669
688
|
all_locked_specs = @locked_specs.map(&:name) << "bundler"
|
670
689
|
|
671
690
|
missing = @locked_specs.select do |s|
|
@@ -675,10 +694,14 @@ module Bundler
|
|
675
694
|
if missing.any?
|
676
695
|
@locked_specs.delete(missing)
|
677
696
|
|
678
|
-
|
679
|
-
else
|
680
|
-
false
|
697
|
+
return missing.first.name
|
681
698
|
end
|
699
|
+
|
700
|
+
return if @dependency_changes
|
701
|
+
|
702
|
+
current_dependencies.find do |d|
|
703
|
+
@locked_specs[d.name].empty?
|
704
|
+
end&.name
|
682
705
|
end
|
683
706
|
|
684
707
|
def converge_paths
|
@@ -862,8 +885,16 @@ module Bundler
|
|
862
885
|
metadata_dependencies.each do |dep|
|
863
886
|
source_requirements[dep.name] = sources.metadata_source
|
864
887
|
end
|
865
|
-
|
866
|
-
source_requirements["bundler"]
|
888
|
+
|
889
|
+
default_bundler_source = source_requirements["bundler"] || sources.default_source
|
890
|
+
|
891
|
+
if @unlocking_bundler
|
892
|
+
default_bundler_source.add_dependency_names("bundler")
|
893
|
+
else
|
894
|
+
source_requirements[:default_bundler] = default_bundler_source
|
895
|
+
source_requirements["bundler"] = sources.metadata_source # needs to come last to override
|
896
|
+
end
|
897
|
+
|
867
898
|
verify_changed_sources!
|
868
899
|
source_requirements
|
869
900
|
end
|
@@ -886,7 +917,8 @@ module Bundler
|
|
886
917
|
if preserve_unknown_sections
|
887
918
|
sections_to_ignore = LockfileParser.sections_to_ignore(@locked_bundler_version)
|
888
919
|
sections_to_ignore += LockfileParser.unknown_sections_in_lockfile(current)
|
889
|
-
sections_to_ignore
|
920
|
+
sections_to_ignore << LockfileParser::RUBY
|
921
|
+
sections_to_ignore << LockfileParser::BUNDLED unless @unlocking_bundler
|
890
922
|
pattern = /#{Regexp.union(sections_to_ignore)}\n(\s{2,}.*\n)+/
|
891
923
|
whitespace_cleanup = /\n{2,}/
|
892
924
|
current = current.gsub(pattern, "\n").gsub(whitespace_cleanup, "\n\n").strip
|
data/lib/bundler/installer.rb
CHANGED
@@ -90,7 +90,7 @@ module Bundler
|
|
90
90
|
|
91
91
|
Gem::Specification.reset # invalidate gem specification cache so that installed gems are immediately available
|
92
92
|
|
93
|
-
lock
|
93
|
+
lock
|
94
94
|
Standalone.new(options[:standalone], @definition).generate if options[:standalone]
|
95
95
|
end
|
96
96
|
end
|
@@ -26,6 +26,7 @@ module Bundler
|
|
26
26
|
KNOWN_SECTIONS = SECTIONS_BY_VERSION_INTRODUCED.values.flatten.freeze
|
27
27
|
|
28
28
|
ENVIRONMENT_VERSION_SECTIONS = [BUNDLED, RUBY].freeze
|
29
|
+
deprecate_constant(:ENVIRONMENT_VERSION_SECTIONS)
|
29
30
|
|
30
31
|
def self.sections_in_lockfile(lockfile_contents)
|
31
32
|
lockfile_contents.scan(/^\w[\w ]*$/).uniq
|
data/lib/bundler/resolver.rb
CHANGED
@@ -160,7 +160,7 @@ module Bundler
|
|
160
160
|
constraint_string = constraint.constraint_string
|
161
161
|
requirements = constraint_string.split(" OR ").map {|req| Gem::Requirement.new(req.split(",")) }
|
162
162
|
|
163
|
-
if name == "bundler"
|
163
|
+
if name == "bundler" && bundler_pinned_to_current_version?
|
164
164
|
custom_explanation = "the current Bundler version (#{Bundler::VERSION}) does not satisfy #{constraint}"
|
165
165
|
extended_explanation = bundler_not_found_message(requirements)
|
166
166
|
else
|
@@ -230,6 +230,12 @@ module Bundler
|
|
230
230
|
def all_versions_for(package)
|
231
231
|
name = package.name
|
232
232
|
results = (@base[name] + filter_prereleases(@all_specs[name], package)).uniq {|spec| [spec.version.hash, spec.platform] }
|
233
|
+
|
234
|
+
if name == "bundler" && !bundler_pinned_to_current_version?
|
235
|
+
bundler_spec = Gem.loaded_specs["bundler"]
|
236
|
+
results << bundler_spec if bundler_spec
|
237
|
+
end
|
238
|
+
|
233
239
|
locked_requirement = base_requirements[name]
|
234
240
|
results = filter_matching_specs(results, locked_requirement) if locked_requirement
|
235
241
|
|
@@ -254,6 +260,14 @@ module Bundler
|
|
254
260
|
@source_requirements[name] || @source_requirements[:default]
|
255
261
|
end
|
256
262
|
|
263
|
+
def default_bundler_source
|
264
|
+
@source_requirements[:default_bundler]
|
265
|
+
end
|
266
|
+
|
267
|
+
def bundler_pinned_to_current_version?
|
268
|
+
!default_bundler_source.nil?
|
269
|
+
end
|
270
|
+
|
257
271
|
def name_for_explicit_dependency_source
|
258
272
|
Bundler.default_gemfile.basename.to_s
|
259
273
|
rescue StandardError
|
@@ -398,7 +412,7 @@ module Bundler
|
|
398
412
|
end
|
399
413
|
|
400
414
|
def bundler_not_found_message(conflict_dependencies)
|
401
|
-
candidate_specs = filter_matching_specs(
|
415
|
+
candidate_specs = filter_matching_specs(default_bundler_source.specs.search("bundler"), conflict_dependencies)
|
402
416
|
|
403
417
|
if candidate_specs.any?
|
404
418
|
target_version = candidate_specs.last.version
|
data/lib/bundler/runtime.rb
CHANGED
@@ -94,7 +94,7 @@ module Bundler
|
|
94
94
|
definition_method :requires
|
95
95
|
|
96
96
|
def lock(opts = {})
|
97
|
-
return if @definition.
|
97
|
+
return if @definition.no_resolve_needed?
|
98
98
|
@definition.lock(Bundler.default_lockfile, opts[:preserve_unknown_sections])
|
99
99
|
end
|
100
100
|
|
data/lib/bundler/settings.rb
CHANGED
@@ -219,7 +219,6 @@ module Bundler
|
|
219
219
|
def path
|
220
220
|
configs.each do |_level, settings|
|
221
221
|
path = value_for("path", settings)
|
222
|
-
path = "vendor/bundle" if value_for("deployment", settings) && path.nil?
|
223
222
|
path_system = value_for("path.system", settings)
|
224
223
|
disabled_shared_gems = value_for("disable_shared_gems", settings)
|
225
224
|
next if path.nil? && path_system.nil? && disabled_shared_gems.nil?
|
@@ -227,7 +226,9 @@ module Bundler
|
|
227
226
|
return Path.new(path, system_path)
|
228
227
|
end
|
229
228
|
|
230
|
-
|
229
|
+
path = "vendor/bundle" if self[:deployment]
|
230
|
+
|
231
|
+
Path.new(path, false)
|
231
232
|
end
|
232
233
|
|
233
234
|
Path = Struct.new(:explicit_path, :system_path) do
|
@@ -10,7 +10,7 @@ module Bundler
|
|
10
10
|
# Ask for X gems per API request
|
11
11
|
API_REQUEST_SIZE = 50
|
12
12
|
|
13
|
-
attr_reader :remotes
|
13
|
+
attr_reader :remotes
|
14
14
|
|
15
15
|
def initialize(options = {})
|
16
16
|
@options = options
|
@@ -19,11 +19,14 @@ module Bundler
|
|
19
19
|
@allow_remote = false
|
20
20
|
@allow_cached = false
|
21
21
|
@allow_local = options["allow_local"] || false
|
22
|
-
@caches = [cache_path, *Bundler.rubygems.gem_cache]
|
23
22
|
|
24
23
|
Array(options["remotes"]).reverse_each {|r| add_remote(r) }
|
25
24
|
end
|
26
25
|
|
26
|
+
def caches
|
27
|
+
@caches ||= [cache_path, *Bundler.rubygems.gem_cache]
|
28
|
+
end
|
29
|
+
|
27
30
|
def local_only!
|
28
31
|
@specs = nil
|
29
32
|
@allow_local = true
|
@@ -324,9 +327,9 @@ module Bundler
|
|
324
327
|
|
325
328
|
def cached_path(spec)
|
326
329
|
global_cache_path = download_cache_path(spec)
|
327
|
-
|
330
|
+
caches << global_cache_path if global_cache_path
|
328
331
|
|
329
|
-
possibilities =
|
332
|
+
possibilities = caches.map {|p| package_path(p, spec) }
|
330
333
|
possibilities.find {|p| File.exist?(p) }
|
331
334
|
end
|
332
335
|
|
@@ -378,7 +381,6 @@ module Bundler
|
|
378
381
|
idx = @allow_local ? installed_specs.dup : Index.new
|
379
382
|
|
380
383
|
Dir["#{cache_path}/*.gem"].each do |gemfile|
|
381
|
-
next if /^bundler\-[\d\.]+?\.gem/.match?(gemfile)
|
382
384
|
s ||= Bundler.rubygems.spec_from_gem(gemfile)
|
383
385
|
s.source = self
|
384
386
|
idx << s
|
@@ -29,7 +29,8 @@ Gem::Specification.new do |spec|
|
|
29
29
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
30
30
|
spec.files = Dir.chdir(__dir__) do
|
31
31
|
`git ls-files -z`.split("\x0").reject do |f|
|
32
|
-
(File.expand_path(f) == __FILE__) ||
|
32
|
+
(File.expand_path(f) == __FILE__) ||
|
33
|
+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
|
33
34
|
end
|
34
35
|
end
|
35
36
|
spec.bindir = "exe"
|
@@ -162,7 +162,7 @@ module Bundler::PubGrub
|
|
162
162
|
def resolve_conflict(incompatibility)
|
163
163
|
logger.info { "conflict: #{incompatibility}" }
|
164
164
|
|
165
|
-
new_incompatibility =
|
165
|
+
new_incompatibility = nil
|
166
166
|
|
167
167
|
while !incompatibility.failure?
|
168
168
|
most_recent_term = nil
|
@@ -204,7 +204,7 @@ module Bundler::PubGrub
|
|
204
204
|
solution.backtrack(previous_level)
|
205
205
|
|
206
206
|
if new_incompatibility
|
207
|
-
add_incompatibility(
|
207
|
+
add_incompatibility(new_incompatibility)
|
208
208
|
end
|
209
209
|
|
210
210
|
return incompatibility
|
@@ -219,9 +219,14 @@ module Bundler::PubGrub
|
|
219
219
|
new_terms << difference.invert
|
220
220
|
end
|
221
221
|
|
222
|
-
|
222
|
+
new_incompatibility = Incompatibility.new(new_terms, cause: Incompatibility::ConflictCause.new(incompatibility, most_recent_satisfier.cause))
|
223
223
|
|
224
|
-
|
224
|
+
if incompatibility.to_s == new_incompatibility.to_s
|
225
|
+
logger.info { "!! failed to resolve conflicts, this shouldn't have happened" }
|
226
|
+
break
|
227
|
+
end
|
228
|
+
|
229
|
+
incompatibility = new_incompatibility
|
225
230
|
|
226
231
|
partially = difference ? " partially" : ""
|
227
232
|
logger.info { "! #{most_recent_term} is#{partially} satisfied by #{most_recent_satisfier.term}" }
|
data/lib/bundler/version.rb
CHANGED
data/lib/bundler.rb
CHANGED
@@ -210,9 +210,10 @@ module Bundler
|
|
210
210
|
end
|
211
211
|
|
212
212
|
def frozen_bundle?
|
213
|
-
frozen = settings[:
|
214
|
-
frozen
|
215
|
-
|
213
|
+
frozen = settings[:frozen]
|
214
|
+
return frozen unless frozen.nil?
|
215
|
+
|
216
|
+
settings[:deployment]
|
216
217
|
end
|
217
218
|
|
218
219
|
def locked_gems
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Arko
|
@@ -22,7 +22,7 @@ authors:
|
|
22
22
|
autorequire:
|
23
23
|
bindir: exe
|
24
24
|
cert_chain: []
|
25
|
-
date: 2023-
|
25
|
+
date: 2023-06-29 00:00:00.000000000 Z
|
26
26
|
dependencies: []
|
27
27
|
description: Bundler manages an application's dependencies through its entire life,
|
28
28
|
across many machines, systematically and repeatably
|
@@ -381,7 +381,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
381
381
|
- !ruby/object:Gem::Version
|
382
382
|
version: 3.0.1
|
383
383
|
requirements: []
|
384
|
-
rubygems_version: 3.4.
|
384
|
+
rubygems_version: 3.4.15
|
385
385
|
signing_key:
|
386
386
|
specification_version: 4
|
387
387
|
summary: The best way to manage your application's dependencies
|