From e1b30e8c713e1b96a905c1f529f8ad7966e5bc1c Mon Sep 17 00:00:00 2001 From: Ben Fritsch Date: Mon, 9 Oct 2023 14:04:18 +0200 Subject: [PATCH] update call to ERB.new --- lib/pliny/commands/creator.rb | 2 +- lib/pliny/commands/generator/base.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pliny/commands/creator.rb b/lib/pliny/commands/creator.rb index d1f112c6..dd971e63 100644 --- a/lib/pliny/commands/creator.rb +++ b/lib/pliny/commands/creator.rb @@ -35,7 +35,7 @@ def parse_erb_files Dir.glob("#{app_dir}/{*,.*}.erb").each do |file| static_file = file.gsub(/\.erb$/, '') - template = ERB.new(File.read(file), 0) + template = ERB.new(File.read(file)) context = OpenStruct.new(app_name: name) content = template.result(context.instance_eval { binding }) diff --git a/lib/pliny/commands/generator/base.rb b/lib/pliny/commands/generator/base.rb index 195aea1f..74937f86 100644 --- a/lib/pliny/commands/generator/base.rb +++ b/lib/pliny/commands/generator/base.rb @@ -41,7 +41,7 @@ def display(msg) def render_template(template_file, vars = {}) template_path = File.dirname(__FILE__) + "/../../templates/#{template_file}" - template = ERB.new(File.read(template_path), 0, '>') + template = ERB.new(File.read(template_path), trim_mode: '>') context = OpenStruct.new(vars) template.result(context.instance_eval { binding }) end