lib/vagrant-orchestrate/plugin.rb in vagrant-orchestrate-0.0.7 vs lib/vagrant-orchestrate/plugin.rb in vagrant-orchestrate-0.1.0

- old
+ new

@@ -1,5 +1,7 @@ +require "vagrant-orchestrate/action/filtermanaged" + begin require "vagrant" rescue LoadError raise "The Vagrant Orchestrate plugin must be run within Vagrant." end @@ -16,15 +18,36 @@ name "Orchestrate" description <<-DESC This plugin installs commands that make pushing changes to vagrant-managed-servers easy. DESC + config "orchestrate" do + require_relative "config" + Config + end + command(:orchestrate) do setup_i18n setup_logging require_relative "command/root" Command::Root + end + + action_hook(:orchestrate, :machine_action_up) do |hook| + hook.prepend Action::FilterManaged + end + + action_hook(:orchestrate, :machine_action_provision) do |hook| + hook.prepend Action::FilterManaged + end + + action_hook(:orchestrate, :machine_action_destroy) do |hook| + hook.prepend Action::FilterManaged + end + + action_hook(:orchestrate, :machine_action_reload) do |hook| + hook.prepend Action::FilterManaged end # This initializes the internationalization strings. def self.setup_i18n I18n.load_path << File.expand_path("locales/en.yml", Orchestrate.source_root)