class Souschef::Template::License

Create standard LICENSE

Public Class Methods

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

Public Instance Methods

create() click to toggle source

Public - Create a valid License file

cookbook - String Cookbook name

Returns nil

# File lib/souschef/template/license.rb, line 14
def create
  tmpl = ERB.new(load_erb_file('license.erb'))
  @year = Time.now.year
  @maintainer = @opts[:souschef][:maintainer]
  data = tmpl.result(binding)

  info 'Updating LICENSE file'
  write_file(cookbook_file_path('LICENSE'), data)
end