-
Notifications
You must be signed in to change notification settings - Fork 344
Fix binstubs not being replaced when their quoting style was changed #534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix binstubs not being replaced when their quoting style was changed #534
Conversation
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @grosser (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
2306b04
to
260ced7
Compare
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.
smells like a lot of copy-paste ... how about something like /#{Regexp.escape(LOADER).gsub('"', "['\"]")}/
or so ?
... also a test would be great to not break this in the next release
260ced7
to
aff7afb
Compare
@grosser I've fixed it and removed one line for refactoring. I haven't used |
CHANGELOG.md
Outdated
@@ -1,5 +1,6 @@ | |||
## Next release | |||
|
|||
* Fix a bug on re-generating binstub (#534) |
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.
Fix binstubs not being replaced when their quoting style was changed
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.
This message describes perfectly this changes. Thanks so much. I'll change this.
do any tests fail if you delete all the binstub code ? |
aff7afb
to
51dec1a
Compare
No, tests didn't failed. But I've added a test case for re-create binstub. |
I found a bug: The same code is duplicatedly generated.
Background
I've run
rubocop -a
afterbundle exec spring binstub --all
.And it changed to double quotes from single quotes in binstubs:
Then I've run
bundle exec spring binstub --all
again.Before
After