davetron5000 / gli

Make awesome command-line applications the easy way
http://davetron5000.github.io/gli
Apache License 2.0
1.26k stars 102 forks source link

Ruby 3.0 and ERB.new issues #301

Closed ttscoff closed 3 years ago

ttscoff commented 3 years ago

GLI 2.19.2

/usr/local/lib/ruby/gems/3.0.0/gems/gli-2.19.2/lib/gli/commands/help_modules/global_help_format.rb:37: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.

/usr/local/lib/ruby/gems/3.0.0/gems/gli-2.19.2/lib/gli/commands/help_modules/global_help_format.rb:37: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

/usr/local/lib/ruby/gems/3.0.0/gems/gli-2.19.2/lib/gli/commands/help_modules/command_help_format.rb:28: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.

Any chance this will be fixed?

davetron5000 commented 3 years ago

I'll look into it soon. I want GLI to work on as many rubies as I have time to support!

ttscoff commented 3 years ago

You rock! On Feb 10, 2021, 1:04 PM -0600, David Copeland notifications@github.com, wrote:

I'll look into it soon. I want GLI to work on as many rubies as I have time to support! — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

davetron5000 commented 3 years ago

Welp, this is an easy fix, but I can no longer run the test suite in 3.0 because of some cucumber issue.

Do you have the ability to pull in a branch version of GLI to try to see if it works in your app?

https://github.com/davetron5000/gli/tree/ruby-3

Has the fix for the ERB warning. It passes unit tests. I will see about getting the test suite/dev env working but if you can confirm it's working I can do a point release.

ttscoff commented 3 years ago

I'm using GLI as a bundled gem. Does gem have an easy option for using a branch as a source? I'll figure it out one way or another.

davetron5000 commented 3 years ago

You can specify it in your Gemfile and run it locally out of your apps' source code, but I don't think you could build/deploy your app with that.

ttscoff commented 3 years ago

Figured out how to do it with gem, seems to be working great!

davetron5000 commented 3 years ago

OK, this is fixed in 2.20.0