the Mysql2 adapter is now supported (in addition to SQLite3, PostgreSQL, and MySQL)
activerecord-import got stupid simple to require and use
the 0.1.0 release, um, surprise!
Okay, the first line item – mysql2 support. This is a little late coming I know, but it’s there now. The mysql2 support is identical to the mysql support so if you’re upgrading a pre-Rails 3 app (that used ar-extensions or activerecord-import) you won’t have to change any code using #import. More on that later.
Stupid Simple Requires
activerecord-import and its predecessor (activerecord-extensions) was always a little kludgy to require and use. It was never painstaking to load up, but nonetheless it could have been better. Well, that better comes today.
Here’s the breakdown of the better: activerecord-import is now loads when your ActiveRecord connection is established. This means:
- no need to separately require activerecord-import or adapter-specific code
- supports you using multiple database adapters simultaneously
- activerecord-import will only load once for an adapter, so no worries re-establishing connections
This isn’t earth shattering awesome, but this is a small step forward for the library and it makes it easier to use!
For more information on requiring activerecord-import in Rails and non-Rails projects see “Requiring”:http://github.com/zdennis/activerecord-import/wiki/Requiring on the wiki.
0.1.0 Release, um, Surprise!
The 0.1.0 activerecord-import gem has been out for a few months, and I know a few of you have been using it as I’ve been receiving emails and instant messages. However, if you didn’t know it was out, surprise! I apologize for not communicating when the gem became available, but hindsight is 20/20, and moving forward things I will be more communicative.
If you didn’t know activerecord-import 0.1.0 took all of the import functionality out of the activerecord-extensions gem and bundled it in its own gem. It is Rails 3 friendly whereas activerecord-extensions is not and will never be (at least by me). The 0.1.0 release launched support for the following adapters:
And as of this announcement mysql2 support was added.
Well, there you have it, the world just got a little bit better today. When I pushed the gem I am pretty sure a tiny angel got its wings.
Install the gem
gem install activerecord-import -v 0.2.0
Install in your Gemfile
gem "activerecord-import", ">= 0.2.0"
For docs see the “wiki”:http://github.com/zdennis/activerecord-import/wiki/
blog comments powered by Disqus