From 4ecf6822659dd0d0936958f083a60b5994138eda Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Thu, 22 Mar 2018 15:40:17 -0700 Subject: [PATCH] Add basic trigger plugin scaffold --- lib/vagrant/plugin/v2.rb | 1 + lib/vagrant/plugin/v2/trigger.rb | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 lib/vagrant/plugin/v2/trigger.rb diff --git a/lib/vagrant/plugin/v2.rb b/lib/vagrant/plugin/v2.rb index 953f73ff6..5bf2cdd41 100644 --- a/lib/vagrant/plugin/v2.rb +++ b/lib/vagrant/plugin/v2.rb @@ -19,6 +19,7 @@ module Vagrant autoload :Push, "vagrant/plugin/v2/push" autoload :Provisioner, "vagrant/plugin/v2/provisioner" autoload :SyncedFolder, "vagrant/plugin/v2/synced_folder" + autoload :Trigger, "vagrant/plugin/v2/trigger" end end end diff --git a/lib/vagrant/plugin/v2/trigger.rb b/lib/vagrant/plugin/v2/trigger.rb new file mode 100644 index 000000000..175529e48 --- /dev/null +++ b/lib/vagrant/plugin/v2/trigger.rb @@ -0,0 +1,23 @@ +require 'log4r' + +module Vagrant + module Plugin + module V2 + # This is the base class for a trigger for the V2 API. A provisioner + # is primarily responsible for installing software on a Vagrant guest. + class Trigger + attr_reader :config + + # Trigger + # + # @param [Object] env Vagrant environment + # @param [Object] config Trigger configuration + def initialize(env, config) + @env = env + @config = config + @logger = Log4r::Logger.new("vagrant::trigger::#{self.class.to_s.downcase}") + end + end + end + end +end