-
Notifications
You must be signed in to change notification settings - Fork 84
Add quotations to auto-generated rails_rbi command #310
base: master
Are you sure you want to change the base?
Conversation
`zsh` users cannot copy and paste the command in `Please rerun bundle exec rake rails_rbi:models[Shipment] to regenerate.` without escaping the brackets. Adding comments around the command makes this runnable with `zsh` and `bash` (and looks nicer)
Codecov Report
@@ Coverage Diff @@
## master #310 +/- ##
==========================================
- Coverage 96.80% 96.80% -0.01%
==========================================
Files 155 155
Lines 2852 2850 -2
==========================================
- Hits 2761 2759 -2
Misses 91 91
Continue to review full report at Codecov.
|
Thanks, @wpride! It seems you only change the generation code in "helper_rbi_formatter". Do you want to also change it for other formatter classes? and I think you need to rerun the generation code as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment on the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More comments.
@@ -18,7 +18,7 @@ def generate_rbi | |||
|
|||
@parlour.root.add_comments([ | |||
'This is an autogenerated file for Rails helpers.', | |||
'Please rerun bundle exec rake rails_rbi:helpers to regenerate.' | |||
'Please rerun \"bundle exec rake rails_rbi:helpers\" to regenerate.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we use' '
here, you don't need to escape the "
. Currently your change generate this:
+# Please rerun \"bundle exec rake rails_rbi:helpers\" to regenerate.
But I think we only want?
+# Please rerun "bundle exec rake rails_rbi:helpers" to regenerate.
zsh
users cannot copy and paste the command inPlease rerun bundle exec rake rails_rbi:models[Shipment] to regenerate.
without escaping the brackets. Adding comments around the command makes this runnable withzsh
andbash
(and looks nicer).