Sha256: e3a012acd5c493ac6691556fafe46e3b2f94207bd11b121a860c1bd7b0fa7caf
Contents?: true
Size: 1.33 KB
Versions: 10
Compression:
Stored size: 1.33 KB
Contents
require 'vagrant/action' require_relative '../helpers' module VagrantPlugins module Berkshelf module Action class Base # Cleanup any shared folders before destroying the VM. def self.clean Vagrant::Action::Builder.new.tap do |b| b.use setup b.use Action::Clean end end # Provision the VM, calling setup, install, and upload. def self.provision Vagrant::Action::Builder.new.tap do |b| b.use Action::Save b.use Action::Install b.use Action::Upload end end # Setup all the required middlemare, including checking for the presence # of Berkshelf, checking for the proper version of Berkshelf, and # loading the datafile from disk. def self.setup Vagrant::Action::Builder.new.tap do |b| b.use Action::Check b.use Vagrant::Action::Builtin::EnvSet, berkshelf: Env.new b.use Action::Load b.use Action::Share end end include VagrantPlugins::Berkshelf::Helpers def initialize(app, env) @app = app klass = self.class.name.downcase.split('::').last @logger = Log4r::Logger.new("vagrant::berkshelf::#{klass}") end end end end end
Version data entries
10 entries across 10 versions & 2 rubygems