It’s been a while since the last proper release of Navvy — the database agnostic Ruby background job processor — but like I promised a while back, I’ve been working on a new version whenever I could find the time.
Ok, no more Apple marketing techniques. Promise.
In addition to the adapters for ActiveRecord, DataMapper, Sequel and MongoMapper, Navvy 0.3 intoduces a Mongoid adapter that works exactly like the rest. Special thanks to @TomK32 and @rubenfonseca for helping out.
The previous logger — called
Navvy::Log — was rather nasty due to some bad design decisions I made a while back, so I decided to completely rewrite it. Now it extends the Logger from the standard Ruby library, which makes it more reliable and a lot smaller.
Navvy will log to
STDOUT by default, but using
Navvy.configure you can provide your own logger:
Navvy.configure do |config| config.logger = Logger.new('~/navvy.log') end
That’s why Navvy’s generator doesn’t create the
script/navvy file anymore. Also, the nasty
Navvy::Worker.daemonize is gone. If you want to daemonize your worker process, you should set it up yourself now.
Navvy has had a Rails generator to create migrations for a while now, but it was ActiveRecord only. In 0.3, the Rails 2 and Rails 3 generators can create migrations for Sequel as well.
As you probably know, DataMapper, MongoMapper and Mongoid don’t need migrations. That means all generators are really easy to set up now.
Last but not least, Navvy got cleaned up quite a bit since 0.2. For example: the gem isn’t built with Jeweler anymore, which resulted in a cleaner
Rakefile, a cleaner
.gemspec and no more need for that nasty