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

Fixed watchdir option #287

Merged
merged 2 commits into from
Nov 6, 2014
Merged

Fixed watchdir option #287

merged 2 commits into from
Nov 6, 2014

Conversation

lesniakania
Copy link
Contributor

I think current watchdir option doesn't work as it should (please correct me if I'm missing something).

My recent project was consisted of many different modules each of them having it's own tests suite.
I've tried to use watchdir option but it didn't work as I expected.

I've created sample project and described steps to reproduce the issue and fix for the issue with my forks (https://github.com/lesniakania/guard and https://github.com/lesniakania/guard-rspec):

https://github.com/lesniakania/multiple-modules-with-guard

These changes depends on changes I've made in guard repo.

@@ -22,7 +30,9 @@ def _parts
parts << _guard_formatter
parts << "--failure-exit-code #{FAILURE_EXIT_CODE}"
parts << options[:cmd_additional_args] || ""
parts << paths.join(' ')
paths.map do |dir, specs|
"cd #{dir} && #{parts.join(' ')} #{specs.join(' ')}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@@ -22,6 +22,11 @@ def _parts
parts << _guard_formatter
parts << "--failure-exit-code #{FAILURE_EXIT_CODE}"
parts << options[:cmd_additional_args] || ""
if chdir = options[:chdir]
paths.each do |path|
path.sub!("#{chdir}#{File::SEPARATOR}", '')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.36%) when pulling a64bf07 on lesniakania:master into 073dfa8 on guard:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.36%) when pulling 44cad4a on lesniakania:master into 073dfa8 on guard:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.36%) when pulling bafc4ea on lesniakania:master into 073dfa8 on guard:master.

e2 added a commit that referenced this pull request Nov 6, 2014
@e2 e2 merged commit c7889f1 into guard:master Nov 6, 2014
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.

None yet

5 participants