-
Notifications
You must be signed in to change notification settings - Fork 33
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
guarantee jekyll-watch respects users exclude configuration #92
base: master
Are you sure you want to change the base?
Conversation
by double-tapping (sly zombieland reference 😆) paths which don't match to exact (existing) files. this patch stores any of these non-absolute paths as wildcard paths; which it then rechecks & then strips from paths in the response handler for the listen package. NOTE maybe it'd be better & more reliable to simply use fnmatch? exclusively and not pass any filtering regexps to listen. WARN I've also modified the config-file check to only take place when your src directory is same as the project root directory, because the config file exists at the project root and if your src is in some subdirectory, then it's guaranteed to not be found by the listener package. I haven't tested this yet because I'll need to create a new empty jekyll site, but I have no doubt it should work.
Thanks for you effort, tests will need to pass though. |
yeah, my bad, I'm on it now. |
I couldn't figure out how to make rspec change dir to the root of the site, so I couldn't make it pass the test. Just ended up reverting to the original method name :(. Also didn't realise the regexps used by listen_ignore_paths began with a ^, my bad. Fixed now.
kay, this should be ok I hope 😄. |
There's a lot happening here.. At a first glance, it looks like the maintainability of the code went down significantly while the complexity went proportionately higher.. Needs some refactoring.
|
Did not know about that, changed.
I've been afraid to use return ever since I found out it also exits any containing functions if used in blocks. I suppose that's being overly paranoid. changed in
I thought it was easier to read this way, seeing as the false condition is a single expression... but understood. changed.
didn't know exclude could be a simple string. changed and added section to docstring.
Can't really tell how else to write it. That seemed like the most compact yet expressive way. If you have any suggestions please feel free to share. for now I've just added a comment elaborating on what it does. Also no need for |
Yep. one can't
Jekyll doesn't sanitize config values. If a user provides Jekyll with
Compact, yes. Expressive, not quite. However, I don't have an alternative suggestion for now..
The following don't make sense to me:
Thank you for all the work on this branch and considering my requests promptly. |
that's what I had at the beginning, but Ideally I'd liked to have changed Watcher from a module to a class, that way I could just have two instance fields and then change the map block to an each block which appends to the correct field. but I thought that would've been too big a change to just do. |
by double-tapping (sly zombieland reference 😆) paths which
don't match to exact (existing) files.
this patch stores any of these non-absolute paths as wildcard paths;
which it then rechecks & then strips from paths in the response handler
for the listen package.
NOTE maybe it'd be better & more reliable to simply use fnmatch?
exclusively and not pass any filtering regexps to listen.