method

converge_rubygems_sources

ruby latest stable - Class: Bundler::Definition

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

converge_rubygems_sources()
private

No documentation available.

# File lib/bundler/definition.rb, line 645
    def converge_rubygems_sources
      return false if Bundler.feature_flag.lockfile_uses_separate_rubygems_sources?

      changes = false

      # Get the RubyGems sources from the Gemfile.lock
      locked_gem_sources = @locked_sources.select {|s| s.is_a?(Source::Rubygems) }
      # Get the RubyGems remotes from the Gemfile
      actual_remotes = sources.rubygems_remotes

      # If there is a RubyGems source in both
      if !locked_gem_sources.empty? && !actual_remotes.empty?
        locked_gem_sources.each do |locked_gem|
          # Merge the remotes from the Gemfile into the Gemfile.lock
          changes |= locked_gem.replace_remotes(actual_remotes, Bundler.settings[:allow_deployment_source_credential_changes])
        end
      end

      changes
    end