lib/kitchen/driver/vagrant.rb
# Renders the Vagrantfile ERb template.
#
# @return [String] the contents for a Vagrantfile
# @raise [ActionFailed] if the Vagrantfile template was not found
# @api private
Renders the Vagrantfile ERb template.
Renders the Vagrantfile ERb template .
def render_template
        template = File.expand_path(
          config[:vagrantfile_erb], config[:kitchen_root])
        if File.exist?(template)
          ERB.new(IO.read(template)).result(binding).gsub(%r{^\s*$\n}, "")
        else
          raise ActionFailed, "Could not find Vagrantfile template #{template}"
        end
      end
def render_template template = File . expand_path ( config [ :vagrantfile_erb ] , config [ :kitchen_root ] ) if File . exist? ( template ) ERB . new ( IO . read ( template ) ) . result ( binding ) . gsub ( %r{ ^ \s *$ \n } , "" ) else raise ActionFailed , "Could not find Vagrantfile template #{template}" end end
Renders the Vagrantfile ERb template.
Renders the Vagrantfile ERb template .
the contents for a Vagrantfile
the contents for a Vagrantfile
String
[ActionFailed] if the Vagrantfile template was not found
[ ActionFailed ] if the Vagrantfile template was not found
api
None