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

guard init jasmine is creating a bad configuration #81

Closed
Foxandxss opened this issue Sep 18, 2012 · 2 comments
Closed

guard init jasmine is creating a bad configuration #81

Foxandxss opened this issue Sep 18, 2012 · 2 comments

Comments

@Foxandxss
Copy link

I guess that the "guard init jasmine" configuration belongs to here, if not, I'm sorry.

What we expect is this:

guard 'jasmine' do
  watch(%r{spec/javascripts/spec\.(js\.coffee|js|coffee)$})         { "spec/javascripts" }
  watch(%r{spec/javascripts/.+_spec\.(js\.coffee|js|coffee)$})
  watch(%r{app/assets/javascripts/(.+?)\.(js\.coffee|js|coffee)$})  { |m| "spec/javascripts/#{m[1]}_spec.#{m[2]}" }
end

What we get is this:

guard 'jasmine' do
  watch(%r{spec/javascripts/spec\.(js\.coffee|js|coffee)$})         { "spec/javascripts" }
  watch(%r{spec/javascripts/.+_spec\.(js\.coffee|js|coffee)$})
  watch(%r{app/assets/javascripts/(.+?)\.(js|coffee)})  { |m| "spec/javascripts/#{m[1]}_spec.#{m[2]}" }
end

Notice the last watch. It is ignoring the ".js.coffee" files.

I hope this helps. Thank you.

EDIT: I see the pull that changed it: b6abeb7

Even when the change should work with .js.coffee files, at least is not working for me. If I change my Javascript, guard doesn't react.

@netzpirat
Copy link
Contributor

You're absolutely right, I didn't review the referenced pull request careful enough and it broke detecting the .js.coffee files. Thanks a lot for reporting. Version 1.8.3 is out with the fixed Guardfile template.

@taavo
Copy link
Contributor

taavo commented Sep 19, 2012

Sorry about that. Outsmarted myself on the regex.

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

No branches or pull requests

3 participants