Skip to content

Commit

Permalink
Merge pull request #92 from jlkiri/jlkiri/remove-deprecated-params-er…
Browse files Browse the repository at this point in the history
…b-new

Use named parameters in ERB.new function
  • Loading branch information
mougams authored Dec 12, 2024
2 parents 4a37595 + 493c780 commit 8c8bb31
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ samples/consul-ui/decorators.js
/samples/hosts
/samples/hosts_per_services
/samples/prometheus_consul_coordinates
/samples/ready
/samples/consul-ui/ready
/samples/render_template_from_kv
/samples/consul_template
/samples/metrics
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.5
FROM ruby:3.2

WORKDIR /usr/src/app
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion lib/consul/async/consul_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def render(tpl, tpl_file_path, params = {}, current_template_info: nil)
params: params,
template_info: tpl_info
}
result = ERB.new(tpl, nil, @trim_mode).result(binding)
result = ERB.new(tpl, trim_mode: @trim_mode).result(binding)
raise "Result is not a string :='#{result}' for #{tpl_file_path}" unless result.is_a?(String)

@context = old_value
Expand Down

0 comments on commit 8c8bb31

Please sign in to comment.