Closed mohawk2 closed 6 years ago
This looks great: Centralizing the creation of paths/URLs on the Site object is the right thing to do, and the test_pages change is long overdue.
Is this ready for merge, or do you want to keep working on it?
I feel this is ready for merge as-is! I've just got the switch to Mojo::Path
working as in passing all tests, but it's still doing some Path::Tiny
stuff that's failing on Windows so a little more is required :-)
(To be clear, that stuff I'm doing on a separate branch, which you can look at if you're interested: https://github.com/mohawk2/Statocles/commits/type-pagepath )
Okay, I'll put this in and see if I can start cleaning up the existing tests a bit according to my new plan of reducing the scope of individual test units (everything is an integration test now, and I'm sure you've noticed that the whole thing takes for-ever to run).
These are the independent changes I've felt necessary while fighting to separate the paths that are file-paths from paths that are parts of URLs :-)
Notably, I added a param to the App's
url
method to control it stripping offindex.html
. I thought that was worthwhile because of the useful extra-/
-avoiding behaviour it has, which is important forMojo::Path
objects, whilePath::Tiny
just hides them.I hope you also find the
test_pages
behaviour change useful - now if there are missing or extra pages it will tell you just which ones, not all of both.