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.
I’m really excited to release Navvy 0.3 and I think you’re going to love it. It’s great, fantastic, amazing and magical and I’d like to highlight four “tent poles” for you today.
Ok, no more Apple marketing techniques. Promise.
Mongoid
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.
Navvy::Logger
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
Daemons
As I said in my previous Navvy article, I want to encourage users to use a process monitor (like God) since I believe handling background processes is none of Navvy’s business.
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.
Generators
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.
Cleanups
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 VERSION
file.
For contributors (♥), Navvy uses Bundler now, so you can quickly install everything you need to start hacking on Navvy.
That’s it. Be sure to give Navvy a try some time. The wiki is quite comprehensive but if you run into any problems, be sure to ask, or create an issue on Github.