rubygems-update 3.5.2 → 3.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 516ff3035710aec51c55a79b9d0634c6900796ff1a0ed176db0eed96ea9fdc83
4
- data.tar.gz: 3a7c9ba6ba6c93e8c78ece390b1d14c7b9aa5876c7580fa53a85b0eb18e83311
3
+ metadata.gz: 9a96e34ca4dd3b27ea38ac7b9eda98c12cc74082774fc03a4747b2746f215993
4
+ data.tar.gz: 92f04742ef9d579ab430f766ca24fc89233a8463b57acdf07609fda64724c7e9
5
5
  SHA512:
6
- metadata.gz: 14bde13965cae368e5b5c812fb6e4e45cdec3bd7fe116b1eff897e3a2b7131ca555fbe3dff6da0d847854c81cc886bfb5f8835d13e7e60fa4a569432149f4684
7
- data.tar.gz: d50b039fa4f0b3ed8a66019f522a6c8b64679a69e05a31b31a82a7e6e2c97d2fffab43593076729b3bf98da795f345f252a678a33e55d50209d3f15b1e74ef9f
6
+ metadata.gz: d5bdc95e65579bf90563c99afd7c4f71573d12e3b564423ca90d277a672fadc712c576867b771287c042f8c141050c615f213c24a7f36c1800a75ffbf5d33ca0
7
+ data.tar.gz: 47dbd452c5a1e069c19c43d6f3c818768579aa6d792fd9cf9e774b6d310772587da33c9dfc9742cbb431daafa6a73ba890b5c1331903ae41a7152db9c3c366c3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 3.5.3 / 2023-12-22
2
+
3
+ ## Enhancements:
4
+
5
+ * Installs bundler 2.5.3 as a default gem.
6
+
1
7
  # 3.5.2 / 2023-12-21
2
8
 
