rubygems-update 3.5.15 → 3.5.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -1
- data/bundler/CHANGELOG.md +15 -1
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/definition.rb +21 -13
- data/bundler/lib/bundler/env.rb +1 -1
- data/bundler/lib/bundler/gem_helpers.rb +14 -7
- data/bundler/lib/bundler/injector.rb +1 -4
- data/bundler/lib/bundler/installer/standalone.rb +0 -3
- data/bundler/lib/bundler/installer.rb +1 -3
- data/bundler/lib/bundler/lazy_specification.rb +1 -0
- data/bundler/lib/bundler/resolver/base.rb +4 -0
- data/bundler/lib/bundler/resolver/candidate.rb +4 -16
- data/bundler/lib/bundler/resolver/package.rb +4 -0
- data/bundler/lib/bundler/resolver/spec_group.rb +20 -2
- data/bundler/lib/bundler/resolver.rb +18 -9
- data/bundler/lib/bundler/rubygems_ext.rb +30 -0
- data/bundler/lib/bundler/rubygems_integration.rb +1 -1
- data/bundler/lib/bundler/runtime.rb +1 -1
- data/bundler/lib/bundler/source/rubygems.rb +1 -0
- data/bundler/lib/bundler/spec_set.rb +14 -12
- data/bundler/lib/bundler/stub_specification.rb +8 -0
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems/config_file.rb +13 -8
- data/lib/rubygems/specification.rb +2 -2
- data/lib/rubygems.rb +1 -1
- data/rubygems-update.gemspec +1 -1
- 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: 97995bf356031d7683c1336089b3520a4604416619ce917d5efb42f628c8abc2
|
4
|
+
data.tar.gz: 3f66e1705ddc62583b44bebedd33089c7edbb6ba27f4ecfee984069a53f97548
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e92f698093d5c671bb617ecb0d5b25e3803b55f182e3cf523e4a2490278ece4a9ed0aa4d984d54ae2f0703847d2b63c50557d1fc05d84b2cd40b6d87c85fe105
|
7
|
+
data.tar.gz: 520eead8b68e27c40f18e54976aac985e1d52baed43b080bbb54a7ab43d6c3f936f8a0d57a0c1fe797e17bdf0a189f4d920e0876b2f938f6ebd571e391c74a28
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,24 @@
|
|
1
|
-
# 3.5.
|
1
|
+
# 3.5.16 / 2024-07-18
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
* Installs bundler 2.5.16 as a default gem.
|
6
|
+
|
7
|
+
## Bug fixes:
|
8
|
+
|
9
|
+
* Fix gemspec `require_paths` validation. Pull request
|
10
|
+
[#7866](https://github.com/rubygems/rubygems/pull/7866) by
|
11
|
+
deivid-rodriguez
|
12
|
+
* Fix loading of nested `gemrc` config keys when specified as symbols.
|
13
|
+
Pull request [#7851](https://github.com/rubygems/rubygems/pull/7851) by
|
14
|
+
moofkit
|
15
|
+
|
16
|
+
## Performance:
|
17
|
+
|
18
|
+
* Use `caller_locations` instead of splitting `caller`. Pull request
|
19
|
+
[#7708](https://github.com/rubygems/rubygems/pull/7708) by nobu
|
20
|
+
|
21
|
+
# 3.5.15 / 2024-07-09
|
2
22
|
|
3
23
|
## Enhancements:
|
4
24
|
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,4 +1,18 @@
|
|
1
|
-
# 2.5.
|
1
|
+
# 2.5.16 (July 18, 2024)
|
2
|
+
|
3
|
+
## Bug fixes:
|
4
|
+
|
5
|
+
- Fix platform removal regression when `platforms:` used in the Gemfile [#7864](https://github.com/rubygems/rubygems/pull/7864)
|
6
|
+
- Fix standalone script when default gems with extensions are used [#7870](https://github.com/rubygems/rubygems/pull/7870)
|
7
|
+
- Fix another case of `bundle lock --add-platform` doing nothing [#7848](https://github.com/rubygems/rubygems/pull/7848)
|
8
|
+
- Fix bad error messages when using `bundle add` with frozen mode set [#7845](https://github.com/rubygems/rubygems/pull/7845)
|
9
|
+
- Fix generic platform gems getting incorrectly removed from lockfile [#7833](https://github.com/rubygems/rubygems/pull/7833)
|
10
|
+
|
11
|
+
## Performance:
|
12
|
+
|
13
|
+
- Use `caller_locations` instead of splitting `caller` [#7708](https://github.com/rubygems/rubygems/pull/7708)
|
14
|
+
|
15
|
+
# 2.5.15 (July 9, 2024)
|
2
16
|
|
3
17
|
## Enhancements:
|
4
18
|
|
@@ -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 = "2024-07-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2024-07-18".freeze
|
8
|
+
@git_commit_sha = "f49d3d48c9".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -81,7 +81,7 @@ module Bundler
|
|
81
81
|
@resolved_bundler_version = nil
|
82
82
|
|
83
83
|
@locked_ruby_version = nil
|
84
|
-
@
|
84
|
+
@new_platforms = []
|
85
85
|
@removed_platform = nil
|
86
86
|
|
87
87
|
if lockfile_exists?
|
@@ -367,6 +367,10 @@ module Bundler
|
|
367
367
|
end
|
368
368
|
|
369
369
|
def ensure_equivalent_gemfile_and_lockfile(explicit_flag = false)
|
370
|
+
return unless Bundler.frozen_bundle?
|
371
|
+
|
372
|
+
raise ProductionError, "Frozen mode is set, but there's no lockfile" unless lockfile_exists?
|
373
|
+
|
370
374
|
added = []
|
371
375
|
deleted = []
|
372
376
|
changed = []
|
@@ -395,7 +399,7 @@ module Bundler
|
|
395
399
|
changed << "* #{name} from `#{lockfile_source_name}` to `#{gemfile_source_name}`"
|
396
400
|
end
|
397
401
|
|
398
|
-
reason = change_reason
|
402
|
+
reason = nothing_changed? ? "some dependencies were deleted from your gemfile" : change_reason
|
399
403
|
msg = String.new
|
400
404
|
msg << "#{reason.capitalize.strip}, but the lockfile can't be updated because frozen mode is set"
|
401
405
|
msg << "\n\nYou have added to the Gemfile:\n" << added.join("\n") if added.any?
|
@@ -453,8 +457,10 @@ module Bundler
|
|
453
457
|
end
|
454
458
|
|
455
459
|
def add_platform(platform)
|
456
|
-
|
457
|
-
|
460
|
+
return if @platforms.include?(platform)
|
461
|
+
|
462
|
+
@new_platforms << platform
|
463
|
+
@platforms << platform
|
458
464
|
end
|
459
465
|
|
460
466
|
def remove_platform(platform)
|
@@ -478,7 +484,7 @@ module Bundler
|
|
478
484
|
|
479
485
|
!@source_changes &&
|
480
486
|
!@dependency_changes &&
|
481
|
-
|
487
|
+
@new_platforms.empty? &&
|
482
488
|
!@path_changes &&
|
483
489
|
!@local_changes &&
|
484
490
|
!@missing_lockfile_dep &&
|
@@ -561,7 +567,7 @@ module Bundler
|
|
561
567
|
def resolution_packages
|
562
568
|
@resolution_packages ||= begin
|
563
569
|
last_resolve = converge_locked_specs
|
564
|
-
remove_invalid_platforms!
|
570
|
+
remove_invalid_platforms!
|
565
571
|
packages = Resolver::Base.new(source_requirements, expanded_dependencies, last_resolve, @platforms, locked_specs: @originally_locked_specs, unlock: @gems_to_unlock, prerelease: gem_version_promoter.pre?)
|
566
572
|
packages = additional_base_requirements_to_prevent_downgrades(packages, last_resolve)
|
567
573
|
packages = additional_base_requirements_to_force_updates(packages)
|
@@ -629,7 +635,7 @@ module Bundler
|
|
629
635
|
@resolved_bundler_version = result.find {|spec| spec.name == "bundler" }&.version
|
630
636
|
|
631
637
|
if @most_specific_non_local_locked_ruby_platform
|
632
|
-
if
|
638
|
+
if spec_set_incomplete_for_platform?(result, @most_specific_non_local_locked_ruby_platform)
|
633
639
|
@platforms.delete(@most_specific_non_local_locked_ruby_platform)
|
634
640
|
elsif local_platform_needed_for_resolvability
|
635
641
|
@platforms.delete(local_platform)
|
@@ -638,8 +644,6 @@ module Bundler
|
|
638
644
|
|
639
645
|
@platforms = result.add_extra_platforms!(platforms) if should_add_extra_platforms?
|
640
646
|
|
641
|
-
result.complete_platforms!(platforms)
|
642
|
-
|
643
647
|
SpecSet.new(result.for(dependencies, false, @platforms))
|
644
648
|
end
|
645
649
|
|
@@ -701,7 +705,7 @@ module Bundler
|
|
701
705
|
[
|
702
706
|
[@source_changes, "the list of sources changed"],
|
703
707
|
[@dependency_changes, "the dependencies in your gemfile changed"],
|
704
|
-
[@
|
708
|
+
[@new_platforms.any?, "you added a new platform to your gemfile"],
|
705
709
|
[@path_changes, "the gemspecs for path gems changed"],
|
706
710
|
[@local_changes, "the gemspecs for git local gems changed"],
|
707
711
|
[@missing_lockfile_dep, "your lock file is missing \"#{@missing_lockfile_dep}\""],
|
@@ -1054,21 +1058,25 @@ module Bundler
|
|
1054
1058
|
unlocked_definition
|
1055
1059
|
end
|
1056
1060
|
|
1057
|
-
def remove_invalid_platforms!
|
1061
|
+
def remove_invalid_platforms!
|
1058
1062
|
return if Bundler.frozen_bundle?
|
1059
1063
|
|
1060
1064
|
platforms.reverse_each do |platform|
|
1061
1065
|
next if local_platform == platform ||
|
1062
|
-
|
1066
|
+
@new_platforms.include?(platform) ||
|
1063
1067
|
@path_changes ||
|
1064
1068
|
@dependency_changes ||
|
1065
1069
|
@locked_spec_with_invalid_deps ||
|
1066
|
-
|
1070
|
+
!spec_set_incomplete_for_platform?(@originally_locked_specs, platform)
|
1067
1071
|
|
1068
1072
|
remove_platform(platform)
|
1069
1073
|
end
|
1070
1074
|
end
|
1071
1075
|
|
1076
|
+
def spec_set_incomplete_for_platform?(spec_set, platform)
|
1077
|
+
spec_set.incomplete_for_platform?(current_dependencies, platform)
|
1078
|
+
end
|
1079
|
+
|
1072
1080
|
def source_map
|
1073
1081
|
@source_map ||= SourceMap.new(sources, dependencies, @locked_specs)
|
1074
1082
|
end
|
data/bundler/lib/bundler/env.rb
CHANGED
@@ -120,7 +120,7 @@ module Bundler
|
|
120
120
|
specs = Bundler.rubygems.find_name(name)
|
121
121
|
out << [" #{name}", "(#{specs.map(&:version).join(",")})"] unless specs.empty?
|
122
122
|
end
|
123
|
-
if (exe =
|
123
|
+
if (exe = caller_locations.last.absolute_path)&.match? %r{(exe|bin)/bundler?\z}
|
124
124
|
shebang = File.read(exe).lines.first
|
125
125
|
shebang.sub!(/^#!\s*/, "")
|
126
126
|
unless shebang.start_with?(Gem.ruby, "/usr/bin/env ruby")
|
@@ -46,19 +46,26 @@ module Bundler
|
|
46
46
|
end
|
47
47
|
module_function :platform_specificity_match
|
48
48
|
|
49
|
-
def select_best_platform_match(specs, platform)
|
50
|
-
matching =
|
49
|
+
def select_best_platform_match(specs, platform, force_ruby: false, prefer_locked: false)
|
50
|
+
matching = if force_ruby
|
51
|
+
specs.select {|spec| spec.match_platform(Gem::Platform::RUBY) && spec.force_ruby_platform! }
|
52
|
+
else
|
53
|
+
specs.select {|spec| spec.match_platform(platform) }
|
54
|
+
end
|
55
|
+
|
56
|
+
if prefer_locked
|
57
|
+
locked_originally = matching.select {|spec| spec.is_a?(LazySpecification) }
|
58
|
+
return locked_originally if locked_originally.any?
|
59
|
+
end
|
51
60
|
|
52
61
|
sort_best_platform_match(matching, platform)
|
53
62
|
end
|
54
63
|
module_function :select_best_platform_match
|
55
64
|
|
56
|
-
def
|
57
|
-
|
58
|
-
|
59
|
-
sort_best_platform_match(matching, Gem::Platform::RUBY)
|
65
|
+
def select_best_local_platform_match(specs, force_ruby: false)
|
66
|
+
select_best_platform_match(specs, local_platform, force_ruby: force_ruby).map(&:materialize_for_installation).compact
|
60
67
|
end
|
61
|
-
module_function :
|
68
|
+
module_function :select_best_local_platform_match
|
62
69
|
|
63
70
|
def sort_best_platform_match(matching, platform)
|
64
71
|
exact = matching.select {|spec| spec.platform == platform }
|
@@ -23,10 +23,7 @@ module Bundler
|
|
23
23
|
# @param [Pathname] lockfile_path The lockfile in which to inject the new dependency.
|
24
24
|
# @return [Array]
|
25
25
|
def inject(gemfile_path, lockfile_path)
|
26
|
-
|
27
|
-
# ensure the lock and Gemfile are synced
|
28
|
-
Bundler.definition.ensure_equivalent_gemfile_and_lockfile(true)
|
29
|
-
end
|
26
|
+
Bundler.definition.ensure_equivalent_gemfile_and_lockfile(true)
|
30
27
|
|
31
28
|
# temporarily unfreeze
|
32
29
|
Bundler.settings.temporary(deployment: false, frozen: false) do
|
@@ -58,9 +58,6 @@ module Bundler
|
|
58
58
|
else
|
59
59
|
SharedHelpers.relative_path_to(full_path, from: Bundler.root.join(bundler_path))
|
60
60
|
end
|
61
|
-
rescue TypeError
|
62
|
-
error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
|
63
|
-
raise Gem::InvalidSpecificationException.new(error_message)
|
64
61
|
end
|
65
62
|
|
66
63
|
def prevent_gem_activation
|
@@ -69,9 +69,7 @@ module Bundler
|
|
69
69
|
Bundler.create_bundle_path
|
70
70
|
|
71
71
|
ProcessLock.lock do
|
72
|
-
|
73
|
-
@definition.ensure_equivalent_gemfile_and_lockfile(options[:deployment])
|
74
|
-
end
|
72
|
+
@definition.ensure_equivalent_gemfile_and_lockfile(options[:deployment])
|
75
73
|
|
76
74
|
if @definition.dependencies.empty?
|
77
75
|
Bundler.ui.warn "The Gemfile specifies no dependencies"
|
@@ -24,10 +24,10 @@ module Bundler
|
|
24
24
|
|
25
25
|
attr_reader :version
|
26
26
|
|
27
|
-
def initialize(version,
|
28
|
-
@spec_group =
|
27
|
+
def initialize(version, group: nil, priority: -1)
|
28
|
+
@spec_group = group || SpecGroup.new([])
|
29
29
|
@version = Gem::Version.new(version)
|
30
|
-
@
|
30
|
+
@priority = priority
|
31
31
|
end
|
32
32
|
|
33
33
|
def dependencies
|
@@ -40,18 +40,6 @@ module Bundler
|
|
40
40
|
@spec_group.to_specs(package.force_ruby_platform?)
|
41
41
|
end
|
42
42
|
|
43
|
-
def generic!
|
44
|
-
@ruby_only = true
|
45
|
-
|
46
|
-
self
|
47
|
-
end
|
48
|
-
|
49
|
-
def platform_specific!
|
50
|
-
@ruby_only = false
|
51
|
-
|
52
|
-
self
|
53
|
-
end
|
54
|
-
|
55
43
|
def prerelease?
|
56
44
|
@version.prerelease?
|
57
45
|
end
|
@@ -61,7 +49,7 @@ module Bundler
|
|
61
49
|
end
|
62
50
|
|
63
51
|
def sort_obj
|
64
|
-
[@version, @
|
52
|
+
[@version, @priority]
|
65
53
|
end
|
66
54
|
|
67
55
|
def <=>(other)
|
@@ -25,6 +25,10 @@ module Bundler
|
|
25
25
|
@prerelease = @dependency.prerelease? || @locked_version&.prerelease? || prerelease ? :consider_first : :ignore
|
26
26
|
end
|
27
27
|
|
28
|
+
def platform_specs(specs)
|
29
|
+
platforms.map {|platform| GemHelpers.select_best_platform_match(specs, platform, prefer_locked: !unlock?) }
|
30
|
+
end
|
31
|
+
|
28
32
|
def to_s
|
29
33
|
@name.delete("\0")
|
30
34
|
end
|
@@ -3,6 +3,8 @@
|
|
3
3
|
module Bundler
|
4
4
|
class Resolver
|
5
5
|
class SpecGroup
|
6
|
+
attr_reader :specs
|
7
|
+
|
6
8
|
def initialize(specs)
|
7
9
|
@specs = specs
|
8
10
|
end
|
@@ -38,17 +40,33 @@ module Bundler
|
|
38
40
|
def dependencies
|
39
41
|
@dependencies ||= @specs.map do |spec|
|
40
42
|
__dependencies(spec) + metadata_dependencies(spec)
|
41
|
-
end.flatten.uniq
|
43
|
+
end.flatten.uniq.sort
|
44
|
+
end
|
45
|
+
|
46
|
+
def ==(other)
|
47
|
+
sorted_spec_names == other.sorted_spec_names
|
48
|
+
end
|
49
|
+
|
50
|
+
def merge(other)
|
51
|
+
return false unless equivalent?(other)
|
52
|
+
|
53
|
+
@specs |= other.specs
|
54
|
+
|
55
|
+
true
|
42
56
|
end
|
43
57
|
|
44
58
|
protected
|
45
59
|
|
46
60
|
def sorted_spec_names
|
47
|
-
@
|
61
|
+
@specs.map(&:full_name).sort
|
48
62
|
end
|
49
63
|
|
50
64
|
private
|
51
65
|
|
66
|
+
def equivalent?(other)
|
67
|
+
name == other.name && version == other.version && source == other.source && dependencies == other.dependencies
|
68
|
+
end
|
69
|
+
|
52
70
|
def exemplary_spec
|
53
71
|
@specs.first
|
54
72
|
end
|
@@ -79,7 +79,8 @@ module Bundler
|
|
79
79
|
def solve_versions(root:, logger:)
|
80
80
|
solver = PubGrub::VersionSolver.new(source: self, root: root, logger: logger)
|
81
81
|
result = solver.solve
|
82
|
-
result.map {|package, version| version.to_specs(package) }.flatten
|
82
|
+
resolved_specs = result.map {|package, version| version.to_specs(package) }.flatten
|
83
|
+
resolved_specs |= @base.specs_compatible_with(SpecSet.new(resolved_specs))
|
83
84
|
rescue PubGrub::SolveFailure => e
|
84
85
|
incompatibility = e.incompatibility
|
85
86
|
|
@@ -254,7 +255,7 @@ module Bundler
|
|
254
255
|
results = filter_matching_specs(results, locked_requirement) if locked_requirement
|
255
256
|
|
256
257
|
results.group_by(&:version).reduce([]) do |groups, (version, specs)|
|
257
|
-
platform_specs = package.
|
258
|
+
platform_specs = package.platform_specs(specs)
|
258
259
|
|
259
260
|
# If package is a top-level dependency,
|
260
261
|
# candidate is only valid if there are matching versions for all resolution platforms.
|
@@ -269,14 +270,22 @@ module Bundler
|
|
269
270
|
next groups if platform_specs.all?(&:empty?)
|
270
271
|
end
|
271
272
|
|
272
|
-
platform_specs.flatten!
|
273
|
-
|
274
273
|
ruby_specs = select_best_platform_match(specs, Gem::Platform::RUBY)
|
275
|
-
|
274
|
+
ruby_group = Resolver::SpecGroup.new(ruby_specs)
|
275
|
+
|
276
|
+
unless ruby_group.empty?
|
277
|
+
platform_specs.each do |specs|
|
278
|
+
ruby_group.merge(Resolver::SpecGroup.new(specs))
|
279
|
+
end
|
280
|
+
|
281
|
+
groups << Resolver::Candidate.new(version, group: ruby_group, priority: -1)
|
282
|
+
next groups if package.force_ruby_platform?
|
283
|
+
end
|
276
284
|
|
277
|
-
|
285
|
+
platform_group = Resolver::SpecGroup.new(platform_specs.flatten.uniq)
|
286
|
+
next groups if platform_group == ruby_group
|
278
287
|
|
279
|
-
groups << Resolver::Candidate.new(version,
|
288
|
+
groups << Resolver::Candidate.new(version, group: platform_group, priority: 1)
|
280
289
|
|
281
290
|
groups
|
282
291
|
end
|
@@ -431,8 +440,8 @@ module Bundler
|
|
431
440
|
|
432
441
|
def requirement_to_range(requirement)
|
433
442
|
ranges = requirement.requirements.map do |(op, version)|
|
434
|
-
ver = Resolver::Candidate.new(version)
|
435
|
-
platform_ver = Resolver::Candidate.new(version)
|
443
|
+
ver = Resolver::Candidate.new(version, priority: -1)
|
444
|
+
platform_ver = Resolver::Candidate.new(version, priority: 1)
|
436
445
|
|
437
446
|
case op
|
438
447
|
when "~>"
|
@@ -56,7 +56,16 @@ module Gem
|
|
56
56
|
# Can be removed once RubyGems 3.5.14 support is dropped
|
57
57
|
VALIDATES_FOR_RESOLUTION = Specification.new.respond_to?(:validate_for_resolution).freeze
|
58
58
|
|
59
|
+
# Can be removed once RubyGems 3.3.15 support is dropped
|
60
|
+
FLATTENS_REQUIRED_PATHS = Specification.new.respond_to?(:flatten_require_paths).freeze
|
61
|
+
|
59
62
|
class Specification
|
63
|
+
# Can be removed once RubyGems 3.5.15 support is dropped
|
64
|
+
correct_array_attributes = @@default_value.select {|_k,v| v.is_a?(Array) }.keys
|
65
|
+
unless @@array_attributes == correct_array_attributes
|
66
|
+
@@array_attributes = correct_array_attributes # rubocop:disable Style/ClassVars
|
67
|
+
end
|
68
|
+
|
60
69
|
require_relative "match_metadata"
|
61
70
|
require_relative "match_platform"
|
62
71
|
|
@@ -161,6 +170,27 @@ module Gem
|
|
161
170
|
end
|
162
171
|
end
|
163
172
|
|
173
|
+
unless FLATTENS_REQUIRED_PATHS
|
174
|
+
def flatten_require_paths
|
175
|
+
return unless raw_require_paths.first.is_a?(Array)
|
176
|
+
|
177
|
+
warn "#{name} #{version} includes a gemspec with `require_paths` set to an array of arrays. Newer versions of this gem might've already fixed this"
|
178
|
+
raw_require_paths.flatten!
|
179
|
+
end
|
180
|
+
|
181
|
+
class << self
|
182
|
+
module RequirePathFlattener
|
183
|
+
def from_yaml(input)
|
184
|
+
spec = super(input)
|
185
|
+
spec.flatten_require_paths
|
186
|
+
spec
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
prepend RequirePathFlattener
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
164
194
|
private
|
165
195
|
|
166
196
|
def dependencies_to_gemfile(dependencies, group = nil)
|
@@ -204,7 +204,7 @@ module Bundler
|
|
204
204
|
|
205
205
|
[::Kernel.singleton_class, ::Kernel].each do |kernel_class|
|
206
206
|
redefine_method(kernel_class, :gem) do |dep, *reqs|
|
207
|
-
if executables&.include?(File.basename(
|
207
|
+
if executables&.include?(File.basename(caller_locations(1, 1).first.path))
|
208
208
|
break
|
209
209
|
end
|
210
210
|
|
@@ -71,12 +71,6 @@ module Bundler
|
|
71
71
|
platforms
|
72
72
|
end
|
73
73
|
|
74
|
-
def complete_platforms!(platforms)
|
75
|
-
platforms.each do |platform|
|
76
|
-
complete_platform(platform)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
74
|
def validate_deps(s)
|
81
75
|
s.runtime_dependencies.each do |dep|
|
82
76
|
next if dep.name == "bundler"
|
@@ -158,6 +152,12 @@ module Bundler
|
|
158
152
|
@specs.detect {|spec| spec.name == name && spec.match_platform(platform) }
|
159
153
|
end
|
160
154
|
|
155
|
+
def specs_compatible_with(other)
|
156
|
+
select do |spec|
|
157
|
+
other.valid?(spec)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
161
|
def delete_by_name(name)
|
162
162
|
@specs.reject! {|spec| spec.name == name }
|
163
163
|
|
@@ -195,6 +195,10 @@ module Bundler
|
|
195
195
|
lookup.keys
|
196
196
|
end
|
197
197
|
|
198
|
+
def valid?(s)
|
199
|
+
s.matches_current_metadata? && valid_dependencies?(s)
|
200
|
+
end
|
201
|
+
|
198
202
|
private
|
199
203
|
|
200
204
|
def reset!
|
@@ -209,7 +213,7 @@ module Bundler
|
|
209
213
|
spec = specs.first
|
210
214
|
matching_specs = spec.source.specs.search([spec.name, spec.version])
|
211
215
|
platform_spec = GemHelpers.select_best_platform_match(matching_specs, platform).find do |s|
|
212
|
-
|
216
|
+
valid?(s)
|
213
217
|
end
|
214
218
|
|
215
219
|
if platform_spec
|
@@ -273,13 +277,11 @@ module Bundler
|
|
273
277
|
specs_for_name = lookup[dep.name]
|
274
278
|
return [] unless specs_for_name
|
275
279
|
|
276
|
-
|
277
|
-
GemHelpers.
|
280
|
+
if platform
|
281
|
+
GemHelpers.select_best_platform_match(specs_for_name, platform, force_ruby: dep.force_ruby_platform)
|
278
282
|
else
|
279
|
-
GemHelpers.
|
283
|
+
GemHelpers.select_best_local_platform_match(specs_for_name, force_ruby: dep.force_ruby_platform)
|
280
284
|
end
|
281
|
-
matching_specs.map!(&:materialize_for_installation).compact! if platform.nil?
|
282
|
-
matching_specs
|
283
285
|
end
|
284
286
|
|
285
287
|
def tsort_each_child(s)
|
data/lib/rubygems/config_file.rb
CHANGED
@@ -510,12 +510,12 @@ if you believe they were disclosed to a third party.
|
|
510
510
|
|
511
511
|
# Return the configuration information for +key+.
|
512
512
|
def [](key)
|
513
|
-
@hash[key.to_s]
|
513
|
+
@hash[key] || @hash[key.to_s]
|
514
514
|
end
|
515
515
|
|
516
516
|
# Set configuration option +key+ to +value+.
|
517
517
|
def []=(key, value)
|
518
|
-
@hash[key
|
518
|
+
@hash[key] = value
|
519
519
|
end
|
520
520
|
|
521
521
|
def ==(other) # :nodoc:
|
@@ -543,8 +543,13 @@ if you believe they were disclosed to a third party.
|
|
543
543
|
require_relative "yaml_serializer"
|
544
544
|
|
545
545
|
content = Gem::YAMLSerializer.load(yaml)
|
546
|
+
deep_transform_config_keys!(content)
|
547
|
+
end
|
546
548
|
|
547
|
-
|
549
|
+
private
|
550
|
+
|
551
|
+
def self.deep_transform_config_keys!(config)
|
552
|
+
config.transform_keys! do |k|
|
548
553
|
if k.match?(/\A:(.*)\Z/)
|
549
554
|
k[1..-1].to_sym
|
550
555
|
elsif k.include?("__") || k.match?(%r{/\Z})
|
@@ -558,7 +563,7 @@ if you believe they were disclosed to a third party.
|
|
558
563
|
end
|
559
564
|
end
|
560
565
|
|
561
|
-
|
566
|
+
config.transform_values! do |v|
|
562
567
|
if v.is_a?(String)
|
563
568
|
if v.match?(/\A:(.*)\Z/)
|
564
569
|
v[1..-1].to_sym
|
@@ -571,18 +576,18 @@ if you believe they were disclosed to a third party.
|
|
571
576
|
else
|
572
577
|
v
|
573
578
|
end
|
574
|
-
elsif v.
|
579
|
+
elsif v.empty?
|
575
580
|
nil
|
581
|
+
elsif v.is_a?(Hash)
|
582
|
+
deep_transform_config_keys!(v)
|
576
583
|
else
|
577
584
|
v
|
578
585
|
end
|
579
586
|
end
|
580
587
|
|
581
|
-
|
588
|
+
config
|
582
589
|
end
|
583
590
|
|
584
|
-
private
|
585
|
-
|
586
591
|
def set_config_file_name(args)
|
587
592
|
@config_file_name = ENV["GEMRC"]
|
588
593
|
need_config_file_name = false
|
@@ -175,7 +175,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
175
175
|
end
|
176
176
|
|
177
177
|
@@attributes = @@default_value.keys.sort_by(&:to_s)
|
178
|
-
@@array_attributes = @@default_value.
|
178
|
+
@@array_attributes = @@default_value.select {|_k,v| v.is_a?(Array) }.keys
|
179
179
|
@@nil_attributes, @@non_nil_attributes = @@default_value.keys.partition do |k|
|
180
180
|
@@default_value[k].nil?
|
181
181
|
end
|
@@ -874,7 +874,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
874
874
|
# You probably want to use one of the Enumerable methods instead.
|
875
875
|
|
876
876
|
def self.all
|
877
|
-
warn "NOTE: Specification.all called from #{caller.first}" unless
|
877
|
+
warn "NOTE: Specification.all called from #{caller(1, 1).first}" unless
|
878
878
|
Gem::Deprecate.skip
|
879
879
|
_all
|
880
880
|
end
|
data/lib/rubygems.rb
CHANGED
data/rubygems-update.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rubygems-update"
|
5
|
-
s.version = "3.5.
|
5
|
+
s.version = "3.5.16"
|
6
6
|
s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
|
7
7
|
s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
|
8
8
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: exe
|
18
18
|
cert_chain: []
|
19
|
-
date: 2024-07-
|
19
|
+
date: 2024-07-18 00:00:00.000000000 Z
|
20
20
|
dependencies: []
|
21
21
|
description: |-
|
22
22
|
A package (also known as a library) contains a set of functionality
|
@@ -727,7 +727,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
727
727
|
- !ruby/object:Gem::Version
|
728
728
|
version: '0'
|
729
729
|
requirements: []
|
730
|
-
rubygems_version: 3.5.
|
730
|
+
rubygems_version: 3.5.16
|
731
731
|
signing_key:
|
732
732
|
specification_version: 4
|
733
733
|
summary: RubyGems is a package management framework for Ruby. This gem is downloaded
|