module Gem::BundlerVersionFinder

Public Class Methods

bundler_version ()
# File lib/rubygems/bundler_version_finder.rb, line 4
def self.bundler_version
  v = ENV["BUNDLER_VERSION"]

  v ||= bundle_update_bundler_version
  return if v == true

  v ||= lockfile_version
  return unless v

  Gem::Version.new(v)
end
prioritize! (specs)
# File lib/rubygems/bundler_version_finder.rb, line 16
def self.prioritize!(specs)
  exact_match_index = specs.find_index {|spec| spec.version == bundler_version }
  return unless exact_match_index

  specs.unshift(specs.delete_at(exact_match_index))
end