3
9
  ## Enhancements:
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 2.5.3 (December 22, 2023)
2
+
3
+ ## Bug fixes:
4
+
5
+ - Fix incorrect error when Gemfile overrides a gemspec development dependency [#7319](https://github.com/rubygems/rubygems/pull/7319)
6
+
1
7
  # 2.5.2 (December 21, 2023)
2
8
 
3
9
  ## 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 = "2023-12-21".freeze
8
- @git_commit_sha = "00351925e4".freeze
7
+ @built_at = "2023-12-22".freeze
8
+ @git_commit_sha = "a04f70b115".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -68,6 +68,10 @@ module Bundler
68
68
  @should_include && current_env? && current_platform?
69
69
  end
70
70
 
71
+ def gemspec_dev_dep?
72
+ type == :development
73
+ end
74
+
71
75
  def current_env?
72
76
  return true unless @env
73
77
  if @env.is_a?(Hash)
@@ -103,16 +103,21 @@ module Bundler
103
103
  # if there's already a dependency with this name we try to prefer one
104
104
  if current = @dependencies.find {|d| d.name == dep.name }
105
105
  # Always prefer the dependency from the Gemfile
106
- deleted_dep = @dependencies.delete(current) if current.type == :development
106
+ @dependencies.delete(current) if current.gemspec_dev_dep?
107
107
 
108
108
  if current.requirement != dep.requirement
109
109
  current_requirement_open = current.requirements_list.include?(">= 0")
110
110
 
111
- if current.type == :development
112
- unless current_requirement_open || dep.type == :development
113
- Bundler.ui.warn "A gemspec development dependency (#{dep.name}, #{current.requirement}) is being overridden by a Gemfile dependency (#{dep.name}, #{dep.requirement}).\n" \
114
- "This behaviour may change in the future. Please remove either of them, or make sure they both have the same requirement\n" \
111
+ gemspec_dep = [dep, current].find(&:gemspec_dev_dep?)
112
+ if gemspec_dep
113
+ gemfile_dep = [dep, current].find(&:runtime?)
114
+
115
+ unless current_requirement_open
116
+ Bundler.ui.warn "A gemspec development dependency (#{gemspec_dep.name}, #{gemspec_dep.requirement}) is being overridden by a Gemfile dependency (#{gemfile_dep.name}, #{gemfile_dep.requirement}).\n" \
117
+ "This behaviour may change in the future. Please remove either of them, or make sure they both have the same requirement\n"
115
118
  end
119
+
120
+ return if dep.gemspec_dev_dep?
116
121
  else
117
122
  update_prompt = ""
118
123
 
@@ -130,8 +135,8 @@ module Bundler
130
135
  "You specified: #{current.name} (#{current.requirement}) and #{dep.name} (#{dep.requirement})" \
131
136
  "#{update_prompt}"
132
137
  end
133
- elsif current.type == :development || dep.type == :development
134
- return if deleted_dep.nil?
138
+ elsif current.gemspec_dev_dep? || dep.gemspec_dev_dep?
139
+ return if dep.gemspec_dev_dep?
135
140
  elsif current.source != dep.source
136
141
  raise GemfileError, "You cannot specify the same gem twice coming from different sources.\n" \
137
142
  "You specified that #{dep.name} (#{dep.requirement}) should come from " \
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.5.2".freeze
4
+ VERSION = "2.5.3".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
@@ -133,6 +133,14 @@ module Gem
133
133
  end
134
134
  attr_reader :sign, :data
135
135
  end
136
+
137
+ class UserClass < Element
138
+ def initialize(name, wrapped_object)
139
+ @name = name
140
+ @wrapped_object = wrapped_object
141
+ end
142
+ attr_reader :name, :wrapped_object
143
+ end
136
144
  end
137
145
  end
138
146
  end
@@ -299,7 +299,9 @@ module Gem
299
299
  end
300
300
 
301
301
  def read_user_class
302
- raise NotImplementedError, "Reading Marshal objects of type user_class is not implemented"
302
+ name = read_element
303
+ wrapped_object = read_element
304
+ Elements::UserClass.new(name, wrapped_object)
303
305
  end
304
306
  end
305
307
  end
@@ -247,6 +247,30 @@ module Gem::SafeMarshal
247
247
  end
248
248
  end
249
249
 
250
+ def visit_Gem_SafeMarshal_Elements_UserClass(r)
251
+ if resolve_class(r.name) == ::Hash && r.wrapped_object.is_a?(Elements::Hash)
252
+
253
+ hash = register_object({}.compare_by_identity)
254
+
255
+ o = r.wrapped_object
256
+ o.pairs.each_with_index do |(k, v), i|
257
+ push_stack i
258
+ k = visit(k)
259
+ push_stack k
260
+ hash[k] = visit(v)
261
+ end
262
+
263
+ if o.is_a?(Elements::HashWithDefaultValue)
264
+ push_stack :default
265
+ hash.default = visit(o.default)
266
+ end
267
+
268
+ hash
269
+ else
270
+ raise UnsupportedError.new("Unsupported user class #{resolve_class(r.name)} in marshal stream", stack: formatted_stack)
271
+ end
272
+ end
273
+
250
274
  def resolve_class(n)
251
275
  @class_cache[n] ||= begin
252
276
  to_s = resolve_symbol_name(n)
@@ -375,6 +399,12 @@ module Gem::SafeMarshal
375
399
  end
376
400
  end
377
401
 
402
+ class UnsupportedError < Error
403
+ def initialize(message, stack:)
404
+ super "#{message} @ #{stack.join "."}"
405
+ end
406
+ end
407
+
378
408
  class FormatError < Error
379
409
  end
380
410
 
data/lib/rubygems.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  require "rbconfig"
10
10
 
11
11
  module Gem
12
- VERSION = "3.5.2"
12
+ VERSION = "3.5.3"
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.2"
5
+ s.version = "3.5.3"
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.2
4
+ version: 3.5.3
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-21 00:00:00.000000000 Z
19
+ date: 2023-12-22 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.2
705
+ rubygems_version: 3.5.3
706
706
  signing_key:
707
707
  specification_version: 4
708
708
  summary: RubyGems is a package management framework for Ruby. This gem is downloaded