bundler 2.3.2 → 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: b01d3406cc29cfbbd031854220cc941849c39690b72aefedaa9a16afd288f3b9
4
- data.tar.gz: 16dc9a02e52d5e1ea558fd6896f8e15073dcc580550e4ba53ae0fca62fcc32c1
3
+ metadata.gz: '07833d3c4b77a6566dce7964d5a9aa188967a39df2a81a78d145de9f27159019'
4
+ data.tar.gz: eb3e37e52c9ec73e4f59a63fca82d09b0469910a7f01f86ed734e4799926856c
5
5
  SHA512:
6
- metadata.gz: e1a3df279ba3c7e8bb7ae61b33ded9b8b860f24cc4e999a7eeb6fed136ba8c21961ebc6cd1b66f6b8fb258d02c44e50682c3bf8486d00ac73f6d0a58744985cf
7
- data.tar.gz: 620e60cba4783cca36f9d446a3df424696139c2d89181d303486e9d9bca0bf28c080ae94ddb6138e42316437fc8ff6a1da28cb1dd47f47cab6f02c97a924dfa7
6
+ metadata.gz: 3c58cbd37d07fff2205a51f8157146d80eca0f155c1ec5d7396801bc5bc482767ec7e418e6549d7fed88904ab7fa9588b47f36b8bce8f2176dbe2062ffcd397b
7
+ data.tar.gz: '0118cc34cd853d7b51d116eb88d692b2637ab894a8029ee9d853ee2824705b55d6685ecfeaf51dd102fe8361afef0e606a581a511beaf91a92fef50403a56cec'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
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
+
11
+ # 2.3.3 (December 24, 2021)
12
+
13
+ ## Bug fixes:
14
+
15
+ - Fix locked bundler not installed to the right path when `deployment` is set [#5217](https://github.com/rubygems/rubygems/pull/5217)
16
+
1
17
  # 2.3.2 (December 23, 2021)
2
18
 
3
19
  ## 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 = "2021-12-24".freeze
8
- @git_commit_sha = "c3c71e7434".freeze
7
+ @built_at = "2021-12-29".freeze
8
+ @git_commit_sha = "2296a0d6cc".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -165,9 +165,6 @@ module Bundler
165
165
 
166
166
  def normalize_settings
167
167
  Bundler.settings.set_command_option :path, nil if options[:system]
168
- Bundler.settings.temporary(:path_relative_to_cwd => false) do
169
- Bundler.settings.set_command_option :path, "vendor/bundle" if Bundler.settings[:deployment] && Bundler.settings[:path].nil?
170
- end
171
168
  Bundler.settings.set_command_option_if_given :path, options[:path]
172
169
  Bundler.settings.temporary(:path_relative_to_cwd => false) do
173
170
  Bundler.settings.set_command_option :path, "bundle" if options["standalone"] && Bundler.settings[:path].nil?
@@ -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?
@@ -219,6 +219,7 @@ module Bundler
219
219
  def path
220
220
  configs.each do |_level, settings|
221
221
  path = value_for("path", settings)
222
+ path = "vendor/bundle" if value_for("deployment", settings) && path.nil?
222
223
  path_system = value_for("path.system", settings)
223
224
  disabled_shared_gems = value_for("disable_shared_gems", settings)
224
225
  next if path.nil? && path_system.nil? && disabled_shared_gems.nil?
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.3.2".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.2
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.2
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