What we're listening to:
Jared

The Hold Steady:
Heaven Is Whenever
Jeff

Paper Route:
Absence

Had issue today with autospec never stopping, and found this article, but I did have the autotest-rails gem installed.  Thanks to Mario Aquino’s article here, I learned that you can pass -v to autospec/autotest and it will print out what triggered it to run.  My culprit was rerun.txt, and then I found buried in the Cucumber documentation:

If you find that autotest runs your features continuously, your features may be changing a file which autotest is monitoring as they run. Use a setting like this to ignore such files. You’ll likely need to set autotest to ignore “rerun.txt” as well.

So, to your project’s .autotest or at ~/.autotest, add something like this:

Autotest.add_hook :initialize do |at|
%w{.svn .hg .git vendor rerun.txt}.each {|exception| at.add_exception(exception)}
end

At least, that’s what my ~/.autotest has, and after adding rerun.txt in there, everything is good.

Hopefully this will help someone else googling for the same thing I was with no luck.

wordpress now playing plugin

October 20th, 2009

We love music around here, which is why we’re always showing off what were listening too over on the left. Some time ago I automated the process of looking up album artwork using the Amazon API and posting it on or blog.

This approach has a couple advantages over things like last.fm, like being able to select exactly what you want shown, and automatic linking to amazon for affiliate commissions.

I’ve packaged everything up into a wordpress plugin and put it on my github page here:  http://github.com/jaredmoody/wp_now_playing

It also comes with a nice applescript so you can submit what’s currently playing to your blog with a single click:

I’d love some feedback on it, and patches are also more than welcome.

Please report any issues on the github page, thanks!

I hadn’t done this before and everywhere I googled suggested using a custom interpolation to replace :basename in the default :path and :url params to has_attached_file

The problem with this is 1. the actual image_file_name column in the database doesn’t get replaced 2 whatever you put in your interpolation function gets run every time the image url gets generated.

The answer is just rename the image_file_name before the model gets saved.

I couldn’t find this anywhere, but pieced it out from the article on riding rails:

sudo env ARCHFLAGS="-arch x86_64" gem install id3lib-ruby