mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
2aed061384
commit
3a9dd795a7
Notes:
git
2021-08-31 19:07:03 +09:00
1 changed files with 16 additions and 3 deletions
|
@ -246,9 +246,8 @@ module Bundler
|
||||||
def save_plugins(plugins, specs, optional_plugins = [])
|
def save_plugins(plugins, specs, optional_plugins = [])
|
||||||
plugins.each do |name|
|
plugins.each do |name|
|
||||||
spec = specs[name]
|
spec = specs[name]
|
||||||
validate_plugin! Pathname.new(spec.full_gem_path)
|
|
||||||
installed = register_plugin(name, spec, optional_plugins.include?(name))
|
save_plugin(name, spec, optional_plugins.include?(name))
|
||||||
Bundler.ui.info "Installed plugin #{name}" if installed
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -263,6 +262,20 @@ module Bundler
|
||||||
raise MalformattedPlugin, "#{PLUGIN_FILE_NAME} was not found in the plugin." unless plugin_file.file?
|
raise MalformattedPlugin, "#{PLUGIN_FILE_NAME} was not found in the plugin." unless plugin_file.file?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Validates and registers a plugin.
|
||||||
|
#
|
||||||
|
# @param [String] name the name of the plugin
|
||||||
|
# @param [Specification] spec of installed plugin
|
||||||
|
# @param [Boolean] optional_plugin, removed if there is conflict with any
|
||||||
|
# other plugin (used for default source plugins)
|
||||||
|
#
|
||||||
|
# @raise [MalformattedPlugin] if validation or registration raises any error
|
||||||
|
def save_plugin(name, spec, optional_plugin = false)
|
||||||
|
validate_plugin! Pathname.new(spec.full_gem_path)
|
||||||
|
installed = register_plugin(name, spec, optional_plugin)
|
||||||
|
Bundler.ui.info "Installed plugin #{name}" if installed
|
||||||
|
end
|
||||||
|
|
||||||
# Runs the plugins.rb file in an isolated namespace, records the plugin
|
# Runs the plugins.rb file in an isolated namespace, records the plugin
|
||||||
# actions it registers for and then passes the data to index to be stored.
|
# actions it registers for and then passes the data to index to be stored.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue