guard init jasmine is creating a bad configuration #81

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

Comments

Projects
None yet
3 participants

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 closed this in 860e2d7 Sep 19, 2012

Contributor

netzpirat commented Sep 19, 2012

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.

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