In Files

  • bundler/self_manager.rb

Class/Module Index [+]

Quicksearch

Bundler::SelfManager

This class handles installing and switching to the version of bundler needed by an application.

Public Instance Methods

install_locked_bundler_and_restart_with_it_if_needed() click to toggle source
 
               # File bundler/self_manager.rb, line 14
def install_locked_bundler_and_restart_with_it_if_needed
  return unless needs_switching?

  Bundler.ui.info          "Bundler #{current_version} is running, but your lockfile was generated with #{lockfile_version}. "          "Installing Bundler #{lockfile_version} and restarting using that version."

  install_and_restart_with(lockfile_version)
end
            
restart_with_locked_bundler_if_needed() click to toggle source
 
               # File bundler/self_manager.rb, line 8
def restart_with_locked_bundler_if_needed
  return unless needs_switching? && installed?

  restart_with(lockfile_version)
end
            
update_bundler_and_restart_with_it_if_needed(target) click to toggle source
 
               # File bundler/self_manager.rb, line 24
def update_bundler_and_restart_with_it_if_needed(target)
  return unless autoswitching_applies?

  spec = resolve_update_version_from(target)
  return unless spec

  version = spec.version

  Bundler.ui.info "Updating bundler to #{version}."

  install(spec)

  restart_with(version)
end
            
There is an updated format of the API docs for this version here.