rubygems-update 3.3.23 → 3.3.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Manifest.txt +0 -1
  4. data/bundler/CHANGELOG.md +11 -0
  5. data/bundler/lib/bundler/build_metadata.rb +2 -2
  6. data/bundler/lib/bundler/definition.rb +10 -28
  7. data/bundler/lib/bundler/endpoint_specification.rb +4 -0
  8. data/bundler/lib/bundler/gem_helpers.rb +0 -1
  9. data/bundler/lib/bundler/index.rb +0 -1
  10. data/bundler/lib/bundler/injector.rb +1 -1
  11. data/bundler/lib/bundler/lazy_specification.rb +7 -11
  12. data/bundler/lib/bundler/remote_specification.rb +6 -2
  13. data/bundler/lib/bundler/resolver/base.rb +1 -1
  14. data/bundler/lib/bundler/resolver/spec_group.rb +22 -44
  15. data/bundler/lib/bundler/resolver.rb +24 -65
  16. data/bundler/lib/bundler/shared_helpers.rb +1 -2
  17. data/bundler/lib/bundler/version.rb +1 -1
  18. data/bundler/lib/bundler.rb +0 -1
  19. data/lib/rubygems.rb +1 -1
  20. data/rubygems-update.gemspec +1 -1
  21. data/test/rubygems/alternate_cert.pem +14 -14
  22. data/test/rubygems/alternate_cert_32.pem +15 -15
  23. data/test/rubygems/alternate_key.pem +25 -25
  24. data/test/rubygems/child_cert.pem +15 -16
  25. data/test/rubygems/child_cert_32.pem +15 -16
  26. data/test/rubygems/child_key.pem +25 -25
  27. data/test/rubygems/encrypted_private_key.pem +26 -26
  28. data/test/rubygems/expired_cert.pem +15 -15
  29. data/test/rubygems/future_cert.pem +15 -15
  30. data/test/rubygems/future_cert_32.pem +15 -15
  31. data/test/rubygems/grandchild_cert.pem +15 -16
  32. data/test/rubygems/grandchild_cert_32.pem +15 -16
  33. data/test/rubygems/grandchild_key.pem +25 -25
  34. data/test/rubygems/invalid_issuer_cert.pem +16 -16
  35. data/test/rubygems/invalid_issuer_cert_32.pem +16 -16
  36. data/test/rubygems/invalid_key.pem +25 -25
  37. data/test/rubygems/invalid_signer_cert.pem +15 -15
  38. data/test/rubygems/invalid_signer_cert_32.pem +15 -15
  39. data/test/rubygems/invalidchild_cert.pem +15 -16
  40. data/test/rubygems/invalidchild_cert_32.pem +15 -16
  41. data/test/rubygems/invalidchild_key.pem +25 -25
  42. data/test/rubygems/private_key.pem +25 -25
  43. data/test/rubygems/public_cert.pem +16 -16
  44. data/test/rubygems/public_cert_32.pem +15 -15
  45. data/test/rubygems/public_key.pem +7 -7
  46. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock +4 -4
  47. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml +1 -1
  48. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +4 -4
  49. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +1 -1
  50. data/test/rubygems/test_gem_security.rb +5 -5
  51. data/test/rubygems/test_gem_security_signer.rb +6 -6
  52. data/test/rubygems/wrong_key_cert.pem +15 -15
  53. data/test/rubygems/wrong_key_cert_32.pem +15 -15
  54. metadata +3 -4
  55. data/bundler/lib/bundler/dep_proxy.rb +0 -55
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f93f67c33abbbb5ea165e7d2682601f04071a38b9b513388d9a5e428dd683297
4
- data.tar.gz: 15847dcefd91515ea3057a9d1b3ff6da9ae367ee714cbdb43c5537d6fa5e7ea9
3
+ metadata.gz: 65c7d26883d0730029624be1ed4fd91012021d0db47680ee7624b49befff19fa
4
+ data.tar.gz: c6e162899091bcd0151d65e798d94291f6355c01b89f240e38ec93533a70287a
5
5
  SHA512:
