Where I’m at
ø
Well despite the apparant lack of blogging things have been going quite well. I’ve been working hard on the Acts As Freetaggable plugin. I got things going with a simple app now located here and from there developed a nice big full suite of RSpec specs. After some deliberation (mostly internally, some with my mentor) I cutoff which features I would be putting into the plugin (from the core set of Cohort features, the missing ones will be implemented inside Cohort). Once I was sure the app’ified version of the plugin was (mostly?) working I started porting things over to a plugin.
Making the app into a plugin was, at first glance, quite a difficult task. The problem stemmed from the fact that Acts As Freetaggable uses other plugins to accomplish its job. I looked around and couldn’t find any other plugins that seem to do anything close to this. I ended up deciding to make the plugin a rails engine and whipped up a rake task to install the appropriate migrations and plugins. I’ve seen some plugins with pretty hairy set-up, and I think that a single rake task (rake freetaggable:install
) is pretty straight forward. My friend Stefan might disagree with me about using plugins within other plugins, but I think in this case it works pretty well.
Since getting things nicely packaged as a plugin I’ve begun integerating the plugin into my fork of the cohort project. This process will ultimately be one that either takes a really long time, or a really short time. At this point I’m thinking somewhere in between the two lengths, but anything could turn up. So far I’ve trudged through migrations and have the application launching with PostgreSQL. Without a full set of integration tests I’m forced to manually test paths and actions until I find methods missing (usually just name differences, sometimes missing altogether) or view problems. I’ve come against a few so far and they seem to be generally straight forward to fix; the only problem I am having is adding new properly tested features to the plugin is a bit of a pain once it’s been moved to a plugin (I do have a “test” app I use though).