bundler 2.4.13 → 2.4.14

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: 2f398778d3a6ed24418f66d662473b293f06ac7cf5a8eae216e2bb801fc8511b
4
- data.tar.gz: 16e23bba1bf2d55e0b96c2a36a0407bfe4a2c4d8d858fa717fe491903e2e5e02
3
+ metadata.gz: 9946bc6a889915e914f12ec576748b58edfa7a41732d242dcd0ea72736bf0c54
4
+ data.tar.gz: ac280b3666ae5967bee95dc98ee754d20efb52f390d0653b85cec9a38d3cae3f
5
5
  SHA512:
6
- metadata.gz: d70332cfa48c7c7cb48cbb0eb0003b6b943f29bdb6be3d795f466027aa429069879a67d2a46ca82df7f7e22723f486875b65782c8cce656d10993e1671549ddb
7
- data.tar.gz: a3989657de73245ac7dae1ab62de41f02a2ef3bdcac5f3f66ec74c08e99e64d351b5e2bba483fd0a6bdb26921c0c08694ff1e5454090f4b5e9ec0eee94ef837c
6
+ metadata.gz: a8433864b6208eb1ce25b83d7dfac39b2745f906e2590d99b10d71de48dfb28cf028e7b6a7731289f534bfe2cbade1cc79cb1502096278f14ed67d70e21edcb2
7
+ data.tar.gz: ec6c495bd7a6fdef3c7bb2ce703494c3aeebb3eb902fed8022c0ba22d72df746b38da610bfa0ea7598e1022963a44f13dbc16e3142a178762b235128063371f0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ # 2.4.14 (June 12, 2023)
2
+
3
+ ## Enhancements:
4
+
5
+ - Stop publishing Gemfile in default gem template [#6723](https://github.com/rubygems/rubygems/pull/6723)
6
+ - Avoid infinite loops when hitting resolution bugs [#6722](https://github.com/rubygems/rubygems/pull/6722)
7
+ - Make `LockfileParser` usable with just a lockfile [#6694](https://github.com/rubygems/rubygems/pull/6694)
8
+ - Always rely on `$LOAD_PATH` when jumping from `exe/` to `lib/` [#6702](https://github.com/rubygems/rubygems/pull/6702)
9
+ - Make `frozen` setting take precedence over `deployment` setting [#6685](https://github.com/rubygems/rubygems/pull/6685)
10
+ - Show an error when trying to update bundler in frozen mode [#6684](https://github.com/rubygems/rubygems/pull/6684)
11
+
12
+ ## Bug fixes:
13
+
14
+ - Fix `deployment` vs `path` precedence [#6703](https://github.com/rubygems/rubygems/pull/6703)
15
+ - Fix inline mode with multiple sources [#6699](https://github.com/rubygems/rubygems/pull/6699)
16
+
1
17
  # 2.4.13 (May 9, 2023)
2
18
 
3
19
  ## Bug fixes:
data/exe/bundle CHANGED
@@ -10,11 +10,11 @@ end
10
10
  base_path = File.expand_path("../lib", __dir__)
11
11
 
12
12
  if File.exist?(base_path)
13
- require_relative "../lib/bundler"
14
- else
15
- require "bundler"
13
+ $LOAD_PATH.unshift(base_path)
16
14
  end
17
15
 
16
+ require "bundler"
17
+
18
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 " \
@@ -24,18 +24,10 @@ if Gem.rubygems_version < Gem::Version.new("3.2.3") && Gem.ruby_version < Gem::V
24
24
  "and silence this warning by running `gem update --system 3.2.3`"
25
25
  end
26
26
 
27
- if File.exist?(base_path)
28
- require_relative "../lib/bundler/friendly_errors"
29
- else
30
- require "bundler/friendly_errors"
31
- end
27
+ require "bundler/friendly_errors"
32
28
 
33
29
  Bundler.with_friendly_errors do
34
- if File.exist?(base_path)
35
- require_relative "../lib/bundler/cli"
36
- else
37
- require "bundler/cli"
38
- end
30
+ require "bundler/cli"
39
31
 
40
32
  # Allow any command to use --help flag to show help for that command
41
33
  help_flags = %w[--help -h]
@@ -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-05-10".freeze
8
- @git_commit_sha = "26eb456c6c".freeze
7
+ @built_at = "2023-06-12".freeze
8
+ @git_commit_sha = "69f47cf53a".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -217,6 +217,7 @@ module Bundler
217
217
  rescue BundlerError => e
218
218
  @resolve = nil
219
219
  @resolver = nil
220
+ @resolution_packages = nil
220
221
  @specs = nil
221
222
  @gem_version_promoter = nil
222
223
 
@@ -361,10 +362,8 @@ module Bundler
361
362
  "updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control."
362
363
 
363
364
  unless explicit_flag
364
- suggested_command = if Bundler.settings.locations("frozen").keys.&([:global, :local]).any?
365
- "bundle config unset frozen"
366
- elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
367
- "bundle config unset deployment"
365
+ suggested_command = unless Bundler.settings.locations("frozen").keys.include?(:env)
366
+ "bundle config set frozen false"
368
367
  end
369
368
  msg << "\n\nIf this is a development machine, remove the #{Bundler.default_gemfile} " \
370
369
  "freeze \nby running `#{suggested_command}`." if suggested_command
@@ -886,7 +885,8 @@ module Bundler
886
885
  if preserve_unknown_sections
887
886
  sections_to_ignore = LockfileParser.sections_to_ignore(@locked_bundler_version)
888
887
  sections_to_ignore += LockfileParser.unknown_sections_in_lockfile(current)
889
- sections_to_ignore += LockfileParser::ENVIRONMENT_VERSION_SECTIONS
888
+ sections_to_ignore << LockfileParser::RUBY
889
+ sections_to_ignore << LockfileParser::BUNDLED unless @unlocking_bundler
890
890
  pattern = /#{Regexp.union(sections_to_ignore)}\n(\s{2,}.*\n)+/
891
891
  whitespace_cleanup = /\n{2,}/
892
892
  current = current.gsub(pattern, "\n").gsub(whitespace_cleanup, "\n\n").strip
@@ -90,7 +90,7 @@ module Bundler
90
90
 
91
91
  Gem::Specification.reset # invalidate gem specification cache so that installed gems are immediately available
92
92
 
93
- lock unless Bundler.frozen_bundle?
93
+ lock
94
94
  Standalone.new(options[:standalone], @definition).generate if options[:standalone]
95
95
  end
96
96
  end
@@ -26,6 +26,7 @@ module Bundler
26
26
  KNOWN_SECTIONS = SECTIONS_BY_VERSION_INTRODUCED.values.flatten.freeze
27
27
 
28
28
  ENVIRONMENT_VERSION_SECTIONS = [BUNDLED, RUBY].freeze
29
+ deprecate_constant(:ENVIRONMENT_VERSION_SECTIONS)
29
30
 
30
31
  def self.sections_in_lockfile(lockfile_contents)
31
32
  lockfile_contents.scan(/^\w[\w ]*$/).uniq
@@ -219,7 +219,6 @@ 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?
223
222
  path_system = value_for("path.system", settings)
224
223
  disabled_shared_gems = value_for("disable_shared_gems", settings)
225
224
  next if path.nil? && path_system.nil? && disabled_shared_gems.nil?
@@ -227,7 +226,9 @@ module Bundler
227
226
  return Path.new(path, system_path)
228
227
  end
229
228
 
230
- Path.new(nil, false)
229
+ path = "vendor/bundle" if self[:deployment]
230
+
231
+ Path.new(path, false)
231
232
  end
232
233
 
233
234
  Path = Struct.new(:explicit_path, :system_path) do
@@ -10,7 +10,7 @@ module Bundler
10
10
  # Ask for X gems per API request
11
11
  API_REQUEST_SIZE = 50
12
12
 
13
- attr_reader :remotes, :caches
13
+ attr_reader :remotes
14
14
 
15
15
  def initialize(options = {})
16
16
  @options = options
@@ -19,11 +19,14 @@ module Bundler
19
19
  @allow_remote = false
20
20
  @allow_cached = false
21
21
  @allow_local = options["allow_local"] || false
22
- @caches = [cache_path, *Bundler.rubygems.gem_cache]
23
22
 
24
23
  Array(options["remotes"]).reverse_each {|r| add_remote(r) }
25
24
  end
26
25
 
26
+ def caches
27
+ @caches ||= [cache_path, *Bundler.rubygems.gem_cache]
28
+ end
29
+
27
30
  def local_only!
28
31
  @specs = nil
29
32
  @allow_local = true
@@ -324,9 +327,9 @@ module Bundler
324
327
 
325
328
  def cached_path(spec)
326
329
  global_cache_path = download_cache_path(spec)
327
- @caches << global_cache_path if global_cache_path
330
+ caches << global_cache_path if global_cache_path
328
331
 
329
- possibilities = @caches.map {|p| package_path(p, spec) }
332
+ possibilities = caches.map {|p| package_path(p, spec) }
330
333
  possibilities.find {|p| File.exist?(p) }
331
334
  end
332
335
 
@@ -29,7 +29,8 @@ Gem::Specification.new do |spec|
29
29
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
30
30
  spec.files = Dir.chdir(__dir__) do
31
31
  `git ls-files -z`.split("\x0").reject do |f|
32
- (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
32
+ (File.expand_path(f) == __FILE__) ||
33
+ f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
33
34
  end
34
35
  end
35
36
  spec.bindir = "exe"
@@ -162,7 +162,7 @@ module Bundler::PubGrub
162
162
  def resolve_conflict(incompatibility)
163
163
  logger.info { "conflict: #{incompatibility}" }
164
164
 
165
- new_incompatibility = false
165
+ new_incompatibility = nil
166
166
 
167
167
  while !incompatibility.failure?
168
168
  most_recent_term = nil
@@ -204,7 +204,7 @@ module Bundler::PubGrub
204
204
  solution.backtrack(previous_level)
205
205
 
206
206
  if new_incompatibility
207
- add_incompatibility(incompatibility)
207
+ add_incompatibility(new_incompatibility)
208
208
  end
209
209
 
210
210
  return incompatibility
@@ -219,9 +219,14 @@ module Bundler::PubGrub
219
219
  new_terms << difference.invert
220
220
  end
221
221
 
222
- incompatibility = Incompatibility.new(new_terms, cause: Incompatibility::ConflictCause.new(incompatibility, most_recent_satisfier.cause))
222
+ new_incompatibility = Incompatibility.new(new_terms, cause: Incompatibility::ConflictCause.new(incompatibility, most_recent_satisfier.cause))
223
223
 
224
- new_incompatibility = true
224
+ if incompatibility.to_s == new_incompatibility.to_s
225
+ logger.info { "!! failed to resolve conflicts, this shouldn't have happened" }
226
+ break
227
+ end
228
+
229
+ incompatibility = new_incompatibility
225
230
 
226
231
  partially = difference ? " partially" : ""
227
232
  logger.info { "! #{most_recent_term} is#{partially} satisfied by #{most_recent_satisfier.term}" }
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.4.13".freeze
4
+ VERSION = "2.4.14".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
data/lib/bundler.rb CHANGED
@@ -210,9 +210,10 @@ module Bundler
210
210
  end
211
211
 
212
212
  def frozen_bundle?
213
- frozen = settings[:deployment]
214
- frozen ||= settings[:frozen]
215
- frozen
213
+ frozen = settings[:frozen]
214
+ return frozen unless frozen.nil?
215
+
216
+ settings[:deployment]
216
217
  end
217
218
 
218
219
  def locked_gems
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.13
4
+ version: 2.4.14
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: 2023-05-10 00:00:00.000000000 Z
25
+ date: 2023-06-12 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
@@ -381,7 +381,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
381
381
  - !ruby/object:Gem::Version
382
382
  version: 3.0.1
383
383
  requirements: []
384
- rubygems_version: 3.4.13
384
+ rubygems_version: 3.4.14
385
385
  signing_key:
386
386
  specification_version: 4
387
387
  summary: The best way to manage your application's dependencies