ManageIQ / manageiq-appliance_console

The console for the ManageIQ appliances.
Apache License 2.0
2 stars 28 forks source link

Fix warnings on newer ERB versions #267

Closed Fryguy closed 6 days ago

Fryguy commented 1 week ago

Fixes the follow warnings seen in the logs:

warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

@jrafanie Please review.

Fryguy commented 1 week ago

Gah I just noticed that on Ruby 3.0, it's erb 2.2.0, which still has the old syntax. We might have to just wait for Ruby 3.0 to be dropped, or I'll have to put a conditional 🤷

We don't have specs on this, or they would have blown up the 3.0 tests.

Fryguy commented 6 days ago

I'm not sure how, but I was totally wrong - erb 2.2.0 has the keyword args interface, so we should be fine.

jrafanie commented 6 days ago

I'm not sure how, but I was totally wrong - erb 2.2.0 has the keyword args interface, so we should be fine.

Agreed. As we found in https://github.com/ManageIQ/manageiq/pull/23250, it looks like this is good to go.