Sha256: d3d22b34803d06a6f3cb6ba7a777ee9af03bfac443311599b1be311533ca7a18
Contents?: true
Size: 486 Bytes
Versions: 32
Compression:
Stored size: 486 Bytes
Contents
require 'log4r' module Vagrant module Action module VM class DefaultName def initialize(app, env) @logger = Log4r::Logger.new("vagrant::action::vm::defaultname") @app = app end def call(env) @logger.info("Setting the default name of the VM") name = env[:root_path].basename.to_s + "_#{Time.now.to_i}" env[:vm].driver.set_name(name) @app.call(env) end end end end end
Version data entries
32 entries across 32 versions & 6 rubygems