Sha256: e598b3fd5e9cc9a494aab4779db84e7e43b987f22a57f0d274420438b8a7c239

Contents?: true

Size: 552 Bytes

Versions: 6

Compression:

Stored size: 552 Bytes

Contents

module Proviso::Command
  class Plugins < Base
    def list
      ::Proviso::Plugin.list.each do |plugin|
        display plugin
      end
    end
    alias :index :list

    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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
proviso-0.2.0 lib/proviso/commands/plugins.rb
proviso-0.2.0.beta4 lib/proviso/commands/plugins.rb
proviso-0.2.0.beta3 lib/proviso/commands/plugins.rb
proviso-0.2.0.beta2 lib/proviso/commands/plugins.rb
proviso-0.2.0.beta1 lib/proviso/commands/plugins.rb
proviso-0.1.0 lib/proviso/commands/plugins.rb