-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Move shebang to the top of bin/console
template
#3927
Conversation
Thanks for opening a pull request and helping make RubyGems and Bundler better! Someone from the RubyGems team will take a look at your pull request shortly and leave any feedback. Please make sure that your pull request has tests for any changes or added functionality. We use GitHub Actions to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of GitHub Actions in the PR status window below. If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #rubygems or #bundler channel on Slack. For more information about contributing to the RubyGems project feel free to review our CONTRIBUTING guide |
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.
Thank you, nice catch!
As illustrated by the failing specs, you need to restore the # frozen_string_literal: true
line as the second line in the file.
I've made the requested changes. |
Thanks! Just one final request, could you add a couple of lines below this code here: rubygems/bundler/spec/commands/newgem_spec.rb Lines 377 to 378 in 2ceb821
to assert that the first two characters in the generated binstub are "!#"? That way we add some test coverage for this bug fix. |
In an executable script, the shebang line should be the first line (the file needs to start with the bytes 0x23 0x21). Putting a comment above it will break the script. (Regression test included per @deivid-rodriguez)
I appended those expectations to that same test rather than creating a separate test; I hope that's okay. |
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.
Yes, it looks really good, thanks!
bin/console
template
👍 |
Move shebang to the top of `bin/console` template
Move shebang to the top of `bin/console` template (cherry picked from commit aecc90b)
Move shebang to the top of `bin/console` template (cherry picked from commit aecc90b)
Move shebang to the top of `bin/console` template (cherry picked from commit aecc90b)
Move shebang to the top of `bin/console` template (cherry picked from commit aecc90b)
In an executable script, the shebang line should be the first line (the
file needs to start with the bytes 0x23 0x21). Putting a comment above
it will break the script.