After many false starts, I decided that I really needed to wrap my head around unit testing when writing Rails applications. I more or less completed a Rails 1.2.3 application without any formal tests, and I would like to upgrade it to 2.0.2 and make it RESTful in the process. At the same time, I’ve moved from a Windows development environment to a *nix one after installing Xubuntu on my laptop (an old Compaq Presario). I’ve also switched from Cream to Emacs. Despite my Windows desktop being more than twice as fast as my laptop, I just could not stand not being in a true *nix environment. Too much of the Windows idiosyncrasies got on my nerves. And my switch from Cream to Emacs was because I just didn’t like the instability of the hacks required to make Vim less of a modal editor. If I tire of Emacs, I may try pure Vim instead, but I remember installing Cream simply because I didn’t like pure Vim to start with. So with these various changes going on with my Rails programming environment, I figured it was an ideal time to learn to formally test my applications. Of course the first part is setting up the testing environment so that it is easy to use, stays out of your way, and is informative.
Read the rest of this entry »
Share This
Inspired by a couple of articles and even a screencast, I wrote a short batch file that creates a Rails application and automatically loads it into a subversion repository. It works by first creating a temp folder, generating the rails app there, renaming the app folder to trunk, creating the accompanying branches and tags folder, and then deleting/renaming a bunch of non-essential files. Once that’s done it imports the three folders into a specified subversion repository. Once the import is complete, the temp folder is deleted and then the trunk is checked out. Finally it cleans-up by copying the database.yml file and ignoring the tmp and log folders. That’s it.
Read the rest of this entry »
Share This
I currently develop on a Windows machine. (You can cut the snickering.) Therefore, I don’t have the pleasure of using TextMate. I’m also avoiding IDEs as a matter of course when an editor and CLI often avoids the bloat and subsequently works faster. I first used Scite which shipped with InstantRails. I quickly moved over to jEdit when I switched to Rails on Cygwin. With the right set of plugins you can quickly and easily get a TextMate-like editor. I decided to give Vim/GVim a try when I saw it in action. As much as I liked the raw power, things just didn’t make sense to me. When you learn to use editors a certain way, it’s hard to break old habits. Enter Cream.
Read the rest of this entry »
Share This
The UI on a project of mine had to be resizable. The UI included a script.aculo.us slider which unfortunately did not have a resize method nor was it smart enough to update itself should the underlying element be resized. So I created the following extension:
Read the rest of this entry »
Share This