Class: Strongspace::Command::Plugins
- Defined in:
- lib/strongspace/commands/plugins.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #install ⇒ Object
- #list ⇒ Object (also: #index)
- #uninstall ⇒ Object
Methods inherited from Base
Methods included from PluginInterface
#base_command, #command, included
Methods included from Helpers
#ask, #backup_space?, #bin_folder, #command_name, #computername, #confirm, #confirm_command, #create_pid_file, #credentials_file, #credentials_folder, #delete_pid_file, #display, #error, #format_date, #gui_ssh_key, home_directory, #home_directory, #kill_via_pidfile, #launchd_agents_folder, #logs_folder, #pid_file_path, #pid_from_pid_file, #pids_folder, #plugins_folder, #process_running?, #redisplay, running_on_a_mac?, #running_on_a_mac?, #running_on_windows?, running_on_windows?, #shell, #space_exist?, support_directory, #support_directory
Constructor Details
This class inherits a constructor from Strongspace::Command::Base
Instance Method Details
#install ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/strongspace/commands/plugins.rb', line 10 def install plugin = Strongspace::Plugin.new(args.shift) if plugin.install begin Strongspace::Plugin.load_plugin(plugin.name) rescue Exception => ex installation_failed(plugin, ex.) end display "#{plugin} installed" else error "Could not install #{plugin}. Please check the URL and try again" end end |
#list ⇒ Object Also known as: index
3 4 5 6 7 |
# File 'lib/strongspace/commands/plugins.rb', line 3 def list ::Strongspace::Plugin.list.each do |plugin| display plugin end end |
#uninstall ⇒ Object
24 25 26 27 28 |
# File 'lib/strongspace/commands/plugins.rb', line 24 def uninstall plugin = Strongspace::Plugin.new(args.shift) plugin.uninstall display "#{plugin} uninstalled" end |