Sha256: 17046942a883c1a0df2062f9d18bdca6c8be088275e08c91f04bca63f8b7aae8

Contents?: true

Size: 1.59 KB

Versions: 15

Compression:

Stored size: 1.59 KB

Contents

require "pathname"

require "vagrant/action/builder"

module VagrantPlugins
  module CommandPlugin
    module Action
      # This middleware sequence will install a plugin.
      def self.action_install
        Vagrant::Action::Builder.new.tap do |b|
          b.use InstallGem
        end
      end

      # This middleware sequence licenses paid addons.
      def self.action_license
        Vagrant::Action::Builder.new.tap do |b|
          b.use PluginExistsCheck
          b.use LicensePlugin
        end
      end

      # This middleware sequence will list all installed plugins.
      def self.action_list
        Vagrant::Action::Builder.new.tap do |b|
          b.use ListPlugins
        end
      end

      # This middleware sequence will uninstall a plugin.
      def self.action_uninstall
        Vagrant::Action::Builder.new.tap do |b|
          b.use PluginExistsCheck
          b.use UninstallPlugin
        end
      end

      # This middleware sequence will update a plugin.
      def self.action_update
        Vagrant::Action::Builder.new.tap do |b|
          b.use UpdateGems
        end
      end

      # The autoload farm
      action_root = Pathname.new(File.expand_path("../action", __FILE__))
      autoload :InstallGem, action_root.join("install_gem")
      autoload :LicensePlugin, action_root.join("license_plugin")
      autoload :ListPlugins, action_root.join("list_plugins")
      autoload :PluginExistsCheck, action_root.join("plugin_exists_check")
      autoload :UninstallPlugin, action_root.join("uninstall_plugin")
      autoload :UpdateGems, action_root.join("update_gems")
    end
  end
end

Version data entries

15 entries across 12 versions & 4 rubygems

Version Path
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/commands/plugin/action.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/commands/plugin/action.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/commands/plugin/action.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/commands/plugin/action.rb
vagrant-unbundled-1.8.5.2 plugins/commands/plugin/action.rb
vagrant-unbundled-1.8.5.1 plugins/commands/plugin/action.rb
vagrant-unbundled-1.8.4.2 plugins/commands/plugin/action.rb
vagrant-unbundled-1.8.4.1 plugins/commands/plugin/action.rb
vagrant-unbundled-1.8.1.2 plugins/commands/plugin/action.rb
vagrant-unbundled-1.8.1.1 plugins/commands/plugin/action.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-b421af58e8b3/plugins/commands/plugin/action.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-1cf2a8db4ccb/plugins/commands/plugin/action.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-309e896975d1/plugins/commands/plugin/action.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-272fb27e0536/plugins/commands/plugin/action.rb
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/bundler/gems/vagrant-1e28f1ac31e7/plugins/commands/plugin/action.rb