Default ignore patterns are always used #37

enthooz opened this Issue Jun 5, 2012 · 14 comments


None yet
7 participants

enthooz commented Jun 5, 2012

Using the :ignore option appends specified patterns to defaults, rather than replacing default patterns.

Because I have a vendor directory that I need monitored, I got around this by doing the following:

Listen::DirectoryRecord::DEFAULT_IGNORED_DIRECTORIES.reject!{ |p| p == 'vendor' }

Not sure if this is a bug or a feature. But, typically specified options override defaults.



thibaudgg commented Jun 6, 2012

That's a good point, the Listen #ignore & #filter methods as been made to be callable multiple time (especialy for the "Object API", that's why they append patterns and not replace them, maybe we need another method to overwrite them (i.e. #ignore! & #filter) or add an overwrite option (i.e. `.ignore(/patern/, overwrite: true).

@guard/core-team what are your thoughts?


Maher4Ever commented Jun 6, 2012

Great suggestion. I like the idea of adding the #filter! and #ignore! methods to replace the patterns instead of adding to them, as the "bang" in the name suggests something "destructive" would happen when using them :).


netzpirat commented Jun 6, 2012

Bang methods would be great.


rymai commented Jun 6, 2012

I agree, awesome suggestion!


thibaudgg commented Jun 7, 2012

Great! @enthooz bang methods sounds good to you?

enthooz commented Jun 7, 2012

Absolutely. Would you like me to submit a pull request, tests included?


On Jun 6, 2012, at 11:55 PM, Thibaud wrote:

Great! @enthooz bang methods sounds good to you?

Reply to this email directly or view it on GitHub:
#37 (comment)


thibaudgg commented Jun 7, 2012

@enthooz would be much appreciated! Thanks!

+1, ran into this today when trying to fix a third-party gem by including in in my vendor folder.


thibaudgg commented Aug 14, 2012

@enthooz any progress on this PR?

enthooz commented Aug 21, 2012

I haven't had a chance to get to this and probably won't be able to in the next month.


thibaudgg commented Aug 21, 2012

@enthooz ok no problem, take your time. Thanks!


tarsolya commented Nov 21, 2012

@thibaudgg I guess this can be closed now aswell.


thibaudgg commented Nov 21, 2012

Yep, thanks!

@thibaudgg thibaudgg closed this Nov 21, 2012

enthooz commented Dec 6, 2012

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment