Sha256: 6feb2f785c525a9df4d76f4746f35b58e0bf4236c700cd9d3418a71fa0d18900

Contents?: true

Size: 1.5 KB

Versions: 13

Compression:

Stored size: 1.5 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 BundlerCheck
          b.use InstallGem
          b.use PruneGems
        end
      end

      # This middleware sequence licenses paid addons.
      def self.action_license
        Vagrant::Action::Builder.new.tap do |b|
          b.use BundlerCheck
          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 BundlerCheck
          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 BundlerCheck
          b.use UninstallPlugin
          b.use PruneGems
        end
      end

      # The autoload farm
      action_root = Pathname.new(File.expand_path("../action", __FILE__))
      autoload :BundlerCheck, action_root.join("bundler_check")
      autoload :InstallGem, action_root.join("install_gem")
      autoload :LicensePlugin, action_root.join("license_plugin")
      autoload :ListPlugins, action_root.join("list_plugins")
      autoload :PruneGems, action_root.join("prune_gems")
      autoload :UninstallPlugin, action_root.join("uninstall_plugin")
    end
  end
end

Version data entries

13 entries across 13 versions & 5 rubygems

Version Path
vagrant-shell-0.2.9 demo/templates/vendor/bundle/ruby/1.9.1/gems/tnargav-1.2.2/plugins/commands/plugin/action.rb
tnargav-1.2.3 plugins/commands/plugin/action.rb
vagrant-shell-0.2.8 demo/templates/vendor/bundle/ruby/1.9.1/gems/tnargav-1.2.2/plugins/commands/plugin/action.rb
vagrant-shell-0.2.6 vendor/bundle/gems/tnargav-1.2.2/plugins/commands/plugin/action.rb
vagrant-shell-0.2.5 vendor/bundle/gems/tnargav-1.2.2/plugins/commands/plugin/action.rb
tnargav-1.2.2 plugins/commands/plugin/action.rb
vagrantup-1.1.3 plugins/commands/plugin/action.rb
vagrantup-1.1.2 plugins/commands/plugin/action.rb
vagrantup-1.1.1 plugins/commands/plugin/action.rb
vagrantup-1.1.0 plugins/commands/plugin/action.rb
vagrantup-1.1.4 plugins/commands/plugin/action.rb
vagrant-actionio-0.0.9 vendor/bundle/bundler/gems/vagrant-c74251a1d9c0/plugins/commands/plugin/action.rb
vagrant-lxc-0.0.1 vendor/vagrant/plugins/commands/plugin/action.rb