class Bundler::Runtime
def remove_dir(dir, dry_run)
def remove_dir(dir, dry_run) full_name = Pathname.new(dir).basename.to_s parts = full_name.split("-") name = parts[0..-2].join("-") version = parts.last output = "#{name} (#{version})" if dry_run Bundler.ui.info "Would have removed #{output}" else Bundler.ui.info "Removing #{output}" FileUtils.rm_rf(dir) end output end