6
- metadata.gz: 62659400aed8a1f03108d675fe35674430b1fa5bc2a990ef4bc78fa03072e853b077472a2af0ceace9f7972eb62d8d2c475f9a811f911402a068d28550c26b78
7
- data.tar.gz: 1ba9446a59bd88a30558850cf20d3b4fabae944e98ef6995e6dcdb940444f41226e923d50f3fac9839f086fce076ad6a4810e1e035b3d0cabce021a4c92dde91
6
+ metadata.gz: 409a780fb1964ad6f14355c9c1df5e87d0d0dc9a4e54edc54dbf16ef3425bd8bb237c0eae9fea20d05d9e31f4983d7a34c31ef1c651ba514c22c6cddadfcc461
7
+ data.tar.gz: 723c63a66cf6288ddaa7bfc921195501a7b54c860a81444114553008ab1faadbd26bfae19cbd24cc15fe476923a3791fa04876501dfae9838de8d39b64140a8d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 3.3.24 / 2022-10-17
2
+
3
+ ## Enhancements:
4
+
5
+ * Installs bundler 2.3.24 as a default gem.
6
+
1
7
  # 3.3.23 / 2022-10-05
2
8
 
3
9
  ## Enhancements:
data/Manifest.txt CHANGED
@@ -57,7 +57,6 @@ bundler/lib/bundler/compact_index_client/updater.rb
57
57
  bundler/lib/bundler/constants.rb
58
58
  bundler/lib/bundler/current_ruby.rb
59
59
  bundler/lib/bundler/definition.rb
60
- bundler/lib/bundler/dep_proxy.rb
61
60
  bundler/lib/bundler/dependency.rb
62
61
  bundler/lib/bundler/deployment.rb
