Skip to content
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

listen -d can take multiple directories #303

Merged
merged 1 commit into from
Mar 25, 2015
Merged

Conversation

ideasasylum
Copy link
Contributor

The listen script can now take multiple directories

I encountered the duplicate directories problem in my Rails project (a
vendor gem used symlinks) so the simplest solution was not to watch the
whole project directory (i.e., the default —directories option) but
just the directories I care about. That meant I needed to watch
multiple directories which listen supports but the listen script did
not.

This commit changes the -d option type from string to array and adds
the appropriate specs. The order of the options doesn’t matter: listen -d app spec -v -r is the same as listen -v -r -d app spec and then
directories app and spec are pass to Listen.to as an array

The `listen` script can now take multiple directories

I encountered the duplicate directories problem in my Rails project (a
vendor gem used symlinks) so the simplest solution was not to watch the
whole project directory (i.e., the default —directories option) but
just the directories I care about. That meant I needed to watch
multiple directories which listen supports but the `listen` script did
not.

This commit changes the `-d` option type from string to array and adds
the appropriate specs. The order of the options doesn’t matter: `listen
-d app spec -v -r` is the same as `listen -v -r -d app spec` and then
directories `app` and `spec` are pass to `Listen.to` as an array
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 98.76% when pulling 9c93b19 on ideasasylum:master into 2030bac on guard:master.

e2 added a commit that referenced this pull request Mar 25, 2015
listen -d can take multiple directories
@e2 e2 merged commit 8e2016c into guard:master Mar 25, 2015
@e2
Copy link
Contributor

e2 commented Mar 25, 2015

Thank you very much - and for the tests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants