Fix site relative partial paths failing in 1.2 #587
Merged
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.
Fixes #571
This PR changes the behaviour in the
ViewMaker
trait to more closely match theViewMaker
in 1.1, while still retaining the multiple extension support introduced in 643a581#diff-47d4d0a41b9809a09c2b0c209309cd6b776645682610fa2c1906ed66d6ef1b4b.If a path that is relative the base path is encountered in the
getViewPath
method, and with one of the allowed extensions matches a valid file, this will be accepted as a partial path. If not, then the ViewMaker will attempt to same within the view paths added at that point. Previously, the base relative paths would only be checked if the path was symbolized in some fashion.This PR also introduces a fix to the
winter:test
command by ensuring that the current working directory is always the base path. This matches the behaviour of a web request which would presume the same, and thus ensures that the changes above work in the tests as well.