Sha256: 86798e1e4e4505e6ab7956dd20af5522c6bd5a7f436efc2fcf2efa3789472ba1
Contents?: true
Size: 609 Bytes
Versions: 10
Compression:
Stored size: 609 Bytes
Contents
require_relative 'base' module VagrantPlugins module Berkshelf module Action class Save < Base def call(env) if !berkshelf_enabled?(env) @logger.info "Berkshelf disabled, skipping" return @app.call(env) end if env[:berkshelf].shelf @logger.debug "Saving datafile to disk" FileUtils.mkdir_p(datafile_path(env).dirname) datafile_path(env).open("w+") do |f| f.write(env[:berkshelf].shelf) end end @app.call(env) end end end end end
Version data entries
10 entries across 10 versions & 2 rubygems