Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-bundler for openSUSE:Factory 
checked in at 2021-09-29 20:19:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-bundler (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-bundler.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-bundler"

Wed Sep 29 20:19:15 2021 rev:54 rq:922195 version:2.2.27

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-bundler/rubygem-bundler.changes  
2021-08-27 21:43:46.293961289 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-bundler.new.1899/rubygem-bundler.changes    
    2021-09-29 20:20:46.835150836 +0200
@@ -1,0 +2,50 @@
+Tue Sep 21 06:41:25 UTC 2021 - Lars Vogdt <[email protected]>
+
+- update to version 2.2.27
+  see installed CHANGELOG.md
+  ## Enhancements:
+  - Optimize some requires #4887
+  - Correctly redact credentials when using x-oauth-basic #4866
+  ## Bug fixes:
+  - Add missing key branches: to template for GitHub Actions #4883
+  - Fix bundle plugin install detection of already installed plugins #4869
+  - Make plugin installation idempotent #4864
+  - Fix bundle check showing duplicated gems when multiple platforms are 
locked #4854
+  - Fix bundle check incorrectly considering cached gems #4853
+
+  # 2.2.26 (August 17, 2021)
+  ## Enhancements:
+  - Remove RUBYGEMS_GEMDEPS warning #4827
+  - Better defaults for GitHub Actions template generated by bundle gem #4619
+  - Make bundle exec keep file descriptors by default #4812
+  - Exclude gemspec file itself from file list of gems generated by bundle gem 
#4650
+  - Fix a couple small typos in deprecation / error messages #4806
+  - Make script generated by bundle install --standalone resilient to 
+    moving the application to a differently nested folder when path 
+    sources are used #4792
+  - Exclude CI files and issue templates from file list of gems 
+    generated by bundle gem #4033
+  ## Bug fixes:
+  - Respect BUNDLE_USER_HOME env when choosing config location #4828
+  - Fix bundle gem on path with spaces #4816
+  - Fix bundler hitting the network in some cases where not allowed #4805
+
+  # 2.2.25 (July 30, 2021)
+  ## Deprecations:
+  - Deprecate Gemfile without an explicit global source #4779
+  - Deprecate bundle cache --path #4496
+  ## Enhancements:
+  - Give better errors when materialization fails #4788
+  - Lazily load shellwords library #4786
+  - Show original error and backtrace directly on bundle install errors 
+    instead of a more brittle gem install hint #4778
+  - Remove LoadError message in regards to requiring a relative file #4772
+  ## Bug fixes:
+  - Fix BUNDLE_USER_CONFIG no longer respected as config location #4797
+  - Fix --standalone installation of default gems #4782
+  - Fix --quiet flag not printing warnings #4781
+  - Fix bundler binstub version selection #4775
+  - Fix interrupt handling in Bundler workers #4767
+- allow ruby 2.7 on newer openSUSE versions
+
+-------------------------------------------------------------------

Old:
----
  bundler-2.2.24.gem

New:
----
  bundler-2.2.27.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-bundler.spec ++++++
--- /var/tmp/diff_new_pack.iWMK3L/_old  2021-09-29 20:20:47.471151759 +0200
+++ /var/tmp/diff_new_pack.iWMK3L/_new  2021-09-29 20:20:47.475151764 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-bundler
-Version:        2.2.24
+Version:        2.2.27
 Release:        0
 %define mod_name bundler
 %define mod_full_name %{mod_name}-%{version}

++++++ bundler-2.2.24.gem -> bundler-2.2.27.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2021-07-15 17:00:51.000000000 +0200
+++ new/CHANGELOG.md    2021-09-03 10:27:42.000000000 +0200
@@ -1,3 +1,58 @@
+# 2.2.27 (September 3, 2021)
+
+## Enhancements:
+
+  - Optimize some requires 
[#4887](https://github.com/rubygems/rubygems/pull/4887)
+  - Correctly redact credentials when using x-oauth-basic 
[#4866](https://github.com/rubygems/rubygems/pull/4866)
+
+## Bug fixes:
+
+  - Add missing key `branches:` to template for GitHub Actions 
[#4883](https://github.com/rubygems/rubygems/pull/4883)
+  - Fix `bundle plugin install` detection of already installed plugins 
[#4869](https://github.com/rubygems/rubygems/pull/4869)
+  - Make plugin installation idempotent 
[#4864](https://github.com/rubygems/rubygems/pull/4864)
+  - Fix `bundle check` showing duplicated gems when multiple platforms are 
locked [#4854](https://github.com/rubygems/rubygems/pull/4854)
+  - Fix `bundle check` incorrectly considering cached gems 
[#4853](https://github.com/rubygems/rubygems/pull/4853)
+
+# 2.2.26 (August 17, 2021)
+
+## Enhancements:
+
+  - Remove `RUBYGEMS_GEMDEPS` warning 
[#4827](https://github.com/rubygems/rubygems/pull/4827)
+  - Better defaults for GitHub Actions template generated by `bundle gem` 
[#4619](https://github.com/rubygems/rubygems/pull/4619)
+  - Make `bundle exec` keep file descriptors by default 
[#4812](https://github.com/rubygems/rubygems/pull/4812)
+  - Exclude gemspec file itself from file list of gems generated by `bundle 
gem` [#4650](https://github.com/rubygems/rubygems/pull/4650)
+  - Fix a couple small typos in deprecation / error messages 
[#4806](https://github.com/rubygems/rubygems/pull/4806)
+  - Make script generated by `bundle install --standalone` resilient to moving 
the application to a differently nested folder when `path` sources are used 
[#4792](https://github.com/rubygems/rubygems/pull/4792)
+  - Exclude CI files and issue templates from file list of gems generated by 
`bundle gem` [#4033](https://github.com/rubygems/rubygems/pull/4033)
+
+## Bug fixes:
+
+  - Respect `BUNDLE_USER_HOME` env when choosing config location 
[#4828](https://github.com/rubygems/rubygems/pull/4828)
+  - Fix `bundle gem` on path with spaces 
[#4816](https://github.com/rubygems/rubygems/pull/4816)
+  - Fix bundler hitting the network in some cases where not allowed 
[#4805](https://github.com/rubygems/rubygems/pull/4805)
+
+# 2.2.25 (July 30, 2021)
+
+## Deprecations:
+
+  - Deprecate Gemfile without an explicit global source 
[#4779](https://github.com/rubygems/rubygems/pull/4779)
+  - Deprecate `bundle cache --path` 
[#4496](https://github.com/rubygems/rubygems/pull/4496)
+
+## Enhancements:
+
+  - Give better errors when materialization fails 
[#4788](https://github.com/rubygems/rubygems/pull/4788)
+  - Lazily load `shellwords` library 
[#4786](https://github.com/rubygems/rubygems/pull/4786)
+  - Show original error and backtrace directly on `bundle install` errors 
instead of a more brittle `gem install` hint 
[#4778](https://github.com/rubygems/rubygems/pull/4778)
+  - Remove LoadError message in regards to requiring a relative file 
[#4772](https://github.com/rubygems/rubygems/pull/4772)
+
+## Bug fixes:
+
+  - Fix `BUNDLE_USER_CONFIG` no longer respected as config location 
[#4797](https://github.com/rubygems/rubygems/pull/4797)
+  - Fix `--standalone` installation of default gems 
[#4782](https://github.com/rubygems/rubygems/pull/4782)
+  - Fix `--quiet` flag not printing warnings 
[#4781](https://github.com/rubygems/rubygems/pull/4781)
+  - Fix bundler binstub version selection 
[#4775](https://github.com/rubygems/rubygems/pull/4775)
+  - Fix interrupt handling in Bundler workers 
[#4767](https://github.com/rubygems/rubygems/pull/4767)
+
 # 2.2.24 (July 15, 2021)
 
 ## Bug fixes:
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/build_metadata.rb 
new/lib/bundler/build_metadata.rb
--- old/lib/bundler/build_metadata.rb   2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/build_metadata.rb   2021-09-03 10:27:42.000000000 +0200
@@ -4,8 +4,8 @@
   # Represents metadata from when the Bundler gem was built.
   module BuildMetadata
     # begin ivars
-    @built_at = "2021-07-15".freeze
-    @git_commit_sha = "d78b1ee235".freeze
+    @built_at = "2021-09-03".freeze
+    @git_commit_sha = "b737e1c930".freeze
     @release = true
     # end ivars
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/cli/cache.rb new/lib/bundler/cli/cache.rb
--- old/lib/bundler/cli/cache.rb        2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/cli/cache.rb        2021-09-03 10:27:42.000000000 +0200
@@ -9,7 +9,7 @@
     end
 
     def run
-      Bundler.ui.level = "error" if options[:quiet]
+      Bundler.ui.level = "warn" if options[:quiet]
       Bundler.settings.set_command_option_if_given :path, options[:path]
       Bundler.settings.set_command_option_if_given :cache_path, 
options["cache-path"]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/cli/doctor.rb 
new/lib/bundler/cli/doctor.rb
--- old/lib/bundler/cli/doctor.rb       2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/cli/doctor.rb       2021-09-03 10:27:42.000000000 +0200
@@ -61,7 +61,7 @@
     end
 
     def run
-      Bundler.ui.level = "error" if options[:quiet]
+      Bundler.ui.level = "warn" if options[:quiet]
       Bundler.settings.validate!
       check!
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/cli/exec.rb new/lib/bundler/cli/exec.rb
--- old/lib/bundler/cli/exec.rb 2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/cli/exec.rb 2021-09-03 10:27:42.000000000 +0200
@@ -12,12 +12,7 @@
       @options = options
       @cmd = args.shift
       @args = args
-
-      if !Bundler.current_ruby.jruby?
-        @args << { :close_others => !options.keep_file_descriptors? }
-      elsif options.keep_file_descriptors?
-        Bundler.ui.warn "Ruby version #{RUBY_VERSION} defaults to keeping 
non-standard file descriptors on Kernel#exec."
-      end
+      @args << { :close_others => !options.keep_file_descriptors? } unless 
Bundler.current_ruby.jruby?
     end
 
     def run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/cli/gem.rb new/lib/bundler/cli/gem.rb
--- old/lib/bundler/cli/gem.rb  2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/cli/gem.rb  2021-09-03 10:27:42.000000000 +0200
@@ -184,14 +184,15 @@
         )
       end
 
-      if File.exist?(target) && !File.directory?(target)
+      if target.exist? && !target.directory?
         Bundler.ui.error "Couldn't create a new gem named `#{gem_name}` 
because there's an existing file named `#{gem_name}`."
         exit Bundler::BundlerError.all_errors[Bundler::GenericSystemCallError]
       end
 
       if use_git
         Bundler.ui.info "Initializing git repo in #{target}"
-        `git init #{target}`
+        require "shellwords"
+        `git init #{target.to_s.shellescape}`
 
         config[:git_default_branch] = 
File.read("#{target}/.git/HEAD").split("/").last.chomp
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/cli/install.rb 
new/lib/bundler/cli/install.rb
--- old/lib/bundler/cli/install.rb      2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/cli/install.rb      2021-09-03 10:27:42.000000000 +0200
@@ -8,7 +8,7 @@
     end
 
     def run
-      Bundler.ui.level = "error" if options[:quiet]
+      Bundler.ui.level = "warn" if options[:quiet]
 
       warn_if_root
 
@@ -60,7 +60,7 @@
       installer = Installer.install(Bundler.root, definition, options)
 
       Bundler.settings.temporary(:cache_all_platforms => options[:local] ? 
false : Bundler.settings[:cache_all_platforms]) do
-        Bundler.load.cache if Bundler.app_cache.exist? && !options["no-cache"] 
&& !Bundler.frozen_bundle?
+        Bundler.load.cache(nil, options[:local]) if Bundler.app_cache.exist? 
&& !options["no-cache"] && !Bundler.frozen_bundle?
       end
 
       Bundler.ui.confirm "Bundle complete! 
#{dependencies_count_for(definition)}, #{gems_installed_for(definition)}."
@@ -83,22 +83,9 @@
       end
 
       Bundler::CLI::Common.output_fund_metadata_summary
-    rescue GemNotFound, VersionConflict => e
-      if options[:local] && Bundler.app_cache.exist?
-        Bundler.ui.warn "Some gems seem to be missing from your 
#{Bundler.settings.app_cache_path} directory."
-      end
-
-      unless Bundler.definition.has_rubygems_remotes?
-        Bundler.ui.warn <<-WARN, :wrap => true
-          Your Gemfile has no gem server sources. If you need gems that are \
-          not already on your machine, add a line like this to your Gemfile:
-          source 'https://rubygems.org'
-        WARN
-      end
-      raise e
-    rescue Gem::InvalidSpecificationException => e
+    rescue Gem::InvalidSpecificationException
       Bundler.ui.warn "You have one or more invalid gemspecs that need to be 
fixed."
-      raise e
+      raise
     end
 
     private
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/cli/list.rb new/lib/bundler/cli/list.rb
--- old/lib/bundler/cli/list.rb 2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/cli/list.rb 2021-09-03 10:27:42.000000000 +0200
@@ -16,7 +16,13 @@
       specs = if @only_group.any? || @without_group.any?
         filtered_specs_by_groups
       else
-        Bundler.load.specs
+        begin
+          Bundler.load.specs
+        rescue GemNotFound => e
+          Bundler.ui.error e.message
+          Bundler.ui.warn "Install missing gems with `bundle install`."
+          exit 1
+        end
       end.reject {|s| s.name == "bundler" }.sort_by(&:name)
 
       return Bundler.ui.info "No gems in the Gemfile" if specs.empty?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/cli/open.rb new/lib/bundler/cli/open.rb
--- old/lib/bundler/cli/open.rb 2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/cli/open.rb 2021-09-03 10:27:42.000000000 +0200
@@ -1,7 +1,5 @@
 # frozen_string_literal: true
 
-require "shellwords"
-
 module Bundler
   class CLI::Open
     attr_reader :options, :name
@@ -19,6 +17,7 @@
       else
         path = spec.full_gem_path
         Dir.chdir(path) do
+          require "shellwords"
           command = Shellwords.split(editor) + [path]
           Bundler.with_original_env do
             system(*command)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/cli/update.rb 
new/lib/bundler/cli/update.rb
--- old/lib/bundler/cli/update.rb       2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/cli/update.rb       2021-09-03 10:27:42.000000000 +0200
@@ -9,7 +9,7 @@
     end
 
     def run
-      Bundler.ui.level = "error" if options[:quiet]
+      Bundler.ui.level = "warn" if options[:quiet]
 
       Plugin.gemfile_install(Bundler.default_gemfile) if 
Bundler.feature_flag.plugins?
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/cli.rb new/lib/bundler/cli.rb
--- old/lib/bundler/cli.rb      2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/cli.rb      2021-09-03 10:27:42.000000000 +0200
@@ -73,14 +73,6 @@
       Bundler.ui = UI::Shell.new(options)
       Bundler.ui.level = "debug" if options["verbose"]
       unprinted_warnings.each {|w| Bundler.ui.warn(w) }
-
-      if ENV["RUBYGEMS_GEMDEPS"] && !ENV["RUBYGEMS_GEMDEPS"].empty?
-        Bundler.ui.warn(
-          "The RUBYGEMS_GEMDEPS environment variable is set. This enables 
RubyGems' " \
-          "experimental Gemfile mode, which may conflict with Bundler and 
cause unexpected errors. " \
-          "To remove this warning, unset RUBYGEMS_GEMDEPS.", :wrap => true
-        )
-      end
     end
 
     check_unknown_options!(:except => [:config, :exec])
@@ -456,6 +448,12 @@
         "do in future versions. Instead please use `bundle config set 
cache_all true`, " \
         "and stop using this flag" if ARGV.include?("--all")
 
+      SharedHelpers.major_deprecation 2,
+        "The `--path` flag is deprecated because its semantics are unclear. " \
+        "Use `bundle config cache_path` to configure the path of your cache of 
gems, " \
+        "and `bundle config path` to configure the path where your gems are 
installed, " \
+        "and stop using this flag" if ARGV.include?("--path")
+
       require_relative "cli/cache"
       Cache.new(options).run
     end
@@ -463,7 +461,7 @@
     map aliases_for("cache")
 
     desc "exec [OPTIONS]", "Run the command in context of the bundle"
-    method_option :keep_file_descriptors, :type => :boolean, :default => false
+    method_option :keep_file_descriptors, :type => :boolean, :default => true
     method_option :gemfile, :type => :string, :required => false
     long_desc <<-D
       Exec runs a command, providing it access to the gems in the bundle. 
While using
@@ -471,6 +469,10 @@
       into the system wide RubyGems repository.
     D
     def exec(*args)
+      if ARGV.include?("--no-keep-file-descriptors")
+        SharedHelpers.major_deprecation(2, "The `--no-keep-file-descriptors` 
has been deprecated. `bundle exec` no longer mess with your file descriptors. 
Close them in the exec'd script if you need to")
+      end
+
       require_relative "cli/exec"
       Exec.new(options, args).run
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/definition.rb 
new/lib/bundler/definition.rb
--- old/lib/bundler/definition.rb       2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/definition.rb       2021-09-03 10:27:42.000000000 +0200
@@ -133,7 +133,7 @@
         @unlock[:gems] ||= @dependencies.map(&:name)
       else
         eager_unlock = expand_dependencies(@unlock[:gems] || [], true)
-        @unlock[:gems] = @locked_specs.for(eager_unlock, false, false, 
false).map(&:name)
+        @unlock[:gems] = @locked_specs.for(eager_unlock, false, 
false).map(&:name)
       end
 
       @dependency_changes = converge_dependencies
@@ -185,15 +185,7 @@
     #
     # @return [Bundler::SpecSet]
     def specs
-      @specs ||= add_bundler_to(resolve.materialize(requested_dependencies))
-    rescue GemNotFound => e # Handle yanked gem
-      gem_name, gem_version = extract_gem_info(e)
-      locked_gem = @locked_specs[gem_name].last
-      raise if locked_gem.nil? || locked_gem.version.to_s != gem_version || 
!@remote
-      raise GemNotFound, "Your bundle is locked to #{locked_gem} from 
#{locked_gem.source}, but that version can " \
-                         "no longer be found in that source. That means the 
author of #{locked_gem} has removed it. " \
-                         "You'll need to update your bundle to a version other 
than #{locked_gem} that hasn't been " \
-                         "removed in order to install."
+      @specs ||= materialize(requested_dependencies)
     end
 
     def new_specs
@@ -205,9 +197,7 @@
     end
 
     def missing_specs
-      missing = []
-      resolve.materialize(requested_dependencies, missing)
-      missing
+      resolve.materialize(requested_dependencies).missing_specs
     end
 
     def missing_specs?
@@ -241,7 +231,7 @@
     def specs_for(groups)
       groups = requested_groups if groups.empty?
       deps = dependencies_for(groups)
-      add_bundler_to(resolve.materialize(expand_dependencies(deps)))
+      materialize(expand_dependencies(deps))
     end
 
     def dependencies_for(groups)
@@ -274,10 +264,6 @@
       end
     end
 
-    def has_rubygems_remotes?
-      sources.rubygems_sources.any? {|s| s.remotes.any? }
-    end
-
     def spec_git_paths
       sources.git_sources.map {|s| File.realpath(s.path) if 
File.exist?(s.path) }.compact
     end
@@ -493,7 +479,23 @@
 
     private
 
-    def add_bundler_to(specs)
+    def materialize(dependencies)
+      specs = resolve.materialize(dependencies)
+      missing_specs = specs.missing_specs
+
+      if missing_specs.any?
+        missing_specs.each do |s|
+          locked_gem = @locked_specs[s.name].last
+          next if locked_gem.nil? || locked_gem.version != s.version || 
!@remote
+          raise GemNotFound, "Your bundle is locked to #{locked_gem} from 
#{locked_gem.source}, but that version can " \
+                             "no longer be found in that source. That means 
the author of #{locked_gem} has removed it. " \
+                             "You'll need to update your bundle to a version 
other than #{locked_gem} that hasn't been " \
+                             "removed in order to install."
+        end
+
+        raise GemNotFound, "Could not find 
#{missing_specs.map(&:full_name).join(", ")} in any of the sources"
+      end
+
       unless specs["bundler"].any?
         bundler = 
sources.metadata_source.specs.search(Gem::Dependency.new("bundler", 
VERSION)).last
         specs["bundler"] = bundler
@@ -503,7 +505,7 @@
     end
 
     def precompute_source_requirements_for_indirect_dependencies?
-      sources.non_global_rubygems_sources.all?(&:dependency_api_available?) && 
!sources.aggregate_global_source?
+      @remote && 
sources.non_global_rubygems_sources.all?(&:dependency_api_available?) && 
!sources.aggregate_global_source?
     end
 
     def current_ruby_platform_locked?
@@ -712,7 +714,7 @@
       @locked_specs.each do |s|
         # Replace the locked dependency's source with the equivalent source 
from the Gemfile
         dep = @dependencies.find {|d| s.satisfies?(d) }
-        s.source = (dep && dep.source) || sources.get(s.source)
+        s.source = (dep && dep.source) || sources.get(s.source) unless 
multisource_allowed?
 
         # Don't add a spec to the list if its source is expired. For example,
         # if you change a Git gem to RubyGems.
@@ -730,7 +732,7 @@
             # if we won't need the source (according to the lockfile),
             # don't error if the path/git source isn't available
             next if @locked_specs.
-                    for(requested_dependencies, false, true, false).
+                    for(requested_dependencies, false, true).
                     none? {|locked_spec| locked_spec.source == s.source }
 
             raise
@@ -750,7 +752,7 @@
 
       resolve = SpecSet.new(converged)
       @locked_specs_incomplete_for_platform = 
!resolve.for(expand_dependencies(requested_dependencies & deps), true, true)
-      resolve = SpecSet.new(resolve.for(expand_dependencies(deps, true), 
false, false, false).reject{|s| @unlock[:gems].include?(s.name) })
+      resolve = SpecSet.new(resolve.for(expand_dependencies(deps, true), 
false, false).reject{|s| @unlock[:gems].include?(s.name) })
       diff    = nil
 
       # Now, we unlock any sources that do not have anymore gems pinned to it
@@ -854,12 +856,6 @@
       current == proposed
     end
 
-    def extract_gem_info(error)
-      # This method will extract the error message like "Could not find 
foo-1.2.3 in any of the sources"
-      # to an array. The first element will be the gem name (e.g. foo), the 
second will be the version number.
-      error.message.scan(/Could not find (\w+)-(\d+(?:\.\d+)+)/).flatten
-    end
-
     def compute_requires
       dependencies.reduce({}) do |requires, dep|
         next requires unless dep.should_include?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/dsl.rb new/lib/bundler/dsl.rb
--- old/lib/bundler/dsl.rb      2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/dsl.rb      2021-09-03 10:27:42.000000000 +0200
@@ -447,8 +447,21 @@
     end
 
     def check_rubygems_source_safety
-      return unless @sources.aggregate_global_source?
+      if @sources.implicit_global_source?
+        implicit_global_source_warning
+      elsif @sources.aggregate_global_source?
+        multiple_global_source_warning
+      end
+    end
+
+    def implicit_global_source_warning
+      Bundler::SharedHelpers.major_deprecation 2, "This Gemfile does not 
include an explicit global source. " \
+        "Not using an explicit global source may result in a different 
lockfile being generated depending on " \
+        "the gems you have installed locally before bundler is run. " \
+        "Instead, define a global source in your Gemfile like this: source 
\"https://rubygems.org\".";
+    end
 
+    def multiple_global_source_warning
       if Bundler.feature_flag.bundler_3_mode?
         msg = "This Gemfile contains multiple primary sources. " \
           "Each source after the first must include a block to indicate which 
gems " \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/errors.rb new/lib/bundler/errors.rb
--- old/lib/bundler/errors.rb   2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/errors.rb   2021-09-03 10:27:42.000000000 +0200
@@ -122,7 +122,7 @@
 
   class VirtualProtocolError < BundlerError
     def message
-      "There was an error relating to virtualization and file access." \
+      "There was an error relating to virtualization and file access. " \
       "It is likely that you need to grant access to or mount some file system 
correctly."
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/installer/gem_installer.rb 
new/lib/bundler/installer/gem_installer.rb
--- old/lib/bundler/installer/gem_installer.rb  2021-07-15 17:00:51.000000000 
+0200
+++ new/lib/bundler/installer/gem_installer.rb  2021-09-03 10:27:42.000000000 
+0200
@@ -1,7 +1,5 @@
 # frozen_string_literal: true
 
-require "shellwords"
-
 module Bundler
   class GemInstaller
     attr_reader :spec, :standalone, :worker, :force, :installer
@@ -31,34 +29,23 @@
 
     def specific_failure_message(e)
       message = "#{e.class}: #{e.message}\n"
-      message += "  " + e.backtrace.join("\n  ") + "\n\n" if Bundler.ui.debug?
+      message += "  " + e.backtrace.join("\n  ") + "\n\n"
       message = message.lines.first + 
Bundler.ui.add_color(message.lines.drop(1).join, :clear)
       message + Bundler.ui.add_color(failure_message, :red)
     end
 
     def failure_message
-      return install_error_message if spec.source.options["git"]
-      "#{install_error_message}\n#{gem_install_message}"
+      install_error_message
     end
 
     def install_error_message
       "An error occurred while installing #{spec.name} (#{spec.version}), and 
Bundler cannot continue."
     end
 
-    def gem_install_message
-      source = spec.source
-      return unless source.respond_to?(:remotes)
-
-      if source.remotes.size == 1
-        "Make sure that `gem install #{spec.name} -v '#{spec.version}' 
--source '#{source.remotes.first}'` succeeds before bundling."
-      else
-        "Make sure that `gem install #{spec.name} -v '#{spec.version}'` 
succeeds before bundling."
-      end
-    end
-
     def spec_settings
       # Fetch the build settings, if there are any
       if settings = Bundler.settings["build.#{spec.name}"]
+        require "shellwords"
         Shellwords.shellsplit(settings)
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/installer/standalone.rb 
new/lib/bundler/installer/standalone.rb
--- old/lib/bundler/installer/standalone.rb     2021-07-15 17:00:51.000000000 
+0200
+++ new/lib/bundler/installer/standalone.rb     2021-09-03 10:27:42.000000000 
+0200
@@ -12,12 +12,13 @@
       end
       File.open File.join(bundler_path, "setup.rb"), "w" do |file|
         file.puts "require 'rbconfig'"
-        file.puts "ruby_engine = RUBY_ENGINE"
-        file.puts "ruby_version = RbConfig::CONFIG[\"ruby_version\"]"
-        file.puts "path = File.expand_path('..', __FILE__)"
         file.puts reverse_rubygems_kernel_mixin
         paths.each do |path|
-          file.puts %($:.unshift File.expand_path("\#{path}/#{path}"))
+          if Pathname.new(path).absolute?
+            file.puts %($:.unshift "#{path}")
+          else
+            file.puts %($:.unshift File.expand_path("\#{__dir__}/#{path}"))
+          end
         end
       end
     end
@@ -28,14 +29,14 @@
       @specs.map do |spec|
         next if spec.name == "bundler"
         Array(spec.require_paths).map do |path|
-          gem_path(path, spec).sub(version_dir, 
'#{ruby_engine}/#{ruby_version}')
+          gem_path(path, spec).sub(version_dir, 
'#{RUBY_ENGINE}/#{RbConfig::CONFIG["ruby_version"]}')
           # This is a static string intentionally. It's interpolated at a 
later time.
         end
-      end.flatten
+      end.flatten.compact
     end
 
     def version_dir
-      
"#{Bundler::RubyVersion.system.engine}/#{RbConfig::CONFIG["ruby_version"]}"
+      "#{RUBY_ENGINE}/#{RbConfig::CONFIG["ruby_version"]}"
     end
 
     def bundler_path
@@ -44,7 +45,11 @@
 
     def gem_path(path, spec)
       full_path = Pathname.new(path).absolute? ? path : 
File.join(spec.full_gem_path, path)
-      
Pathname.new(full_path).relative_path_from(Bundler.root.join(bundler_path)).to_s
+      if spec.source.instance_of?(Source::Path)
+        full_path
+      else
+        
Pathname.new(full_path).relative_path_from(Bundler.root.join(bundler_path)).to_s
+      end
     rescue TypeError
       error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
       raise Gem::InvalidSpecificationException.new(error_message)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/installer.rb new/lib/bundler/installer.rb
--- old/lib/bundler/installer.rb        2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/installer.rb        2021-09-03 10:27:42.000000000 +0200
@@ -1,6 +1,5 @@
 # frozen_string_literal: true
 
-require "rubygems/dependency_installer"
 require_relative "worker"
 require_relative "installer/parallel_installer"
 require_relative "installer/standalone"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/lockfile_parser.rb 
new/lib/bundler/lockfile_parser.rb
--- old/lib/bundler/lockfile_parser.rb  2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/lockfile_parser.rb  2021-09-03 10:27:42.000000000 +0200
@@ -195,6 +195,7 @@
         platform = platform ? Gem::Platform.new(platform) : Gem::Platform::RUBY
         @current_spec = LazySpecification.new(name, version, platform)
         @current_spec.source = @current_source
+        @current_source.add_dependency_names(name)
 
         @specs[@current_spec.identifier] = @current_spec
       elsif spaces.size == 6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/plugin/installer.rb 
new/lib/bundler/plugin/installer.rb
--- old/lib/bundler/plugin/installer.rb 2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/plugin/installer.rb 2021-09-03 10:27:42.000000000 +0200
@@ -81,6 +81,8 @@
 
         deps = names.map {|name| Dependency.new name, version }
 
+        Bundler.configure_gem_home_and_path(Plugin.root)
+
         definition = Definition.new(nil, deps, source_list, true)
         install_definition(definition)
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/plugin.rb new/lib/bundler/plugin.rb
--- old/lib/bundler/plugin.rb   2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/plugin.rb   2021-09-03 10:27:42.000000000 +0200
@@ -13,6 +13,7 @@
     class MalformattedPlugin < PluginError; end
     class UndefinedCommandError < PluginError; end
     class UnknownSourceError < PluginError; end
+    class PluginInstallError < PluginError; end
 
     PLUGIN_FILE_NAME = "plugins.rb".freeze
 
@@ -38,12 +39,11 @@
       specs = Installer.new.install(names, options)
 
       save_plugins names, specs
-    rescue PluginError => e
+    rescue PluginError
       specs_to_delete = specs.select {|k, _v| names.include?(k) && 
!index.commands.values.include?(k) }
       specs_to_delete.each_value {|spec| Bundler.rm_rf(spec.full_gem_path) }
 
-      names_list = names.map {|name| "`#{name}`" }.join(", ")
-      Bundler.ui.error "Failed to install the following plugins: 
#{names_list}. The underlying error was: #{e.message}.\n #{e.backtrace.join("\n 
")}"
+      raise
     end
 
     # Uninstalls plugins by the given names
@@ -245,10 +245,11 @@
     # @param [Array<String>] names of inferred source plugins that can be 
ignored
     def save_plugins(plugins, specs, optional_plugins = [])
       plugins.each do |name|
+        next if index.installed?(name)
+
         spec = specs[name]
-        validate_plugin! Pathname.new(spec.full_gem_path)
-        installed = register_plugin(name, spec, 
optional_plugins.include?(name))
-        Bundler.ui.info "Installed plugin #{name}" if installed
+
+        save_plugin(name, spec, optional_plugins.include?(name))
       end
     end
 
@@ -263,6 +264,22 @@
       raise MalformattedPlugin, "#{PLUGIN_FILE_NAME} was not found in the 
plugin." unless plugin_file.file?
     end
 
+    # Validates and registers a plugin.
+    #
+    # @param [String] name the name of the plugin
+    # @param [Specification] spec of installed plugin
+    # @param [Boolean] optional_plugin, removed if there is conflict with any
+    #                     other plugin (used for default source plugins)
+    #
+    # @raise [PluginInstallError] if validation or registration raises any 
error
+    def save_plugin(name, spec, optional_plugin = false)
+      validate_plugin! Pathname.new(spec.full_gem_path)
+      installed = register_plugin(name, spec, optional_plugin)
+      Bundler.ui.info "Installed plugin #{name}" if installed
+    rescue PluginError => e
+      raise PluginInstallError, "Failed to install plugin `#{spec.name}`, due 
to #{e.class} (#{e.message})"
+    end
+
     # Runs the plugins.rb file in an isolated namespace, records the plugin
     # actions it registers for and then passes the data to index to be stored.
     #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/resolver.rb new/lib/bundler/resolver.rb
--- old/lib/bundler/resolver.rb 2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/resolver.rb 2021-09-03 10:27:42.000000000 +0200
@@ -255,12 +255,6 @@
         next if name == "bundler"
         next unless search_for(requirement).empty?
 
-        cache_message = begin
-                            " or in gems cached in 
#{Bundler.settings.app_cache_path}" if Bundler.app_cache.exist?
-                          rescue GemfileNotFound
-                            nil
-                          end
-
         if (base = @base[name]) && !base.empty?
           version = base.first.version
           message = "You have requested:\n" \
@@ -269,18 +263,17 @@
             "Try running `bundle update #{name}`\n\n" \
             "If you are updating multiple gems in your Gemfile at once,\n" \
             "try passing them all to `bundle update`"
-        elsif source = @source_requirements[name]
+        else
+          source = source_for(name)
           specs = source.specs.search(name)
           versions_with_platforms = specs.map {|s| [s.version, s.platform] }
-          message = String.new("Could not find gem 
'#{SharedHelpers.pretty_dependency(requirement)}' in 
#{source}#{cache_message}.\n")
-          message << if versions_with_platforms.any?
-            "The source contains the following versions of '#{name}': 
#{formatted_versions_with_platforms(versions_with_platforms)}"
-          else
-            "The source does not contain any versions of '#{name}'"
-          end
-        else
-          message = "Could not find gem 
'#{SharedHelpers.pretty_dependency(requirement)}' in any of the gem sources " \
-            "listed in your Gemfile#{cache_message}."
+          cache_message = begin
+                              " or in gems cached in 
#{Bundler.settings.app_cache_path}" if Bundler.app_cache.exist?
+                            rescue GemfileNotFound
+                              nil
+                            end
+          message = String.new("Could not find gem 
'#{SharedHelpers.pretty_dependency(requirement)}' in 
#{source.to_err}#{cache_message}.\n")
+          message << "The source contains the following versions of '#{name}': 
#{formatted_versions_with_platforms(versions_with_platforms)}" if 
versions_with_platforms.any?
         end
         raise GemNotFound, message
       end
@@ -378,7 +371,7 @@
             o << if metadata_requirement
               "is not available in #{relevant_source}"
             else
-              "in #{relevant_source}.\n"
+              "in #{relevant_source.to_err}.\n"
             end
           end
         end,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/rubygems_gem_installer.rb 
new/lib/bundler/rubygems_gem_installer.rb
--- old/lib/bundler/rubygems_gem_installer.rb   2021-07-15 17:00:51.000000000 
+0200
+++ new/lib/bundler/rubygems_gem_installer.rb   2021-09-03 10:27:42.000000000 
+0200
@@ -61,7 +61,10 @@
 
     def build_extensions
       extension_cache_path = options[:bundler_extension_cache_path]
-      return super unless extension_cache_path && extension_dir = 
spec.extension_dir
+      unless extension_cache_path && extension_dir = spec.extension_dir
+        require "shellwords" # compensate missing require in rubygems before 
version 3.2.25
+        return super
+      end
 
       extension_dir = Pathname.new(extension_dir)
       build_complete = 
SharedHelpers.filesystem_access(extension_cache_path.join("gem.build_complete"),
 :read, &:file?)
@@ -71,6 +74,7 @@
           FileUtils.cp_r extension_cache_path, spec.extension_dir
         end
       else
+        require "shellwords" # compensate missing require in rubygems before 
version 3.2.25
         super
         if extension_dir.directory? # not made for gems without extensions
           SharedHelpers.filesystem_access(extension_cache_path.parent, 
&:mkpath)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/rubygems_integration.rb 
new/lib/bundler/rubygems_integration.rb
--- old/lib/bundler/rubygems_integration.rb     2021-07-15 17:00:51.000000000 
+0200
+++ new/lib/bundler/rubygems_integration.rb     2021-09-03 10:27:42.000000000 
+0200
@@ -34,10 +34,12 @@
     end
 
     def build_args
+      require "rubygems/command"
       Gem::Command.build_args
     end
 
     def build_args=(args)
+      require "rubygems/command"
       Gem::Command.build_args = args
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/runtime.rb new/lib/bundler/runtime.rb
--- old/lib/bundler/runtime.rb  2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/runtime.rb  2021-09-03 10:27:42.000000000 +0200
@@ -22,10 +22,6 @@
 
       # Activate the specs
       load_paths = specs.map do |spec|
-        unless spec.loaded_from
-          raise GemNotFound, "#{spec.full_name} is missing. Run `bundle 
install` to get it."
-        end
-
         check_for_activated_spec!(spec)
 
         Bundler.rubygems.mark_loaded(spec)
@@ -104,7 +100,7 @@
 
     alias_method :gems, :specs
 
-    def cache(custom_path = nil)
+    def cache(custom_path = nil, local = false)
       cache_path = Bundler.app_cache(custom_path)
       SharedHelpers.filesystem_access(cache_path) do |p|
         FileUtils.mkdir_p(p)
@@ -112,7 +108,20 @@
 
       Bundler.ui.info "Updating files in #{Bundler.settings.app_cache_path}"
 
-      specs_to_cache = Bundler.settings[:cache_all_platforms] ? 
@definition.resolve.materialized_for_all_platforms : specs
+      specs_to_cache = if Bundler.settings[:cache_all_platforms]
+        @definition.resolve.materialized_for_all_platforms
+      else
+        begin
+          specs
+        rescue GemNotFound
+          if local
+            Bundler.ui.warn "Some gems seem to be missing from your 
#{Bundler.settings.app_cache_path} directory."
+          end
+
+          raise
+        end
+      end
+
       specs_to_cache.each do |spec|
         next if spec.name == "bundler"
         next if spec.source.is_a?(Source::Gemspec)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/settings.rb new/lib/bundler/settings.rb
--- old/lib/bundler/settings.rb 2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/settings.rb 2021-09-03 10:27:42.000000000 +0200
@@ -419,7 +419,15 @@
       elsif is_credential(key)
         "[REDACTED]"
       elsif is_userinfo(converted)
-        converted.gsub(/:.*$/, ":[REDACTED]")
+        username, pass = converted.split(":", 2)
+
+        if pass == "x-oauth-basic"
+          username = "[REDACTED]"
+        else
+          pass = "[REDACTED]"
+        end
+
+        [username, pass].join(":")
       else
         converted
       end
@@ -428,6 +436,10 @@
     def global_config_file
       if ENV["BUNDLE_CONFIG"] && !ENV["BUNDLE_CONFIG"].empty?
         Pathname.new(ENV["BUNDLE_CONFIG"])
+      elsif ENV["BUNDLE_USER_CONFIG"] && !ENV["BUNDLE_USER_CONFIG"].empty?
+        Pathname.new(ENV["BUNDLE_USER_CONFIG"])
+      elsif ENV["BUNDLE_USER_HOME"] && !ENV["BUNDLE_USER_HOME"].empty?
+        Pathname.new(ENV["BUNDLE_USER_HOME"]).join("config")
       elsif Bundler.rubygems.user_home && !Bundler.rubygems.user_home.empty?
         Pathname.new(Bundler.rubygems.user_home).join(".bundle/config")
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/setup.rb new/lib/bundler/setup.rb
--- old/lib/bundler/setup.rb    2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/setup.rb    2021-09-03 10:27:42.000000000 +0200
@@ -9,10 +9,10 @@
     begin
       Bundler.ui.silence { Bundler.setup }
     rescue Bundler::BundlerError => e
-      Bundler.ui.warn "\e[31m#{e.message}\e[0m"
+      Bundler.ui.error e.message
       Bundler.ui.warn e.backtrace.join("\n") if ENV["DEBUG"]
       if e.is_a?(Bundler::GemNotFound)
-        Bundler.ui.warn "\e[33mRun `bundle install` to install missing 
gems.\e[0m"
+        Bundler.ui.warn "Run `bundle install` to install missing gems."
       end
       exit e.status_code
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/shared_helpers.rb 
new/lib/bundler/shared_helpers.rb
--- old/lib/bundler/shared_helpers.rb   2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/shared_helpers.rb   2021-09-03 10:27:42.000000000 +0200
@@ -152,13 +152,6 @@
       Bundler.ui.warn message
     end
 
-    def trap(signal, override = false, &block)
-      prior = Signal.trap(signal) do
-        block.call
-        prior.call unless override
-      end
-    end
-
     def ensure_same_dependencies(spec, old_deps, new_deps)
       new_deps = new_deps.reject {|d| d.type == :development }
       old_deps = old_deps.reject {|d| d.type == :development }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/source/git/git_proxy.rb 
new/lib/bundler/source/git/git_proxy.rb
--- old/lib/bundler/source/git/git_proxy.rb     2021-07-15 17:00:51.000000000 
+0200
+++ new/lib/bundler/source/git/git_proxy.rb     2021-09-03 10:27:42.000000000 
+0200
@@ -1,7 +1,5 @@
 # frozen_string_literal: true
 
-require "shellwords"
-
 module Bundler
   class Source
     class Git
@@ -224,6 +222,7 @@
         end
 
         def check_allowed(command)
+          require "shellwords"
           command_with_no_credentials = 
URICredentialsFilter.credential_filtered_string("git #{command.shelljoin}", uri)
           raise GitNotAllowedError.new(command_with_no_credentials) unless 
allow?
           command_with_no_credentials
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/source/rubygems.rb 
new/lib/bundler/source/rubygems.rb
--- old/lib/bundler/source/rubygems.rb  2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/source/rubygems.rb  2021-09-03 10:27:42.000000000 +0200
@@ -29,6 +29,7 @@
       def local_only!
         @specs = nil
         @allow_local = true
+        @allow_cached = false
         @allow_remote = false
       end
 
@@ -50,6 +51,7 @@
         return if @allow_cached
 
         @specs = nil
+        @allow_local = true
         @allow_cached = true
       end
 
@@ -71,6 +73,10 @@
         @remotes.size > 1
       end
 
+      def no_remotes?
+        @remotes.size == 0
+      end
+
       def can_lock?(spec)
         return super unless multiple_remotes?
         include?(spec.source)
@@ -92,11 +98,22 @@
         out << "  specs:\n"
       end
 
+      def to_err
+        if remotes.empty?
+          "locally installed gems"
+        elsif @allow_remote
+          "rubygems repository #{remote_names} or installed locally"
+        elsif @allow_cached
+          "cached gems from rubygems repository #{remote_names} or installed 
locally"
+        else
+          "locally installed gems"
+        end
+      end
+
       def to_s
         if remotes.empty?
           "locally installed gems"
         else
-          remote_names = remotes.map(&:to_s).join(", ")
           "rubygems repository #{remote_names} or installed locally"
         end
       end
@@ -127,7 +144,7 @@
           end
         end
 
-        if (installed?(spec) || Plugin.installed?(spec.name)) && !force
+        if installed?(spec) && !force
           print_using_message "Using #{version_message(spec)}"
           return nil # no post-install message
         end
@@ -315,6 +332,10 @@
 
       protected
 
+      def remote_names
+        remotes.map(&:to_s).join(", ")
+      end
+
       def credless_remotes
         remotes.map(&method(:suppress_configured_credentials))
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/source/rubygems_aggregate.rb 
new/lib/bundler/source/rubygems_aggregate.rb
--- old/lib/bundler/source/rubygems_aggregate.rb        2021-07-15 
17:00:51.000000000 +0200
+++ new/lib/bundler/source/rubygems_aggregate.rb        2021-09-03 
10:27:42.000000000 +0200
@@ -16,6 +16,10 @@
         @index
       end
 
+      def to_err
+        to_s
+      end
+
       def to_s
         "any of the sources"
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/source.rb new/lib/bundler/source.rb
--- old/lib/bundler/source.rb   2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/source.rb   2021-09-03 10:27:42.000000000 +0200
@@ -67,6 +67,10 @@
       "#<#{self.class}:0x#{object_id} #{self}>"
     end
 
+    def to_err
+      to_s
+    end
+
     def path?
       instance_of?(Bundler::Source::Path)
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/source_list.rb 
new/lib/bundler/source_list.rb
--- old/lib/bundler/source_list.rb      2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/source_list.rb      2021-09-03 10:27:42.000000000 +0200
@@ -37,6 +37,10 @@
       global_rubygems_source.multiple_remotes?
     end
 
+    def implicit_global_source?
+      global_rubygems_source.no_remotes?
+    end
+
     def add_path_source(options = {})
       if options["gemspec"]
         add_source_to_list Source::Gemspec.new(options), path_sources
@@ -117,7 +121,8 @@
     def replace_sources!(replacement_sources)
       return false if replacement_sources.empty?
 
-      @path_sources, @git_sources, @plugin_sources = 
map_sources(replacement_sources)
+      @rubygems_sources, @path_sources, @git_sources, @plugin_sources = 
map_sources(replacement_sources)
+      @global_rubygems_source = global_replacement_source(replacement_sources)
 
       different_sources?(lock_sources, replacement_sources)
     end
@@ -152,13 +157,21 @@
     end
 
     def map_sources(replacement_sources)
-      [path_sources, git_sources, plugin_sources].map do |sources|
+      [@rubygems_sources, @path_sources, @git_sources, @plugin_sources].map do 
|sources|
         sources.map do |source|
           replacement_sources.find {|s| s == source } || source
         end
       end
     end
 
+    def global_replacement_source(replacement_sources)
+      replacement_source = replacement_sources.find {|s| s == 
global_rubygems_source }
+      return global_rubygems_source unless replacement_source
+
+      replacement_source.local!
+      replacement_source
+    end
+
     def different_sources?(lock_sources, replacement_sources)
       !equal_sources?(lock_sources, replacement_sources) && 
!equivalent_sources?(lock_sources, replacement_sources)
     end
@@ -202,7 +215,7 @@
     end
 
     def equal_source?(source, other_source)
-      return source.include?(other_source) if source.is_a?(Source::Rubygems) 
&& other_source.is_a?(Source::Rubygems) && !merged_gem_lockfile_sections?
+      return source.include?(other_source) if source.is_a?(Source::Rubygems) 
&& other_source.is_a?(Source::Rubygems)
 
       source == other_source
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/spec_set.rb new/lib/bundler/spec_set.rb
--- old/lib/bundler/spec_set.rb 2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/spec_set.rb 2021-09-03 10:27:42.000000000 +0200
@@ -11,7 +11,7 @@
       @specs = specs
     end
 
-    def for(dependencies, check = false, match_current_platform = false, 
raise_on_missing = true)
+    def for(dependencies, check = false, match_current_platform = false)
       handled = []
       deps = dependencies.dup
       specs = []
@@ -24,7 +24,7 @@
 
         specs_for_dep = spec_for_dependency(dep, match_current_platform)
         if specs_for_dep.any?
-          specs += specs_for_dep
+          match_current_platform ? specs += specs_for_dep : specs |= 
specs_for_dep
 
           specs_for_dep.first.dependencies.each do |d|
             next if d.type == :development
@@ -33,11 +33,6 @@
           end
         elsif check
           return false
-        elsif raise_on_missing
-          others = lookup[dep.name] if match_current_platform
-          message = "Unable to find a spec satisfying #{dep} in the set. 
Perhaps the lockfile is corrupted?"
-          message += " Found #{others.join(", ")} that did not match the 
current platform." if others && !others.empty?
-          raise GemNotFound, message
         end
       end
 
@@ -71,52 +66,35 @@
       lookup.dup
     end
 
-    def materialize(deps, missing_specs = nil)
-      materialized = self.for(deps, false, true, !missing_specs)
-
-      materialized.group_by(&:source).each do |source, specs|
-        next unless specs.any?{|s| s.is_a?(LazySpecification) }
-
-        source.local!
-        names = -> { specs.map(&:name).uniq }
-        source.double_check_for(names)
-      end
+    def materialize(deps)
+      materialized = self.for(deps, false, true)
 
       materialized.map! do |s|
         next s unless s.is_a?(LazySpecification)
-        spec = s.__materialize__
-        unless spec
-          unless missing_specs
-            raise GemNotFound, "Could not find #{s.full_name} in any of the 
sources"
-          end
-          missing_specs << s
-        end
-        spec
+        s.source.local!
+        s.__materialize__ || s
       end
-      SpecSet.new(missing_specs ? materialized.compact : materialized)
+      SpecSet.new(materialized)
     end
 
     # Materialize for all the specs in the spec set, regardless of what 
platform they're for
     # This is in contrast to how for does platform filtering (and specifically 
different from how `materialize` calls `for` only for the current platform)
     # @return [Array<Gem::Specification>]
     def materialized_for_all_platforms
-      @specs.group_by(&:source).each do |source, specs|
-        next unless specs.any?{|s| s.is_a?(LazySpecification) }
-
-        source.local!
-        source.remote!
-        names = -> { specs.map(&:name).uniq }
-        source.double_check_for(names)
-      end
-
       @specs.map do |s|
         next s unless s.is_a?(LazySpecification)
+        s.source.local!
+        s.source.remote!
         spec = s.__materialize__
         raise GemNotFound, "Could not find #{s.full_name} in any of the 
sources" unless spec
         spec
       end
     end
 
+    def missing_specs
+      @specs.select {|s| s.is_a?(LazySpecification) }
+    end
+
     def merge(set)
       arr = sorted.dup
       set.each do |set_spec|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/templates/Executable.bundler 
new/lib/bundler/templates/Executable.bundler
--- old/lib/bundler/templates/Executable.bundler        2021-07-15 
17:00:51.000000000 +0200
+++ new/lib/bundler/templates/Executable.bundler        2021-09-03 
10:27:42.000000000 +0200
@@ -60,16 +60,16 @@
     Regexp.last_match(1)
   end
 
-  def bundler_version
-    @bundler_version ||=
+  def bundler_requirement
+    @bundler_requirement ||=
       env_var_version || cli_arg_version ||
-        lockfile_version
+        bundler_requirement_for(lockfile_version)
   end
 
-  def bundler_requirement
-    return "#{Gem::Requirement.default}.a" unless bundler_version
+  def bundler_requirement_for(version)
+    return "#{Gem::Requirement.default}.a" unless version
 
-    bundler_gem_version = Gem::Version.new(bundler_version)
+    bundler_gem_version = Gem::Version.new(version)
 
     requirement = bundler_gem_version.approximate_recommendation
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/bundler/templates/newgem/github/workflows/main.yml.tt 
new/lib/bundler/templates/newgem/github/workflows/main.yml.tt
--- old/lib/bundler/templates/newgem/github/workflows/main.yml.tt       
2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/templates/newgem/github/workflows/main.yml.tt       
2021-09-03 10:27:42.000000000 +0200
@@ -1,16 +1,27 @@
 name: Ruby
 
-on: [push,pull_request]
+on:
+  push:
+    branches:
+      - <%= config[:git_default_branch] %>
+
+  pull_request:
 
 jobs:
   build:
     runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        ruby:
+          - <%= RUBY_VERSION %>
+
     steps:
     - uses: actions/checkout@v2
     - name: Set up Ruby
       uses: ruby/setup-ruby@v1
       with:
-        ruby-version: <%= RUBY_VERSION %>
+        ruby-version: ${{ matrix.ruby }}
         bundler-cache: true
     - name: Run the default task
       run: bundle exec rake
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/templates/newgem/newgem.gemspec.tt 
new/lib/bundler/templates/newgem/newgem.gemspec.tt
--- old/lib/bundler/templates/newgem/newgem.gemspec.tt  2021-07-15 
17:00:51.000000000 +0200
+++ new/lib/bundler/templates/newgem/newgem.gemspec.tt  2021-09-03 
10:27:42.000000000 +0200
@@ -25,7 +25,9 @@
   # Specify which files should be added to the gem when it is released.
   # The `git ls-files -z` loads the files in the RubyGem that have been added 
into git.
   spec.files = Dir.chdir(File.expand_path(__dir__)) do
-    `git ls-files -z`.split("\x0").reject { |f| 
f.match(%r{\A(?:test|spec|features)/}) }
+    `git ls-files -z`.split("\x0").reject do |f|
+      (f == __FILE__) || 
f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
+    end
   end
   spec.bindir        = "exe"
   spec.executables   = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/version.rb new/lib/bundler/version.rb
--- old/lib/bundler/version.rb  2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/version.rb  2021-09-03 10:27:42.000000000 +0200
@@ -1,7 +1,7 @@
 # frozen_string_literal: false
 
 module Bundler
-  VERSION = "2.2.24".freeze
+  VERSION = "2.2.27".freeze
 
   def self.bundler_major_version
     @bundler_major_version ||= VERSION.split(".").first.to_i
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler/worker.rb new/lib/bundler/worker.rb
--- old/lib/bundler/worker.rb   2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler/worker.rb   2021-09-03 10:27:42.000000000 +0200
@@ -26,7 +26,7 @@
       @func = func
       @size = size
       @threads = nil
-      SharedHelpers.trap("INT") { abort_threads }
+      @previous_interrupt_handler = nil
     end
 
     # Enqueue a request to be executed in the worker pool
@@ -68,13 +68,16 @@
     # so as worker threads after retrieving it, shut themselves down
     def stop_threads
       return unless @threads
+
       @threads.each { @request_queue.enq POISON }
       @threads.each(&:join)
+
+      remove_interrupt_handler
+
       @threads = nil
     end
 
     def abort_threads
-      return unless @threads
       Bundler.ui.debug("\n#{caller.join("\n")}")
       @threads.each(&:exit)
       exit 1
@@ -94,11 +97,23 @@
         end
       end.compact
 
+      add_interrupt_handler unless @threads.empty?
+
       return if creation_errors.empty?
 
       message = "Failed to create threads for the #{name} worker: 
#{creation_errors.map(&:to_s).uniq.join(", ")}"
       raise ThreadCreationError, message if @threads.empty?
       Bundler.ui.info message
     end
+
+    def add_interrupt_handler
+      @previous_interrupt_handler = trap("INT") { abort_threads }
+    end
+
+    def remove_interrupt_handler
+      return unless @previous_interrupt_handler
+
+      trap "INT", @previous_interrupt_handler
+    end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bundler.rb new/lib/bundler.rb
--- old/lib/bundler.rb  2021-07-15 17:00:51.000000000 +0200
+++ new/lib/bundler.rb  2021-09-03 10:27:42.000000000 +0200
@@ -636,6 +636,12 @@
       @rubygems = nil
     end
 
+    def configure_gem_home_and_path(path = bundle_path)
+      configure_gem_path
+      configure_gem_home(path)
+      Bundler.rubygems.clear_paths
+    end
+
     private
 
     def eval_yaml_gemspec(path, contents)
@@ -653,36 +659,20 @@
     rescue ScriptError, StandardError => e
       msg = "There was an error while loading `#{path.basename}`: #{e.message}"
 
-      if e.is_a?(LoadError)
-        msg += "\nDoes it try to require a relative path? That's been removed 
in Ruby 1.9"
-      end
-
       raise GemspecError, Dsl::DSLError.new(msg, path, e.backtrace, contents)
     end
 
-    def configure_gem_home_and_path
-      configure_gem_path
-      configure_gem_home
-      bundle_path
-    end
-
-    def configure_gem_path(env = ENV)
-      blank_home = env["GEM_HOME"].nil? || env["GEM_HOME"].empty?
-      if !use_system_gems?
+    def configure_gem_path
+      unless use_system_gems?
         # this needs to be empty string to cause
         # PathSupport.split_gem_path to only load up the
         # Bundler --path setting as the GEM_PATH.
-        env["GEM_PATH"] = ""
-      elsif blank_home
-        possibles = [Bundler.rubygems.gem_dir, Bundler.rubygems.gem_path]
-        paths = possibles.flatten.compact.uniq.reject(&:empty?)
-        env["GEM_PATH"] = paths.join(File::PATH_SEPARATOR)
+        Bundler::SharedHelpers.set_env "GEM_PATH", ""
       end
     end
 
-    def configure_gem_home
-      Bundler::SharedHelpers.set_env "GEM_HOME", File.expand_path(bundle_path, 
root)
-      Bundler.rubygems.clear_paths
+    def configure_gem_home(path)
+      Bundler::SharedHelpers.set_env "GEM_HOME", path.to_s
     end
 
     def tmp_home_path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2021-07-15 17:00:51.000000000 +0200
+++ new/metadata        2021-09-03 10:27:42.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: bundler
 version: !ruby/object:Gem::Version
-  version: 2.2.24
+  version: 2.2.27
 platform: ruby
 authors:
 - Andr?? Arko
@@ -22,7 +22,7 @@
 autorequire: 
 bindir: exe
 cert_chain: []
-date: 2021-07-15 00:00:00.000000000 Z
+date: 2021-09-03 00:00:00.000000000 Z
 dependencies: []
 description: Bundler manages an application's dependencies through its entire 
life,
   across many machines, systematically and repeatably
@@ -354,7 +354,7 @@
     - !ruby/object:Gem::Version
       version: 2.5.2
 requirements: []
-rubygems_version: 3.2.24
+rubygems_version: 3.2.27
 signing_key: 
 specification_version: 4
 summary: The best way to manage your application's dependencies

++++++ gem2rpm.yml ++++++
--- /var/tmp/diff_new_pack.iWMK3L/_old  2021-09-29 20:20:47.683152066 +0200
+++ /var/tmp/diff_new_pack.iWMK3L/_new  2021-09-29 20:20:47.687152072 +0200
@@ -70,3 +70,8 @@
   #  gemspec_remove_pem.patch: -p1
 :sources:
   - series
+:preamble: |-
+    %if ! 0%{?suse_version} >= 1550
+    %define rb_build_versions     ruby26       ruby27
+    %define rb_build_ruby_abis    ruby:2.6.0   ruby:2.7.0
+    %endif

Reply via email to