class Souschef::Template::Rakefile

Add Rakefile for testing support

Public Class Methods

new(opts) click to toggle source
Calls superclass method Souschef::Template::Base::new
# File lib/souschef/template/rakefile.rb, line 5
def initialize(opts)
  super(opts)
end

Public Instance Methods

create() click to toggle source

Public - Create a Rakefile from our Template

cookbook - String Cookbook name

Returns nil

# File lib/souschef/template/rakefile.rb, line 14
def create
  tmpl = ERB.new(load_erb_file('rakefile.erb'))
  data = tmpl.result(binding)

  info 'Setting up Rakefile'
  write_file(cookbook_file_path('Rakefile'), data)
end