class Kontena::PluginManager::Cleaner

Attributes

plugin_name[R]

Public Class Methods

new(plugin_name) click to toggle source
# File lib/kontena/plugin_manager/cleaner.rb, line 11
def initialize(plugin_name)
  @plugin_name = plugin_name
end

Public Instance Methods

cleanup() click to toggle source

Runs gem cleanup, removes remains from previous versions @param plugin_name [String]

# File lib/kontena/plugin_manager/cleaner.rb, line 21
def cleanup
  options = []
  options += ['-q', '--no-verbose'] unless Kontena.debug?
  command.handle_options options
  command.execute
  true
rescue Gem::SystemExitException => e
  raise unless e.exit_code.zero?
  true
end
command() click to toggle source
# File lib/kontena/plugin_manager/cleaner.rb, line 15
def command
  @command ||= Gem::Commands::CleanupCommand.new
end