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
Add fixture with invalid encoding, update FSProject load_file to force UTF8 #420
Add fixture with invalid encoding, update FSProject load_file to force UTF8 #420
Conversation
Welcome! Congrats on your first pull request to Licensee. If you haven't already, please be sure to check out the contributing guidelines. |
FWIW - the spec failure in travis |
Additional context - here's the stacktrace of the invocation / unhandled exception when using
|
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.
Small change and a question.
@jvonkluck the spec failure you mentioned at #420 (comment) was unrelated to this PR, now fixed. It's now passing except for rubocop complaints that do pertain to this PR. |
Congrats on getting your first pull request to Licensee merged! Without amazing humans like you submitting pull requests, we couldn’t run this project. You rock! 🎉 |
@mlinksva Thank you very much for the quick turnaround. What's the process / schedule for getting a patch release published to Rubygems now that the fix has been merged in to master? |
@benbalter is the lead and does releases. AFAIK he does them as needed && when he has time. 😄 |
Ha - totally understandable. It's free time for all of us... |
I'm using the
licensee
gem as a part of thelicensed
gem for validating a number of closed source projects at my job. One of the projects in particular pulled in some npm dependencies which the author kindly included non-UTF8 characters in.The current implementation includes some logic to clean up poorly encoded files in
ProjectFiles::ProjectFile.initialize
but theProject
class attempts to retrieve license content from a readme match before instantiating aProjectFile
.This felt like a minimally intrusive albeit slightly repetitive way to deal with poorly encoded input files.
I'm not positive that this is in keeping with the overall architecture but am hoping to provide a solution for a problem that I'd like to fix for my own usage.
View rendered spec/fixtures/readme-invalid-encoding/README.md