rubygems-update 3.5.3 → 3.5.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a96e34ca4dd3b27ea38ac7b9eda98c12cc74082774fc03a4747b2746f215993
4
- data.tar.gz: 92f04742ef9d579ab430f766ca24fc89233a8463b57acdf07609fda64724c7e9
3
+ metadata.gz: 4cb7b6f7687a1507b8536010f6eed4228f0e940ba642a684070d9e5b7676813b
4
+ data.tar.gz: df18b884768e1c6ce0b9566cee7df79dba8f07b40bb7798b109e4c2834b6991b
5
5
  SHA512:
6
- metadata.gz: d5bdc95e65579bf90563c99afd7c4f71573d12e3b564423ca90d277a672fadc712c576867b771287c042f8c141050c615f213c24a7f36c1800a75ffbf5d33ca0
7
- data.tar.gz: 47dbd452c5a1e069c19c43d6f3c818768579aa6d792fd9cf9e774b6d310772587da33c9dfc9742cbb431daafa6a73ba890b5c1331903ae41a7152db9c3c366c3
6
+ metadata.gz: 660660053dd83e660146422b033644d7ecf5f8ba13fb38995d37248979ef8c259aad042b9b9f741b0a5cf405bea117e86e5e7ef30c7d1db76f0de3b1d9fe2e59
7
+ data.tar.gz: b6036f05191c48ca663ea87e3e5f142f60da79f97d2adaba0796f30de65be4bdf039ccd122433a5ae5ba161f6df2e436cd2627c8a65107049b7ea0fc9bce5f1e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ # 3.5.4 / 2024-01-03
2
+
3
+ ## Enhancements:
4
+
5
+ * Always avoid "Updating rubygems-update" message. Pull request
6
+ [#7335](https://github.com/rubygems/rubygems/pull/7335) by
7
+ deivid-rodriguez
8
+ * Installs bundler 2.5.4 as a default gem.
9
+
10
+ ## Bug fixes:
11
+
12
+ * Make `gem update --system` respect ruby version constraints. Pull
13
+ request [#7334](https://github.com/rubygems/rubygems/pull/7334) by
14
+ deivid-rodriguez
15
+
1
16
  # 3.5.3 / 2023-12-22
2
17
 
3
18
  ## Enhancements:
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 2.5.4 (January 3, 2024)
2
+
3
+ ## Bug fixes:
4
+
5
+ - Fix resolution when different platform specific gems have different dependencies [#7324](https://github.com/rubygems/rubygems/pull/7324)
6
+
1
7
  # 2.5.3 (December 22, 2023)
2
8
 
3
9
  ## Bug fixes:
@@ -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-12-22".freeze
8
- @git_commit_sha = "a04f70b115".freeze
7
+ @built_at = "2024-01-04".freeze
8
+ @git_commit_sha = "7ffda9ba9b".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -312,10 +312,6 @@ module Bundler
312
312
  end
313
313
  end
314
314
 
315
- def should_complete_platforms?
316
- !lockfile_exists? && generic_local_platform_is_ruby? && !Bundler.settings[:force_ruby_platform]
317
- end
318
-
319
315
  def spec_git_paths
320
316
  sources.git_sources.map {|s| File.realpath(s.path) if File.exist?(s.path) }.compact
321
317
  end
@@ -517,6 +513,10 @@ module Bundler
517
513
 
518
514
  private
519
515
 
516
+ def should_add_extra_platforms?
517
+ !lockfile_exists? && generic_local_platform_is_ruby? && !Bundler.settings[:force_ruby_platform]
518
+ end
519
+
520
520
  def lockfile_exists?
521
521
  lockfile && File.exist?(lockfile)
522
522
  end
@@ -600,7 +600,9 @@ module Bundler
600
600
  result = SpecSet.new(resolver.start)
601
601
 
602
602
  @resolved_bundler_version = result.find {|spec| spec.name == "bundler" }&.version
603
- @platforms = result.complete_platforms!(platforms) if should_complete_platforms?
603
+ @platforms = result.add_extra_platforms!(platforms) if should_add_extra_platforms?
604
+
605
+ result.complete_platforms!(platforms)
604
606
 
605
607
  SpecSet.new(result.for(dependencies, false, @platforms))
606
608
  end
@@ -52,32 +52,14 @@ module Bundler
52
52
  specs.uniq
53
53
  end
54
54
 
55
- def complete_platforms!(platforms)
55
+ def add_extra_platforms!(platforms)
56
56
  return platforms.concat([Gem::Platform::RUBY]).uniq if @specs.empty?
57
57
 
58
- new_platforms = @specs.flat_map {|spec| spec.source.specs.search([spec.name, spec.version]).map(&:platform) }.uniq.select do |platform|
58
+ new_platforms = all_platforms.select do |platform|
59
59
  next if platforms.include?(platform)
60
60
  next unless GemHelpers.generic(platform) == Gem::Platform::RUBY
61
61
 
62
- new_specs = []
63
-
64
- valid_platform = lookup.all? do |_, specs|
65
- spec = specs.first
66
- matching_specs = spec.source.specs.search([spec.name, spec.version])
67
- platform_spec = GemHelpers.select_best_platform_match(matching_specs, platform).find do |s|
68
- s.matches_current_metadata? && valid_dependencies?(s)
69
- end
70
-
71
- if platform_spec
72
- new_specs << LazySpecification.from_spec(platform_spec)
73
- true
74
- else
75
- false
76
- end
77
- end
78
- next unless valid_platform
79
-
80
- @specs.concat(new_specs.uniq)
62
+ complete_platform(platform)
81
63
  end
82
64
  return platforms if new_platforms.empty?
83
65
 
@@ -86,12 +68,15 @@ module Bundler
86
68
  less_specific_platform = new_platforms.find {|platform| platform != Gem::Platform::RUBY && platform === Bundler.local_platform }
87
69
  platforms.delete(Bundler.local_platform) if less_specific_platform
88
70
 
89
- @sorted = nil
90
- @lookup = nil
91
-
92
71
  platforms
93
72
  end
94
73
 
74
+ def complete_platforms!(platforms)
75
+ platforms.each do |platform|
76
+ complete_platform(platform)
77
+ end
78
+ end
79
+
95
80
  def validate_deps(s)
96
81
  s.runtime_dependencies.each do |dep|
97
82
  next if dep.name == "bundler"
@@ -110,14 +95,14 @@ module Bundler
110
95
 
111
96
  def []=(key, value)
112
97
  @specs << value
113
- @lookup = nil
114
- @sorted = nil
98
+
99
+ reset!
115
100
  end
116
101
 
117
102
  def delete(specs)
118
103
  specs.each {|spec| @specs.delete(spec) }
119
- @lookup = nil
120
- @sorted = nil
104
+
105
+ reset!
121
106
  end
122
107
 
123
108
  def sort!
@@ -175,8 +160,8 @@ module Bundler
175
160
 
176
161
  def delete_by_name(name)
177
162
  @specs.reject! {|spec| spec.name == name }
178
- @lookup = nil
179
- @sorted = nil
163
+
164
+ reset!
180
165
  end
181
166
 
182
167
  def what_required(spec)
@@ -212,6 +197,42 @@ module Bundler
212
197
 
213
198
  private
214
199
 
200
+ def reset!
201
+ @sorted = nil
202
+ @lookup = nil
203
+ end
204
+
205
+ def complete_platform(platform)
206
+ new_specs = []
207
+
208
+ valid_platform = lookup.all? do |_, specs|
209
+ spec = specs.first
210
+ matching_specs = spec.source.specs.search([spec.name, spec.version])
211
+ platform_spec = GemHelpers.select_best_platform_match(matching_specs, platform).find do |s|
212
+ s.matches_current_metadata? && valid_dependencies?(s)
213
+ end
214
+
215
+ if platform_spec
216
+ new_specs << LazySpecification.from_spec(platform_spec) unless specs.include?(platform_spec)
217
+ true
218
+ else
219
+ false
220
+ end
221
+ end
222
+
223
+ if valid_platform && new_specs.any?
224
+ @specs.concat(new_specs)
225
+
226
+ reset!
227
+ end
228
+
229
+ valid_platform
230
+ end
231
+
232
+ def all_platforms
233
+ @specs.flat_map {|spec| spec.source.specs.search([spec.name, spec.version]).map(&:platform) }.uniq
234
+ end
235
+
215
236
  def valid_dependencies?(s)
216
237
  validate_deps(s) == :valid
217
238
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.5.3".freeze
4
+ VERSION = "2.5.4".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
@@ -244,7 +244,7 @@ command to remove old versions.
244
244
 
245
245
  @installer = Gem::DependencyInstaller.new update_options
246
246
 
247
- say "Updating #{name}" unless options[:system] && options[:silent]
247
+ say "Updating #{name}" unless options[:system]
248
248
  begin
249
249
  @installer.install name, Gem::Requirement.new(version)
250
250
  rescue Gem::InstallError, Gem::DependencyError => e
@@ -282,7 +282,7 @@ command to remove old versions.
282
282
  check_oldest_rubygems version
283
283
 
284
284
  installed_gems = Gem::Specification.find_all_by_name "rubygems-update", requirement
285
- installed_gems = update_gem("rubygems-update", version) if installed_gems.empty? || installed_gems.first.version != version
285
+ installed_gems = update_gem("rubygems-update", requirement) if installed_gems.empty? || installed_gems.first.version != version
286
286
  return if installed_gems.empty?
287
287
 
288
288
  install_rubygems installed_gems.first
@@ -294,9 +294,7 @@ command to remove old versions.
294
294
  args << "--prefix" << Gem.prefix if Gem.prefix
295
295
  args << "--no-document" unless options[:document].include?("rdoc") || options[:document].include?("ri")
296
296
  args << "--no-format-executable" if options[:no_format_executable]
297
- args << "--previous-version" << Gem::VERSION if
298
- options[:system] == true ||
299
- Gem::Version.new(options[:system]) >= Gem::Version.new(2)
297
+ args << "--previous-version" << Gem::VERSION
300
298
  args
301
299
  end
302
300
 
data/lib/rubygems.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  require "rbconfig"
10
10
 
11
11
  module Gem
12
- VERSION = "3.5.3"
12
+ VERSION = "3.5.4"
13
13
  end
14
14
 
15
15
  # 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.5.3"
5
+ s.version = "3.5.4"
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.3
4
+ version: 3.5.4
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: 2023-12-22 00:00:00.000000000 Z
19
+ date: 2024-01-04 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
@@ -702,7 +702,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
702
702
  - !ruby/object:Gem::Version
703
703
  version: '0'
704
704
  requirements: []
705
- rubygems_version: 3.5.3
705
+ rubygems_version: 3.5.4
706
706
  signing_key:
707
707
  specification_version: 4
708
708
  summary: RubyGems is a package management framework for Ruby. This gem is downloaded