-
Notifications
You must be signed in to change notification settings - Fork 554
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 inject into file warning #709
Fix inject into file warning #709
Conversation
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 looks good - I'd like to see this merged in!
@nicolas-brousse can you rebase off master please? |
4ae8925
to
bf3afab
Compare
lib/thor/actions/inject_into_file.rb
Outdated
before, after = content.split(regexp, 2) | ||
snippet = (behavior == :after ? after : before).to_s |
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 code has been added. I've to found a way to deal this regexp
.
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.
Looks good! @rafaelfranca
For now when I tried locally, the test I added fail. I've to inspect how |
Tests are broken |
bf3afab
to
6499e07
Compare
Not sure if the fix implementation is good enough. Let me know if you want some changes.
Closes #706.