Closed peterxjang closed 4 years ago
@peterxjang Thank you so much for letting me know the issue!
What was happening is that Thor 1.0 introduced a stricter type checking for default
value via https://github.com/erikhuda/thor/commit/7d199c0367997939857a3c3d96209515239989e3
and it caused this warning even on existing Rails apps.
I just fixed the issue via 3fa34a285340939f8614564e62eaebfed816f866 and published version 0.7.1 gem with this fix.
In Rails 6.0.2, running any
rails generate
commands with the jb gem installed results in this deprecation warning:I believe this issue is coming from the scaffold generator controller: https://github.com/amatsuda/jb/blob/master/lib/generators/rails/scaffold_controller_generator.rb. For some reason Rails 6.0.2 is expecting a string value here. This issue did not occur on Rails 6.0.1 or any other prior versions as far as I know.
I was able to eliminate the deprecation warning by adding the line
config.generators.jb = "true"
in myconfig/application.rb
file, which is providing a string value as opposed to a boolean. However, I'm not sure if that's the correct approach, setting it to "true" or "false" didn't seem to have an effect on the generator functionality, although I didn't test every scenario. Any thoughts are appreciated, thanks!