commander-rb / commander

The complete solution for Ruby command-line executables
MIT License
822 stars 74 forks source link

Fix ERB Ruby v2.7 warnings. #92

Closed esotericpig closed 4 years ago

esotericpig commented 4 years ago

In Ruby v2.7, you'll get the following warnings:

~/.gem/ruby/2.7.0/gems/commander-4.5.1/lib/commander/help_formatters/terminal.rb:15: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
~/.gem/ruby/2.7.0/gems/commander-4.5.1/lib/commander/help_formatters/terminal.rb:15: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

There might be more warnings for v2.7, but these are the only ones I get so far.

ggilder commented 4 years ago

Looks good, thanks! Could you rebase and squash your two commits together?

esotericpig commented 4 years ago

Okay, I rebased it. I had to merge in some conflicts. Hopefully it's okay. Thanks.

ggilder commented 4 years ago

Hmm, that doesn't look quite right. If you run an interactive rebase, e.g. git rebase -i master, you should be able to remove the extraneous commits and just include your squashed commit.

esotericpig commented 4 years ago

After I rebased, it kept having conflicts, so I reverted it back to head, which then closed this pull request.

I reopened a new one at pull/93.