-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Extend ErbTemplateHelper with trim_mode parameter #11144
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
d818e17
to
5ce3bb5
Compare
CLAs look good, thanks! |
Hi @krin-san, looks good. Totally naive question: Where is this code actually used? When would you actually use this new option? |
@janpio, already using it on few our projects to generate email messages for release candidates. Without this trim_mode option it looks impossible to keep template file readable while preserving empty lines where they needs to be. p.s.: I even forgot about this PR - so old it is |
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.
Yeah, then let's just merge this.
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.
Yeah, then let's just merge this.
Hey @krin-san 👋 Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉 Please let us know if this change requires an immediate release by adding a comment here 👍 |
Congratulations! 🎉 This was released as part of fastlane 2.82.0 🚀 |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validMotivation and Context
Current implementation of ErbTemplateHelper doesn't allow to pass trim_mode parameter to Erb initializer. It makes this class impossible to use with more or less advanced erb files eliminating empty lines. There is a workaround - Erb trim_mode could be defined globally, but it's not the way I'd like to follow.
A simple test is added to check if trim_mode parameter are actually used. Other tests in the same file was slightly changed to keep file syntax consistent.
Description
ErbTemplateHelper now have a new parameter - trim_mode - which is passed to ErbalT object and then passed to Erb initializer.