bundler 2.3.3 → 2.3.4

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: 88610a0ccc28d334ac316852f804afb36dc3d727790261c4f7d1c35d16e30cbf
4
- data.tar.gz: 47dd496494e214a5679a93dc32822ba2469a96e46d39f57de1daee0cbe26f23e
3
+ metadata.gz: '07833d3c4b77a6566dce7964d5a9aa188967a39df2a81a78d145de9f27159019'
4
+ data.tar.gz: eb3e37e52c9ec73e4f59a63fca82d09b0469910a7f01f86ed734e4799926856c
5
5
  SHA512:
6
- metadata.gz: 4d8153145686030bcdde4b49d3ae5124cac3a621310e89427b4e88e8363d6700220415f16c112b4ae516437d02f2656d33a64aa9e61b8b5f324ed5ace3c0c4d7
7
- data.tar.gz: fad2d2b90df5e52e986507ad6f54063476aae11ef365550118bfd0556d95d3c79b2e218bdf8fcb82c15d2a32bac824b77249cafc647b18a2eea4367e429bd1d6
6
+ metadata.gz: 3c58cbd37d07fff2205a51f8157146d80eca0f155c1ec5d7396801bc5bc482767ec7e418e6549d7fed88904ab7fa9588b47f36b8bce8f2176dbe2062ffcd397b
7
+ data.tar.gz: '0118cc34cd853d7b51d116eb88d692b2637ab894a8029ee9d853ee2824705b55d6685ecfeaf51dd102fe8361afef0e606a581a511beaf91a92fef50403a56cec'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ # 2.3.4 (December 29, 2021)
2
+
3
+ ## Enhancements:
4
+
5
+ - Improve error message when `BUNDLED WITH` version does not exist [#5205](https://github.com/rubygems/rubygems/pull/5205)
6
+
7
+ ## Bug fixes:
8
+
9
+ - Fix `bundle update --bundler` no longer updating lockfile [#5224](https://github.com/rubygems/rubygems/pull/5224)
10
+
1
11
  # 2.3.3 (December 24, 2021)
2
12
 
3
13
  ## 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 = "2021-12-24".freeze
8
- @git_commit_sha = "688b71febc".freeze
7
+ @built_at = "2021-12-29".freeze
8
+ @git_commit_sha = "2296a0d6cc".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -103,7 +103,7 @@ module Bundler
103
103
 
104
104
  def self.system
105
105
  ruby_engine = RUBY_ENGINE.dup
106
- ruby_version = ENV.fetch("BUNDLER_SPEC_RUBY_VERSION") { RUBY_VERSION }.dup
106
+ ruby_version = RUBY_VERSION.dup
107
107
  ruby_engine_version = RUBY_ENGINE_VERSION.dup
108
108
  patchlevel = RUBY_PATCHLEVEL.to_s
109
109
 
@@ -15,10 +15,6 @@ module Bundler
15
15
  def install_locked_bundler_and_restart_with_it_if_needed
16
16
  return unless needs_switching?
17
17
 
18
- Bundler.ui.info \
19
- "Bundler #{current_version} is running, but your lockfile was generated with #{lockfile_version}. " \
20
- "Installing Bundler #{lockfile_version} and restarting using that version."
21
-
22
18
  install_and_restart_with_locked_bundler
23
19
  end
24
20
 
@@ -26,8 +22,14 @@ module Bundler
26
22
 
27
23
  def install_and_restart_with_locked_bundler
28
24
  bundler_dep = Gem::Dependency.new("bundler", lockfile_version)
25
+ spec = fetch_spec_for(bundler_dep)
26
+ return if spec.nil?
29
27
 
30
- Gem.install(bundler_dep)
28
+ Bundler.ui.info \
29
+ "Bundler #{current_version} is running, but your lockfile was generated with #{lockfile_version}. " \
30
+ "Installing Bundler #{lockfile_version} and restarting using that version."
31
+
32
+ spec.source.install(spec)
31
33
  rescue StandardError => e
32
34
  Bundler.ui.trace e
33
35
  Bundler.ui.warn "There was an error installing the locked bundler version (#{lockfile_version}), rerun with the `--verbose` flag for more details. Going on using bundler #{current_version}."
@@ -35,6 +37,17 @@ module Bundler
35
37
  restart_with_locked_bundler
36
38
  end
37
39
 
40
+ def fetch_spec_for(bundler_dep)
41
+ source = Bundler::Source::Rubygems.new("remotes" => "https://rubygems.org")
42
+ source.remote!
43
+ source.add_dependency_names("bundler")
44
+ spec = source.specs.search(bundler_dep).first
45
+ if spec.nil?
46
+ Bundler.ui.warn "Your lockfile is locked to a version of bundler (#{lockfile_version}) that doesn't exist at https://rubygems.org/. Going on using #{current_version}"
47
+ end
48
+ spec
49
+ end
50
+
38
51
  def restart_with_locked_bundler
39
52
  configured_gem_home = ENV["GEM_HOME"]
40
53
  configured_gem_path = ENV["GEM_PATH"]
@@ -56,7 +69,12 @@ module Bundler
56
69
  SharedHelpers.in_bundle? &&
57
70
  lockfile_version &&
58
71
  !lockfile_version.end_with?(".dev") &&
59
- lockfile_version != current_version
72
+ lockfile_version != current_version &&
73
+ !updating?
74
+ end
75
+
76
+ def updating?
77
+ "update".start_with?(ARGV.first || " ") && ARGV[1..-1].any? {|a| a.start_with?("--bundler") }
60
78
  end
61
79
 
62
80
  def installed?
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.3.3".freeze
4
+ VERSION = "2.3.4".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.3.3
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -22,7 +22,7 @@ authors:
22
22
  autorequire:
23
23
  bindir: exe
24
24
  cert_chain: []
25
- date: 2021-12-24 00:00:00.000000000 Z
25
+ date: 2021-12-29 00:00:00.000000000 Z
26
26
  dependencies: []
27
27
  description: Bundler manages an application's dependencies through its entire life,
28
28
  across many machines, systematically and repeatably
@@ -370,7 +370,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
370
370
  - !ruby/object:Gem::Version
371
371
  version: 2.5.2
372
372
  requirements: []
373
- rubygems_version: 3.3.3
373
+ rubygems_version: 3.3.4
374
374
  signing_key:
375
375
  specification_version: 4
376
376
  summary: The best way to manage your application's dependencies