diff options
Diffstat (limited to 'lib/bundler/plugin/index.rb')
-rw-r--r-- | lib/bundler/plugin/index.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bundler/plugin/index.rb b/lib/bundler/plugin/index.rb index 2d70a046bb..8aea92ca0c 100644 --- a/lib/bundler/plugin/index.rb +++ b/lib/bundler/plugin/index.rb @@ -71,6 +71,15 @@ module Bundler raise end + def unregister_plugin(name) + @commands.delete_if {|_, v| v == name } + @sources.delete_if {|_, v| v == name } + @hooks.each {|_, plugin_names| plugin_names.delete(name) } + @plugin_paths.delete(name) + @load_paths.delete(name) + save_index + end + # Path of default index file def index_file Plugin.root.join("index") |