lib/command/setup.rb in cpl-0.3.3 vs lib/command/setup.rb in cpl-0.4.0

- old
+ new

@@ -35,18 +35,18 @@ HEREDOC def call config.args.each do |template| filename = "#{config.app_cpln_dir}/templates/#{template}.yml" - ensure_template(template, filename) + ensure_template!(template, filename) apply_template(filename) progress.puts(template) end end private - def ensure_template(template, filename) + def ensure_template!(template, filename) Shell.abort("Can't find template '#{template}' at '#{filename}', please create it.") unless File.exist?(filename) end def apply_template(filename) data = File.read(filename)