ranmocy / guard-rails

Guard-Rails is watching on your development servers as you wish!
http://ranmocy.github.com/guard-rails
MIT License
137 stars 25 forks source link

Regex to ignore Rake tasks #26

Closed davejlong closed 10 years ago

davejlong commented 10 years ago

The Regular expression to restart Rails when files in config or lib now ignores updated to lib/tasks using a RegEx negative look ahead to match "lib not followed by '/tasks'"

I also fixed a couple of failing tests to ensure that the update doesn't break any existing code.

ranmocy commented 10 years ago

I don't get this. Why you try to change the syntax of test in the first commit? should be_true is more easy to read than should be.

And why we should ignore lib/tasks? Since it should be decided by the user. Or you assume that everybody want to ignore that directory?

davejlong commented 10 years ago

My bad. It looks like when I ran the specs, I used 3.0.0 which drops be_true for be or be_truthy.

In regards to modifying the RegEx, I did so, because there's rarely (if ever) a time that code in lib/tasks effects the rest of the Rails application, except for Rake. It is my opinion that lib/tasks is something that everybody will want to ignore.

ranmocy commented 10 years ago

Not your fault, since spec change the syntax. And I should add Gemfile.lock earlier. I may upgrade in the future.

I tent to keep what it was of the template to avoid the confusion to the new users. Seniors users don't even care the scaffold any way.

Thanks for your submits~ I'm really grad to hear from others.

davejlong commented 10 years ago

It also might be a good idea to use pessimistic version constraints:

...
s.add_development_dependency 'rspec', '~> 2.6' # Limit RSpec to 2.x
ranmocy commented 10 years ago

You are right. Updated.

Regards, Wanzhang Sheng

On Monday, April 7, 2014 at 10:01, David Long wrote:

It also might be a good idea to use pessimistic version constraints: ... s.add_development_dependency 'rspec', '~> 2.6' # Limit RSpec to 2.x

— Reply to this email directly or view it on GitHub (https://github.com/ranmocy/guard-rails/pull/26#issuecomment-39755809).