Enforce js extension on erb tmp file #189
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After receiving a browser warning, that
livereload.js
is served with a wring mime type (text/plain) I encountered, that thetempfile
being served doesn't end withjs
and thus isn't detected correctly.This fix ensures a tmpfile extension of
.js
and the mime type being delivered correctly.No adaption to the tests because this particular part isn't tested (no integration test available) and everything is stubbed out.
IMO there should be a test for the correct extension because this is essential for the functionality outside of the module, but this may contradict to the initial author's intention for stubbing out any use of external classes.
Let me know what you think and if you want to change this behavior.