Archive for July, 2006

Posted on July 30, 2006 at 1:20 pm

I’ve written a DBF database access library in Ruby, but so far I’ve only tested it with files created with a couple of versions of FoxPro. I need files created with different flavors of DBase, XBase, Clipper, and FoxPro in order to flesh out the test suite. Ultimately, I would like to library to handle all the known variations of the DBF file format.

The project will be available on rubyforge.com within in a couple of days. I’ll post the link as soon as it’s available. The project is hosted on Rubyforge and can be found here.

If you have any files with the following characteristics, please email them to me at keithm@infused.org. Better yet, if you want to take the time to create a fresh sample database for me that would be awesome. Here’s what I’m looking for:

  • Small dataset. Prefer less than 100 rows
  • At least one field from each of the general data types. This means:
    • At least one Character field (if using software that supports fields larger than 254 characters, also include at least one field that is larger)
    • At least one Number field
    • At least one Boolean field
    • At least one Date field
    • At least one Memo field (please include the memo file along with the dbf file)
  • Fields to include if supported by the software:
    • At least one Floating Point field
    • At least one Binary, General, or Picture field (not neccessary to have one of each)
    • At least one Currency field
    • At least one Integer field
    • At lease one DateTime field
    • At lease one Timestamp field

There are a few other data types such as VariField which I don’t really care about right now.

Special Bonus Offer:
If you have access to 3 or more of the software packages and/or versions and are willing to create good sample databases I will pay you for your efforts. Contact me at the email above for details.

Posted on July 28, 2006 at 5:56 pm

I’ve been working on a very large Rails projects at work and found myself spending a lot of time writing the same unit tests over and over again. The application has a very complex database schema and has 159 ActiveRecord models so far. With this many models, there are obviously a ton of associations. I decided that I needed a way to automatically test every association that is defined in a model.

The TestInjector plugin is the result. I still have a lot of functionality that I want to add, but it works very well and it’s ready for others to use.

I posted the details on the Rails wiki:
http://wiki.rubyonrails.org/rails/pages/TestInjector

Or just install it using the plugin manager and take a look at the README file for more details:

script/plugin install http://www.infused.org/svn/plugins/test_injector

or:

script/plugin discover
script/plugin install test_injector
Posted on July 20, 2006 at 12:09 pm

Anybody else have this problem with Anna Chan’s ScopedAccess plugin?

Using a around_filter with ScopedAccess::Filter or the scoped_access helper works fine in normal usage, but when running rake test:functionals, the scope from previously run tests carries over into later tests. In other words with_scope is being set but not removed.

Maybe this is because the controllers are not being torn down after the corresponding functional test is run? I’m tired of peppering my functional test setup methods with Whatever.reset_scope. Anybody have a quick fix for me? I have other things to do, and I’d like to avoid looking deeper into this one…

Posted on July 15, 2006 at 3:06 pm

We’re going to see Paul Oakenfold at the Crystal Ballroom tonight. We saw Paul live at Amnesia when we were in Spain a couple of years ago. I never expected to see him come to Portland!

I think about 20 of our friends are going, so it should be a great time.

Posted on at 2:10 pm

It seems that a recent RHEL4 update downgraded MySQL from 5.0 to 4.1. Not cool, but it’s my fault. I should have added mysql* to the package ignore list. Most of the databases are okay, but three of them have tables that are unreadable. I’m working on restoring them now.

UPDATE 2:50pm:
I decided not to re-install MySQL 5.0. Instead I used the latest good database dumps to restore the affected tables. This should serve as an excellent argument for keeping sql dumps of your databases along with the binary backups. The raw db files would have done me no good because they aren’t backwards compatible. The sql dumps are much more useful.