From 036fa3e96a2467a9d592a3cac54d751ffb25a897 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 3 Feb 2013 17:33:51 -0800 Subject: [PATCH] Set more force flags when uninstalling gems to remove monkeypatch --- plugins/commands/plugin/action/prune_gems.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/plugins/commands/plugin/action/prune_gems.rb b/plugins/commands/plugin/action/prune_gems.rb index 9d3a76f00..4ec448ac1 100644 --- a/plugins/commands/plugin/action/prune_gems.rb +++ b/plugins/commands/plugin/action/prune_gems.rb @@ -128,20 +128,13 @@ module VagrantPlugins env[:gem_helper].with_environment do prune_specs.each do |prune_spec| uninstaller = Gem::Uninstaller.new(prune_spec.name, { + :all => true, :executables => true, :force => true, + :ignore => true, :version => prune_spec.version.version }) - # This is sad, but there is no way to force this to be true - # so I just monkey-patch here. Vagrant has a pretty strict - # version check on the RubyGems version so this should be okay. - # In the future, let's try to get a pull request into RubyGems - # to fix this. - def uninstaller.ask_if_ok(spec) - true - end - @logger.info("Uninstalling: #{prune_spec.name} (#{prune_spec.version})") uninstaller.uninstall end