zmbush / coffeelint-ruby

This adds some simple bindings to ruby to enable use of coffeelint
MIT License
32 stars 23 forks source link

coffeelint rake task exits early as of 1.10.0 #37

Closed jonseaberg closed 9 years ago

jonseaberg commented 9 years ago

https://github.com/zmbush/coffeelint-ruby/blob/master/lib/tasks/coffeelint.rake#L3 The rake task calls Coffeelint.run_test_suite on app and spec. success = Coffeelint.run_test_suite('app') and Coffeelint.run_test_suite('spec')

The new implementation of Coffeelint.run_test_suite exits with the number of failures. This causes the rake task to exit after running Coffeelint.run_test_suite('app'). Is there a reason to exit in run_test_suite? I can make the changes. Just wondering how you would like to structure the code. Another method to run the test suite that can be used by run_test_suite and the rake task, or to remove the exit from run_test_suite, or another option?

bolandrm commented 9 years ago

Just ran into the same issue. The rake task is unusable in 1.10.0.

mleone commented 9 years ago

+1

zmbush commented 9 years ago

run_test_suite should probably return the number of errors rather than exit. Feel free to open a PR.

jonseaberg commented 9 years ago

Will do! Thanks!

afestein commented 9 years ago

38

zmbush commented 9 years ago

Apologies for the delay guys. I have just released a version with this fix to rubygems. https://rubygems.org/gems/coffeelint/versions/1.10.0.pre.patch.1

afestein commented 9 years ago

Thanks for the prompt response.

afestein commented 9 years ago

I just installed the rubygems.org patched version above and this is not resolved for me.

Although I can see the changes here on Github, when I do a gem open coffeelint I can see that the version.rb is reporting "1.10.0" instead of "1.10.0-patch.1", so either I am doing something wrong or there's an issue with the patch?

Sorry if there is something obvious I am missing.

zmbush commented 9 years ago

Did you instal it with --pre? It's considered a prerelease gem by rubygems.

zmbush commented 9 years ago

gem install coffeelint --pre -v 1.10.0.pre.patch.1

zmbush commented 9 years ago

As luck would have it, mainline coffeelint just released v1.11.0 I have pushed a new gem for that version (this is no longer a prerelease gem)

afestein commented 9 years ago

Thanks so much, working great now.