This repository was archived by the owner on Jul 5, 2023. It is now read-only.
Add quotations to auto-generated rails_rbi command - #310
Open
wpride wants to merge 1 commit into
Open
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.
|
Contributor
|
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. |
hdoan741
suggested changes
Apr 22, 2020
| @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.' |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zshusers 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 withzshandbash(and looks nicer).