pat / ts-delayed-delta

Manage delta indexes via Delayed Job for Thinking Sphinx
http://ts.freelancing-gods.com
MIT License
73 stars 33 forks source link

Rails 3.x improvement: do not force requiring tasks in Rakefile #16

Closed enrico closed 12 years ago

enrico commented 12 years ago

Pat, these changes should get a rails 3.x user up to speed faster, since tasks are automatically loaded using railties as opposed to requiring them in the rails app's Rakefile...

enrico commented 12 years ago

oops, submitted pull request too early, will resubmit in a while...

enrico commented 12 years ago

Pat, sorry... for a second I thought my changes didn't work, but it was because of another gem (kaminari) which, if required before ts-delayed-job in my Gemfile, was causing an error. I believe these changes should be OK.

pat commented 12 years ago

Thanks for that Enrico, greatly appreciated :)

I tidied up a few things - namely, removed the duplication of task definitions, and switched it from an Engine to a Railtie. An Engine's only appropriate if we're adding Rails-ish classes (models, views, controllers, etc), so this is a little simpler. And I'm pretty sure the engine_name property has been deprecated, hence I got rid of that as well.

That said, this was definitely needed, so thanks for putting in the hard work!