bundler 2.4.0 → 2.4.1

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: 5666713af257e893dd50d9f49adab026845e67791d3e908cc0d247a182e20309
4
- data.tar.gz: e923d5fa0d4b280575655250f043f86b75aa992a0dd17a701035b34412ae58b4
3
+ metadata.gz: 3879231a44592278d9e95f3a7d14f6e996e5230743167aed240804bba6a38310
4
+ data.tar.gz: 59b18e9d1028711d8429a959d187874f4a59e5f8eb60b6fde8e20f2014a2696b
5
5
  SHA512:
6
- metadata.gz: 20a8d843d39aa1fa433bd317ff79695307e9bb1943a6927b301003a8b90414367fc774df18fcb02f8cdd985008c4d92f7f55e73473a04b55366fa17925b6c2ab
7
- data.tar.gz: 74babdfe5c2971a533d83f25f35a9a914d26eb49541f747ba78e11ab6202e7b346350d8275e28dc0a53f6f6e02438c6470fda1e3a48efa2ec871296a16f3a4bf
6
+ metadata.gz: a393173a63781a473018a2e8ad480743a3f57507afa8cc60fa4da939604b99cfa78efc5859f18805ed03f3242cbefb5fd4361916270e8eb7077e975a8c85821e
7
+ data.tar.gz: 94cf58b87543d46ad50b50043e20a6b4c5a2e3d495e3f781065013e3d7d28d6c6dfc9fbaa6edded6253a90f5dfba42d67c0efd0ec9a920a2784c7c653ee57130
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # 2.4.1 (December 24, 2022)
2
+
3
+ ## Enhancements:
4
+
5
+ - Allow Bundler to run on old RubyGems + Ruby 2.7 without warnings [#6187](https://github.com/rubygems/rubygems/pull/6187)
6
+
7
+ ## Bug fixes:
8
+
9
+ - Fix dependencies scoped to other platforms making resolver fail [#6189](https://github.com/rubygems/rubygems/pull/6189)
10
+ - Restore annotated git tag support [#6186](https://github.com/rubygems/rubygems/pull/6186)
11
+
1
12
  # 2.4.0 (December 24, 2022)
2
13
 
3
14
  ## Security:
data/exe/bundle CHANGED
@@ -15,7 +15,7 @@ else
15
15
  require "bundler"
16
16
  end
17
17
 
18
- if Gem.rubygems_version < Gem::Version.new("3.2.3") && Gem.ruby_version < Gem::Version.new("3.0.a") && !ENV["BUNDLER_NO_OLD_RUBYGEMS_WARNING"]
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 " \
21
21
  "`required_ruby_version` from working for Bundler. Any scripts that use " \
@@ -5,7 +5,7 @@ module Bundler
5
5
  module BuildMetadata
6
6
  # begin ivars
7
7
  @built_at = "2022-12-24".freeze
8
- @git_commit_sha = "e67004d0fe".freeze
8
+ @git_commit_sha = "f3175f033c".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -311,7 +311,16 @@ module Bundler
311
311
  def prepare_dependencies(requirements, packages)
312
312
  to_dependency_hash(requirements, packages).map do |dep_package, dep_constraint|
313
313
  name = dep_package.name
314
- next if dep_package.platforms.empty?
314
+
315
+ # If a dependency is scoped to a platform different from the current
316
+ # one, we ignore it. However, it may reappear during resolution as a
317
+ # transitive dependency of another package, so we need to reset the
318
+ # package so the proper versions are considered if reintroduced later.
319
+ if dep_package.platforms.empty?
320
+ @packages.delete(name)
321
+ next
322
+ end
323
+
315
324
  next [dep_package, dep_constraint] if name == "bundler"
316
325
  next [dep_package, dep_constraint] unless versions_for(dep_package, dep_constraint.range).empty?
317
326
  next unless dep_package.current_platform?
@@ -58,6 +58,7 @@ module Bundler
58
58
  @explicit_ref = branch || tag || ref
59
59
  @revision = revision
60
60
  @git = git
61
+ @commit_ref = nil
61
62
  end
62
63
 
63
64
  def revision
@@ -116,7 +117,7 @@ module Bundler
116
117
  end
117
118
  end
118
119
 
119
- git "fetch", "--force", "--quiet", *extra_fetch_args, :dir => destination
120
+ git "fetch", "--force", "--quiet", *extra_fetch_args, :dir => destination if @commit_ref
120
121
 
121
122
  git "reset", "--hard", @revision, :dir => destination
122
123
 
@@ -185,11 +186,16 @@ module Bundler
185
186
  end
186
187
 
187
188
  def refspec
188
- return ref if pinned_to_full_sha?
189
+ commit = pinned_to_full_sha? ? ref : @revision
189
190
 
190
- ref_to_fetch = @revision || fully_qualified_ref
191
+ if commit
192
+ @commit_ref = "refs/#{commit}-sha"
193
+ return "#{commit}:#{@commit_ref}"
194
+ end
195
+
196
+ reference = fully_qualified_ref
191
197
 
192
- ref_to_fetch ||= if ref.include?("~")
198
+ reference ||= if ref.include?("~")
193
199
  ref.split("~").first
194
200
  elsif ref.start_with?("refs/")
195
201
  ref
@@ -197,7 +203,7 @@ module Bundler
197
203
  "refs/*"
198
204
  end
199
205
 
200
- "#{ref_to_fetch}:#{ref_to_fetch}"
206
+ "#{reference}:#{reference}"
201
207
  end
202
208
 
203
209
  def fully_qualified_ref
@@ -218,10 +224,6 @@ module Bundler
218
224
  ref =~ /\A\h{40}\z/
219
225
  end
220
226
 
221
- def legacy_locked_revision?
222
- !@revision.nil? && @revision =~ /\A\h{7}\z/
223
- end
224
-
225
227
  def git_null(*command, dir: nil)
226
228
  check_allowed(command)
227
229
 
@@ -241,9 +243,9 @@ module Bundler
241
243
 
242
244
  out, err, status = capture(command, dir)
243
245
 
244
- Bundler.ui.warn err unless err.empty?
246
+ raise GitCommandError.new(command_with_no_credentials, dir || SharedHelpers.pwd, err) unless status.success?
245
247
 
246
- raise GitCommandError.new(command_with_no_credentials, dir || SharedHelpers.pwd, out) unless status.success?
248
+ Bundler.ui.warn err unless err.empty?
247
249
 
248
250
  out
249
251
  end
@@ -344,9 +346,10 @@ module Bundler
344
346
  end
345
347
 
346
348
  def extra_clone_args
347
- return [] if full_clone?
349
+ args = depth_args
350
+ return [] if args.empty?
348
351
 
349
- args = ["--depth", depth.to_s, "--single-branch"]
352
+ args += ["--single-branch"]
350
353
  args.unshift("--no-tags") if supports_cloning_with_no_tags?
351
354
 
352
355
  args += ["--branch", branch || tag] if branch || tag
@@ -361,7 +364,7 @@ module Bundler
361
364
 
362
365
  def extra_fetch_args
363
366
  extra_args = [path.to_s, *depth_args]
364
- extra_args.push(revision) unless legacy_locked_revision?
367
+ extra_args.push(@commit_ref)
365
368
  extra_args
366
369
  end
367
370
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.4.0".freeze
4
+ VERSION = "2.4.1".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
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.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko