From 5b5954b4eb6cf908d033e435e2a37410c7cdb51d Mon Sep 17 00:00:00 2001 From: Ben Fritsch Date: Mon, 9 Oct 2023 13:58:53 +0200 Subject: [PATCH 1/2] update supported rubies drop support for ruby 2.5, 2.6 and 2.7 add support for ruby 3.1 and 3.2 --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 94ed8d88..b6b6e26e 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['2.5', '2.6', '2.7', '3.0'] + ruby-version: ['3.0', '3.1', '3.2'] activesupport-version: ['5', '6'] sinatra-version: ['1', '2'] env: From e1b30e8c713e1b96a905c1f529f8ad7966e5bc1c Mon Sep 17 00:00:00 2001 From: Ben Fritsch Date: Mon, 9 Oct 2023 14:04:18 +0200 Subject: [PATCH 2/2] 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