Class: Proviso::Command::Plugins

Inherits:
Base
  • Object
show all
Defined in:
lib/proviso/commands/plugins.rb

Constant Summary

Constants included from Helpers

Helpers::CONFIG_FILE, Helpers::PROVISO_PATH

Instance Attribute Summary

Attributes inherited from Base

#args

Instance Method Summary collapse

Methods inherited from Base

#display, #error, #extract_option, #initialize

Methods included from PluginInterface

#applications, #base_command, #command, included, #selected_application

Methods included from Helpers

#home_directory, #running_on_a_mac?, #running_on_windows?, #yaml_file

Constructor Details

This class inherits a constructor from Proviso::Command::Base

Instance Method Details

#installObject



10
11
12
13
14
15
16
17
# File 'lib/proviso/commands/plugins.rb', line 10

def install
  plugin = Proviso::Plugin.new(@args.shift)
  if plugin.install
    display "#{plugin} installed"
  else
    error "Could not install #{plugin}. Please check the URL and try again"
  end
end

#listObject Also known as: index



3
4
5
6
7
# File 'lib/proviso/commands/plugins.rb', line 3

def list
  ::Proviso::Plugin.list.each do |plugin|
    display plugin
  end
end

#uninstallObject



19
20
21
22
23
# File 'lib/proviso/commands/plugins.rb', line 19

def uninstall
  plugin = Proviso::Plugin.new(@args.shift)
  plugin.uninstall
  display "#{plugin} uninstalled"
end