63
62
  bundler/lib/bundler/deprecate.rb
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # 2.3.24 (October 17, 2022)
2
+
3
+ ## Enhancements:
4
+
5
+ - Only add extra resolver spec group for Ruby platform when needed [#5698](https://github.com/rubygems/rubygems/pull/5698)
6
+ - Fix little UI issue when bundler shows duplicated gems in a list [#5965](https://github.com/rubygems/rubygems/pull/5965)
7
+
8
+ ## Bug fixes:
9
+
10
+ - Fix incorrect materialization on Windows [#5975](https://github.com/rubygems/rubygems/pull/5975)
11
+
1
12
  # 2.3.23 (October 5, 2022)
2
13
 
3
14
  ## Enhancements:
@@ -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 = "2022-10-05".freeze
8
- @git_commit_sha = "250d9d485d".freeze
7
+ @built_at = "2022-10-17".freeze
8
+ @git_commit_sha = "b835c7ea15".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -139,8 +139,8 @@ module Bundler
139
139
  if @unlock[:conservative]
140
140
  @unlock[:gems] ||= @dependencies.map(&:name)
141
141
  else
142
- eager_unlock = expand_dependencies(@unlock[:gems] || [], true)
143
- @unlock[:gems] = @locked_specs.for(eager_unlock, false, platforms).map(&:name)
142
+ eager_unlock = (@unlock[:gems] || []).map {|name| Dependency.new(name, ">= 0") }
143
+ @unlock[:gems] = @locked_specs.for(eager_unlock, false, platforms).map(&:name).uniq
144
144
  end
145
145
 
146
146
  @dependency_changes = converge_dependencies
@@ -224,7 +224,7 @@ module Bundler
224
224
 
225
225
  def current_dependencies
226
226
  dependencies.select do |d|
227
- d.should_include? && !d.gem_platforms(@platforms).empty?
227
+ d.should_include? && !d.gem_platforms([generic_local_platform]).empty?
228
228
  end
229
229
  end
230
230
 
@@ -248,10 +248,9 @@ module Bundler
248
248
 
249
249
  def dependencies_for(groups)
250
250
  groups.map!(&:to_sym)
251
- deps = current_dependencies.reject do |d|
251
+ current_dependencies.reject do |d|
252
252
  (d.groups & groups).empty?
253
253
  end
254
- expand_dependencies(deps)
255
254
  end
256
255
 
257
256
  # Resolve all the dependencies specified in Gemfile. It ensures that
@@ -474,17 +473,17 @@ module Bundler
474
473
  def resolver
475
474
  @resolver ||= begin
476
475
  last_resolve = converge_locked_specs
477
- remove_ruby_from_platforms_if_necessary!(dependencies)
476
+ remove_ruby_from_platforms_if_necessary!(current_dependencies)
478
477
  Resolver.new(source_requirements, last_resolve, gem_version_promoter, additional_base_requirements_for_resolve(last_resolve), platforms)
479
478
  end
480
479
  end
481
480
 
482
481
  def expanded_dependencies
483
- @expanded_dependencies ||= expand_dependencies(dependencies + metadata_dependencies, true)
482
+ @expanded_dependencies ||= dependencies + metadata_dependencies
484
483
  end
485
484
 
486
485
  def filter_specs(specs, deps)
487
- SpecSet.new(specs).for(expand_dependencies(deps, true), false, platforms)
486
+ SpecSet.new(specs).for(deps, false, platforms)
488
487
  end
489
488
 
490
489
  def materialize(dependencies)
@@ -578,8 +577,8 @@ module Bundler
578
577
  ].select(&:first).map(&:last).join(", ")
579
578
  end
580
579
 
581
- def pretty_dep(dep, source = false)
582
- SharedHelpers.pretty_dependency(dep, source)
580
+ def pretty_dep(dep)
581
+ SharedHelpers.pretty_dependency(dep)
583
582
  end
584
583
 
585
584
  # Check if the specs of the given source changed
@@ -792,23 +791,6 @@ module Bundler
792
791
  ]
793
792
  end
794
793
 
795
- def expand_dependencies(dependencies, remote = false)
796
- deps = []
797
- dependencies.each do |dep|
798
- dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
799
- next unless remote || dep.current_platform?
800
- target_platforms = dep.gem_platforms(remote ? @platforms : [generic_local_platform])
801
- deps += expand_dependency_with_platforms(dep, target_platforms)
802
- end
803
- deps
804
- end
805
-
806
- def expand_dependency_with_platforms(dep, platforms)
807
- platforms.map do |p|
808
- DepProxy.get_proxy(dep, p)
809
- end
810
- end
811
-
812
794
  def source_requirements
813
795
  # Record the specs available in each gem's source, so that those
814
796
  # specs will be available later when the resolver knows where to
@@ -880,7 +862,7 @@ module Bundler
880
862
  Bundler.local_platform == Gem::Platform::RUBY ||
881
863
  !platforms.include?(Gem::Platform::RUBY) ||
882
864
  (@new_platform && platforms.last == Gem::Platform::RUBY) ||
883
- !@originally_locked_specs.incomplete_ruby_specs?(expand_dependencies(dependencies))
865
+ !@originally_locked_specs.incomplete_ruby_specs?(dependencies)
884
866
 
885
867
  remove_platform(Gem::Platform::RUBY)
886
868
  add_current_platform
@@ -26,6 +26,10 @@ module Bundler
26
26
  @platform
27
27
  end
28
28
 
29
+ def identifier
30
+ @__identifier ||= [name, version, platform.to_s]
31
+ end
32
+
29
33
  # needed for standalone, load required_paths from local gemspec
30
34
  # after the gem is installed
31
35
  def require_paths
@@ -5,7 +5,6 @@ module Bundler
5
5
  GENERIC_CACHE = { Gem::Platform::RUBY => Gem::Platform::RUBY } # rubocop:disable Style/MutableConstant
6
6
  GENERICS = [
7
7
  [Gem::Platform.new("java"), Gem::Platform.new("java")],
8
- [Gem::Platform.new("universal-java"), Gem::Platform.new("java")],
9
8
  [Gem::Platform.new("mswin32"), Gem::Platform.new("mswin32")],
10
9
  [Gem::Platform.new("mswin64"), Gem::Platform.new("mswin64")],
11
10
  [Gem::Platform.new("universal-mingw32"), Gem::Platform.new("universal-mingw32")],
@@ -71,7 +71,6 @@ module Bundler
71
71
  when Gem::Specification, RemoteSpecification, LazySpecification, EndpointSpecification then search_by_spec(query)
72
72
  when String then specs_by_name(query)
73
73
  when Gem::Dependency then search_by_dependency(query)
74
- when DepProxy then search_by_dependency(query.dep)
75
74
  else
76
75
  raise "You can't search for a #{query.inspect}."
77
76
  end
@@ -70,7 +70,7 @@ module Bundler
70
70
 
71
71
  show_warning("No gems were removed from the gemfile.") if deps.empty?
72
72
 
73
- deps.each {|dep| Bundler.ui.confirm "#{SharedHelpers.pretty_dependency(dep, false)} was removed." }
73
+ deps.each {|dep| Bundler.ui.confirm "#{SharedHelpers.pretty_dependency(dep)} was removed." }
74
74
  end
75
75
 
76
76
  # Invalidate the cached Bundler.definition.
@@ -77,7 +77,7 @@ module Bundler
77
77
  source.local!
78
78
 
79
79
  candidates = if source.is_a?(Source::Path) || !ruby_platform_materializes_to_ruby_platform?
80
- target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : Bundler.local_platform
80
+ target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform
81
81
 
82
82
  source.specs.search(Dependency.new(name, version)).select do |spec|
83
83
  MatchPlatform.platforms_match?(spec.platform, target_platform)
@@ -120,7 +120,7 @@ module Bundler
120
120
  end
121
121
 
122
122
  def identifier
123
- @__identifier ||= [name, version, platform_string]
123
+ @__identifier ||= [name, version, platform.to_s]
124
124
  end
125
125
 
126
126
  def git_version
@@ -128,13 +128,6 @@ module Bundler
128
128
  " #{source.revision[0..6]}"
129
129
  end
130
130
 
131
- protected
132
-
133
- def platform_string
134
- platform_string = platform.to_s
135
- platform_string == Index::RUBY ? Index::NULL : platform_string
136
- end
137
-
138
131
  private
139
132
 
140
133
  def to_ary
@@ -151,7 +144,8 @@ module Bundler
151
144
 
152
145
  #
153
146
  # For backwards compatibility with existing lockfiles, if the most specific
154
- # locked platform is RUBY, we keep the previous behaviour of resolving the
147
+ # locked platform is not a specific platform like x86_64-linux or
148
+ # universal-java-11, then we keep the previous behaviour of resolving the
155
149
  # best platform variant at materiliazation time. For previous bundler
156
150
  # versions (before 2.2.0) this was always the case (except when the lockfile
157
151
  # only included non-ruby platforms), but we're also keeping this behaviour
@@ -159,7 +153,9 @@ module Bundler
159
153
  # explicitly add a more specific platform.
160
154
  #
161
155
  def ruby_platform_materializes_to_ruby_platform?
162
- !Bundler.most_specific_locked_platform?(generic_local_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]
156
+ generic_platform = generic_local_platform == Gem::Platform::JAVA ? Gem::Platform::JAVA : Gem::Platform::RUBY
157
+
158
+ !Bundler.most_specific_locked_platform?(generic_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]
163
159
  end
164
160
  end
165
161
  end
@@ -29,11 +29,15 @@ module Bundler
29
29
  @platform = _remote_specification.platform
30
30
  end
31
31
 
32
+ def identifier
33
+ @__identifier ||= [name, version, @platform.to_s]
34
+ end
35
+
32
36
  def full_name
33
- if @original_platform == Gem::Platform::RUBY
37
+ if @platform == Gem::Platform::RUBY
34
38
  "#{@name}-#{@version}"
35
39
  else
36
- "#{@name}-#{@version}-#{@original_platform}"
40
+ "#{@name}-#{@version}-#{@platform}"
37
41
  end
38
42
  end
39
43
 
@@ -40,7 +40,7 @@ module Bundler
40
40
  base_requirements = {}
41
41
  @base.each do |ls|
42
42
  dep = Dependency.new(ls.name, ls.version)
43
- base_requirements[ls.name] = DepProxy.get_proxy(dep, ls.platform)
43
+ base_requirements[ls.name] = dep
44
44
  end
45
45
  @additional_base_requirements.each {|d| base_requirements[d.name] = d }
46
46
  base_requirements
@@ -6,40 +6,23 @@ module Bundler
6
6
  attr_accessor :name, :version, :source
7
7
  attr_accessor :activated_platforms, :force_ruby_platform
8
8
 
9
- def self.create_for(specs, all_platforms, specific_platform)
10
- specific_platform_specs = specs[specific_platform]
11
- return unless specific_platform_specs.any?
12
-
13
- platforms = all_platforms.select {|p| specs[p].any? }
14
-
15
- new(specific_platform_specs.first, specs, platforms)
16
- end
17
-
18
- def initialize(exemplary_spec, specs, relevant_platforms)
19
- @exemplary_spec = exemplary_spec
20
- @name = exemplary_spec.name
21
- @version = exemplary_spec.version
22
- @source = exemplary_spec.source
9
+ def initialize(specs, relevant_platforms)
10
+ @exemplary_spec = specs.first
11
+ @name = @exemplary_spec.name
12
+ @version = @exemplary_spec.version
13
+ @source = @exemplary_spec.source
23
14
 
24
15
  @activated_platforms = relevant_platforms
25
- @dependencies = Hash.new do |dependencies, platforms|
26
- dependencies[platforms] = dependencies_for(platforms)
27
- end
28
16
  @specs = specs
29
17
  end
30
18
 
31
19
  def to_specs
32
- activated_platforms.map do |p|
33
- specs = @specs[p]
34
- next unless specs.any?
35
-
36
- specs.map do |s|
37
- lazy_spec = LazySpecification.new(name, version, s.platform, source)
38
- lazy_spec.force_ruby_platform = force_ruby_platform
39
- lazy_spec.dependencies.replace s.dependencies
40
- lazy_spec
41
- end
42
- end.flatten.compact.uniq
20
+ @specs.map do |s|
21
+ lazy_spec = LazySpecification.new(name, version, s.platform, source)
22
+ lazy_spec.force_ruby_platform = force_ruby_platform
23
+ lazy_spec.dependencies.replace s.dependencies
24
+ lazy_spec
25
+ end
43
26
  end
44
27
 
45
28
  def to_s
@@ -48,7 +31,9 @@ module Bundler
48
31
  end
49
32
 
50
33
  def dependencies_for_activated_platforms
51
- @dependencies[activated_platforms]
34
+ @dependencies_for_activated_platforms ||= @specs.map do |spec|
35
+ __dependencies(spec) + metadata_dependencies(spec)
36
+ end.flatten.uniq
52
37
  end
53
38
 
54
39
  def ==(other)
@@ -79,35 +64,28 @@ module Bundler
79
64
 
80
65
  private
81
66
 
82
- def dependencies_for(platforms)
83
- platforms.map do |platform|
84
- __dependencies(platform) + metadata_dependencies(platform)
85
- end.flatten
86
- end
87
-
88
- def __dependencies(platform)
67
+ def __dependencies(spec)
89
68
  dependencies = []
90
- @specs[platform].first.dependencies.each do |dep|
69
+ spec.dependencies.each do |dep|
91
70
  next if dep.type == :development
92
- dependencies << DepProxy.get_proxy(Dependency.new(dep.name, dep.requirement), platform)
71
+ dependencies << Dependency.new(dep.name, dep.requirement)
93
72
  end
94
73
  dependencies
95
74
  end
96
75
 
97
- def metadata_dependencies(platform)
98
- spec = @specs[platform].first
76
+ def metadata_dependencies(spec)
99
77
  return [] if spec.is_a?(LazySpecification)
100
78
 
101
79
  [
102
- metadata_dependency("Ruby", spec.required_ruby_version, platform),
103
- metadata_dependency("RubyGems", spec.required_rubygems_version, platform),
80
+ metadata_dependency("Ruby", spec.required_ruby_version),
81
+ metadata_dependency("RubyGems", spec.required_rubygems_version),
104
82
  ].compact
105
83
  end
106
84
 
107
- def metadata_dependency(name, requirement, platform)
85
+ def metadata_dependency(name, requirement)
108
86
  return if requirement.nil? || requirement.none?
109
87
 
110
- DepProxy.get_proxy(Dependency.new("#{name}\0", requirement), platform)
88
+ Dependency.new("#{name}\0", requirement)
111
89
  end
112
90
  end
113
91
  end
@@ -8,22 +8,6 @@ module Bundler
8
8
 
9
9
  include GemHelpers
10
10
 
11
- # Figures out the best possible configuration of gems that satisfies
12
- # the list of passed dependencies and any child dependencies without
13
- # causing any gem activation errors.
14
- #
15
- # ==== Parameters
16
- # *dependencies<Gem::Dependency>:: The list of dependencies to resolve
17
- #
18
- # ==== Returns
19
- # <GemBundle>,nil:: If the list of dependencies can be resolved, a
20
- # collection of gemspecs is returned. Otherwise, nil is returned.
21
- def self.resolve(requirements, source_requirements = {}, base = [], gem_version_promoter = GemVersionPromoter.new, additional_base_requirements = [], platforms = nil)
22
- base = SpecSet.new(base) unless base.is_a?(SpecSet)
23
- resolver = new(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
24
- resolver.start(requirements)
25
- end
26
-
27
11
  def initialize(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
28
12
  @source_requirements = source_requirements
29
13
  @base = Resolver::Base.new(base, additional_base_requirements)
@@ -116,41 +100,35 @@ module Bundler
116
100
  specification.dependencies_for_activated_platforms
117
101
  end
118
102
 
119
- def search_for(dependency_proxy)
120
- platform = dependency_proxy.__platform
121
- dependency = dependency_proxy.dep
122
- name = dependency.name
123
- @search_for[dependency_proxy] ||= begin
103
+ def search_for(dependency)
104
+ @search_for[dependency] ||= begin
105
+ name = dependency.name
124
106
  locked_results = @base[name].select {|spec| requirement_satisfied_by?(dependency, nil, spec) }
125
107
  locked_requirement = base_requirements[name]
126
108
  results = results_for(dependency) + locked_results
127
109
  results = results.select {|spec| requirement_satisfied_by?(locked_requirement, nil, spec) } if locked_requirement
110
+ dep_platforms = dependency.gem_platforms(@platforms)
128
111
 
129
- if results.any?
130
- results = @gem_version_promoter.sort_versions(dependency, results)
112
+ @gem_version_promoter.sort_versions(dependency, results).group_by(&:version).reduce([]) do |groups, (_, specs)|
113
+ relevant_platforms = dep_platforms.select {|platform| specs.any? {|spec| spec.match_platform(platform) } }
114
+ next groups unless relevant_platforms.any?
131
115
 
132
- results.group_by(&:version).reduce([]) do |groups, (_, specs)|
133
- next groups unless specs.any? {|spec| spec.match_platform(platform) }
134
-
135
- specs_by_platform = Hash.new do |current_specs, current_platform|
136
- current_specs[current_platform] = select_best_platform_match(specs, current_platform)
137
- end
116
+ ruby_specs = select_best_platform_match(specs, Gem::Platform::RUBY)
117
+ if ruby_specs.any?
118
+ spec_group_ruby = SpecGroup.new(ruby_specs, [Gem::Platform::RUBY])
119
+ spec_group_ruby.force_ruby_platform = dependency.force_ruby_platform
120
+ groups << spec_group_ruby
121
+ end
138
122
 
139
- spec_group_ruby = SpecGroup.create_for(specs_by_platform, [Gem::Platform::RUBY], Gem::Platform::RUBY)
140
- if spec_group_ruby
141
- spec_group_ruby.force_ruby_platform = dependency.force_ruby_platform
142
- groups << spec_group_ruby
143
- end
123
+ next groups if @resolving_only_for_ruby || dependency.force_ruby_platform
144
124
 
145
- next groups if @resolving_only_for_ruby || dependency.force_ruby_platform
125
+ platform_specs = relevant_platforms.flat_map {|platform| select_best_platform_match(specs, platform) }
126
+ next groups if platform_specs == ruby_specs
146
127
 
147
- spec_group = SpecGroup.create_for(specs_by_platform, @platforms, platform)
148
- groups << spec_group
128
+ spec_group = SpecGroup.new(platform_specs, relevant_platforms)
129
+ groups << spec_group
149
130
 
150
- groups
151
- end
152
- else
153
- []
131
+ groups
154
132
  end
155
133
  end
156
134
  end
@@ -181,10 +159,6 @@ module Bundler
181
159
  requirement.matches_spec?(spec) || spec.source.is_a?(Source::Gemspec)
182
160
  end
183
161
 
184
- def dependencies_equal?(dependencies, other_dependencies)
185
- dependencies.map(&:dep) == other_dependencies.map(&:dep)
186
- end
187
-
188
162
  def sort_dependencies(dependencies, activated, conflicts)
189
163
  dependencies.sort_by do |dependency|
190
164
  name = name_for(dependency)
@@ -196,17 +170,10 @@ module Bundler
196
170
  amount_constrained(dependency),
197
171
  conflicts[name] ? 0 : 1,
198
172
  vertex.payload ? 0 : search_for(dependency).count,
199
- self.class.platform_sort_key(dependency.__platform),
200
173
  ]
201
174
  end
202
175
  end
203
176
 
204
- def self.platform_sort_key(platform)
205
- # Prefer specific platform to not specific platform
206
- return ["99-LAST", "", "", ""] if Gem::Platform::RUBY == platform
207
- ["00", *platform.to_a.map {|part| part || "" }]
208
- end
209
-
210
177
  private
211
178
 
212
179
  def base_requirements
@@ -261,21 +228,11 @@ module Bundler
261
228
  requirements.map! do |requirement|
262
229
  name = requirement.name
263
230
  next requirement if name == "bundler"
231
+ next if requirement.gem_platforms(@platforms).empty?
264
232
  next requirement unless search_for(requirement).empty?
265
233
  next unless requirement.current_platform?
266
234
 
267
- if (base = @base[name]) && !base.empty?
268
- version = base.first.version
269
- message = "You have requested:\n" \
270
- " #{name} #{requirement.requirement}\n\n" \
271
- "The bundle currently has #{name} locked at #{version}.\n" \
272
- "Try running `bundle update #{name}`\n\n" \
273
- "If you are updating multiple gems in your Gemfile at once,\n" \
274
- "try passing them all to `bundle update`"
275
- else
276
- message = gem_not_found_message(name, requirement, source_for(name))
277
- end
278
- raise GemNotFound, message
235
+ raise GemNotFound, gem_not_found_message(name, requirement, source_for(name))
279
236
  end.compact!
280
237
  end
281
238
 
@@ -293,7 +250,9 @@ module Bundler
293
250
  if specs_matching_requirement.any?
294
251
  specs = specs_matching_requirement
295
252
  matching_part = requirement_label
296
- requirement_label = "#{requirement_label}' with platform '#{requirement.__platform}"
253
+ platforms = requirement.gem_platforms(@platforms)
254
+ platform_label = platforms.size == 1 ? "platform '#{platforms.first}" : "platforms '#{platforms.join("', '")}"
255
+ requirement_label = "#{requirement_label}' with #{platform_label}"
297
256
  end
298
257
 
299
258
  message = String.new("Could not find gem '#{requirement_label}'#{extra_message} in #{source}#{cache_message}.\n")
@@ -163,7 +163,7 @@ module Bundler
163
163
  "\nEither installing with `--full-index` or running `bundle update #{spec.name}` should fix the problem."
164
164
  end
165
165
 
166
- def pretty_dependency(dep, print_source = false)
166
+ def pretty_dependency(dep)
167
167
  msg = String.new(dep.name)
168
168
  msg << " (#{dep.requirement})" unless dep.requirement == Gem::Requirement.default
169
169
 
@@ -172,7 +172,6 @@ module Bundler
172
172
  msg << " " << platform_string if !platform_string.empty? && platform_string != Gem::Platform::RUBY
173
173
  end
174
174
 
175
- msg << " from the `#{dep.source}` source" if print_source && dep.source
176
175
  msg
177
176
  end
178
177
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.3.23".freeze
4
+ VERSION = "2.3.24".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
@@ -41,7 +41,6 @@ module Bundler
41
41
 
42
42
  autoload :Definition, File.expand_path("bundler/definition", __dir__)
43
43
  autoload :Dependency, File.expand_path("bundler/dependency", __dir__)
44
- autoload :DepProxy, File.expand_path("bundler/dep_proxy", __dir__)
45
44
  autoload :Deprecate, File.expand_path("bundler/deprecate", __dir__)
46
45
  autoload :Digest, File.expand_path("bundler/digest", __dir__)
47
46
  autoload :Dsl, File.expand_path("bundler/dsl", __dir__)
data/lib/rubygems.rb CHANGED
@@ -8,7 +8,7 @@
8
8
  require "rbconfig"
9
9
 
10
10
  module Gem
11
- VERSION = "3.3.23".freeze
11
+ VERSION = "3.3.24".freeze
12
12
  end
13
13
 
14
14
  # Must be first since it unloads the prelude from 1.9.2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rubygems-update"
5
- s.version = "3.3.23"
5
+ s.version = "3.3.24"
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
 
@@ -1,19 +1,19 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDFjCCAf6gAwIBAgIBBDANBgkqhkiG9w0BAQUFADAtMRIwEAYDVQQDDAlhbHRl
2
+ MIIDFjCCAf6gAwIBAgIBBDANBgkqhkiG9w0BAQsFADAtMRIwEAYDVQQDDAlhbHRl
3
3
  cm5hdGUxFzAVBgoJkiaJk/IsZAEZFgdleGFtcGxlMCAXDTEyMDEwMTAwMDAwMFoY
4
4
  Dzk5OTkxMjMxMjM1OTU5WjAtMRIwEAYDVQQDDAlhbHRlcm5hdGUxFzAVBgoJkiaJ
5
5
  k/IsZAEZFgdleGFtcGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
6
- vZQipBa1xH3M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