vagrant/test
Mitchell Hashimoto de78a3637a Plugin activation
Vagrant is only guaranteeing that the plugin definition superclass (the
Vagrant.plugin("1") part) is backwards compatible. Anything else, such
as Vagrant::Command::Base and so on, will likely change in future
versions. Beacuse of this, plugins should only immediately expose their
definition.

In order to support loading the other classes, plugins should defer
loading to the "activation" phase of a plugin. This can be done using
the `activated` block:

    class MyPlugin < Vagrant.plugin("1")
      name "my plugin"

      activated do
        require "myplugin/my_command"
      end

      command("foo") { MyCommand }
    end

Plugin activation is done at two specific times:

  * Right when a Vagrant::Environment is created and the global plugins
    (such as from ~.vagrantrc) are loaded.
  * Right before loading configuration, but after the Vagrantfiles have
    been evaluated. This allows plugins to be defined within these files
    as well.
2012-05-21 22:23:50 -07:00
..
acceptance Convert example host only IPs to RFC1918 2012-02-08 14:50:33 -08:00
buildbot CI: Schedule each unit/acceptance pair by platform it is testing 2011-11-22 23:07:33 -08:00
config Add `rake acceptance:boxes` to download required boxes for tests 2011-11-13 13:37:30 -08:00
support Port collision with SSH test. 2011-12-24 22:25:02 -08:00
unit Plugin activation 2012-05-21 22:23:50 -07:00