def update(*gems)
sources = Array(options[:source])
Bundler.ui.level = "warn" if options[:quiet]
if gems.empty? && sources.empty?
Bundler.definition(true)
else
names = Bundler.locked_gems.specs.map{ |s| s.name }
gems.each do |g|
next if names.include?(g)
raise GemNotFound, not_found_message(g, names)
end
Bundler.definition(:gems => gems, :sources => sources)
end
Bundler::Fetcher.disable_endpoint = options["full-index"]
opts = options.dup
opts["update"] = true
opts["local"] = options[:local]
Bundler.settings[:jobs] = opts["jobs"] if opts["jobs"]
Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins)
Bundler.definition.validate_ruby!
Installer.install Bundler.root, Bundler.definition, opts
Bundler.load.cache if Bundler.root.join("vendor/cache").exist?
clean if Bundler.settings[:clean] && Bundler.settings[:path]
Bundler.ui.confirm "Your bundle is updated!"
Bundler.ui.confirm without_groups_message if Bundler.settings.without.any?
end