guard / listen

The Listen gem listens to file modifications and notifies you about the changes.
https://rubygems.org/gems/listen
MIT License
1.92k stars 246 forks source link

Fall back to polling w/ warning on OS X 10.6-10.8 #370

Closed vaz closed 8 years ago

vaz commented 8 years ago

If OS X >= 10.9 (Darwin >= 13.0): all is well.

Else if OS X >= 10.6 (Darwin >= 10.0): if rb-fsevent > 0.9.4, fall back to polling and show warning recommending to use rb-fsevent=0.9.4

(Darwin < 10 not supported.)

See this gist for test: https://gist.github.com/vaz/fd6ee4c3563425ec11c24b96cc9da13b

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 97.687% when pulling e97d2e4a29458d14045049d50b88b594ab3507a7 on vaz:old-darwin-fallback into 14e6c00b199ebb08e52ebaa418ffd86a38234c9a on guard:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.02%) to 97.712% when pulling 4a9aeafd77d309a57a1d4d083c92048bca7553b4 on vaz:old-darwin-fallback into 14e6c00b199ebb08e52ebaa418ffd86a38234c9a on guard:master.

e2 commented 8 years ago

I can merge and release this after the minor changes above.

Everything else looks good to me.

Surprisingly lots of work was needed for this.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.02%) to 97.703% when pulling 014ae8691c451e6ba5ee499963fb8621b350de41 on vaz:old-darwin-fallback into 14e6c00b199ebb08e52ebaa418ffd86a38234c9a on guard:master.

e2 commented 8 years ago

It's awesome work!

For readability it might be better to implicitly return false instead of relying on Kernel.warn to return nil. But I don't mind personally since that's covered by tests.

Just squash the changes (so the history isn't as intimidating for future contributors) and I'll merge and release immediately.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.01%) to 97.702% when pulling 859547c27d58a575e4af69e480c113adeb5759da on vaz:old-darwin-fallback into 14e6c00b199ebb08e52ebaa418ffd86a38234c9a on guard:master.

vaz commented 8 years ago

Thanks! Agreed on the explicit false return value, it is more readable. Added that and squashed.