Sha256: a02f94e108c613ec80bad6a443c0cdf9028409775d41571377176e373a837120

Contents?: true

Size: 683 Bytes

Versions: 41

Compression:

Stored size: 683 Bytes

Contents

module VagrantPlugins
  module CommandPlugin
    module Action
      # This middleware uninstalls a plugin by simply removing it from
      # the state file. Running a {PruneGems} after should properly remove
      # it from the gem index.
      class UninstallPlugin
        def initialize(app, env)
          @app = app
        end

        def call(env)
          # Remove it!
          env[:ui].info(I18n.t("vagrant.commands.plugin.uninstalling",
                               name: env[:plugin_name]))

          manager = Vagrant::Plugin::Manager.instance
          manager.uninstall_plugin(env[:plugin_name])

          @app.call(env)
        end
      end
    end
  end
end

Version data entries

41 entries across 34 versions & 7 rubygems

Version Path
vagrant-unbundled-2.1.2.0 plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-unbundled-2.1.1.0 plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-unbundled-2.0.4.0 plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-unbundled-2.0.3.0 plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-aws-detiber-0.7.2.pre.4 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-aws-detiber-0.7.2.pre.3 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-aws-detiber-0.7.2.pre.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-unbundled-2.0.2.0 plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-unbundled-2.0.1.0 plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-aws-mkubenka-0.7.2.pre.22 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-f3fdbf414272/plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-aws-mkubenka-0.7.2.pre.16 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-1ee58c40e3f5/plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-unbundled-2.0.0.1 plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-unbundled-1.9.8.1 plugins/commands/plugin/action/uninstall_plugin.rb
vagrant-unbundled-1.9.7.1 plugins/commands/plugin/action/uninstall_plugin.rb