I'm feeling really stupid for not discovering this sooner—a Spotlight importer for Ruby source files. Now I can search inside source for methods, classes, and the contents of comments. My only concern so far is the volume of stuff being indexed, but time will tell...





You'll want to watch out for external drives that you keep backups on (spotlight will index them and you'll start to get duplicate entries showing up in your search) If you want to disable indexing, it's easy enough though with the spotlight metadata util (though the option for this behaviour for removable media SHOULD have been put into the preference panel IMO):
# Turn off indexing
sudo mdutil -i off /Volumes/[Archive Drive]
# Erase existing spotlight data
sudo mdutil -E /Volumes/[Archive Drive]
Posted by: Jeremy Sydik | December 13, 2007 at 08:29 AM
My coworker had a huge problem with this importer consuming gobs of resources any time he saved a file in textmate. I believe it is PowerPC architecture only.
No PowerPC processes on my Leopard!
Posted by: justin | December 13, 2007 at 09:52 AM
Jeremy: Apple seems to have only the 0.1 version, but 0.2 is now a universal binary and claims to have fewer memory issues: http://www.arcadianvisions.com/downloads/RubyImporter.html
Posted by: Jeff | December 13, 2007 at 02:03 PM
I still don't have a Mac (I'm waiting for Christmas or the upcoming Macworld), so I have a stupid question: isn't it possible to just teach Spotlight to index Ruby source files as simple text files? Doesn't it alreay index simple text files? The screenshot shows a lot of metadata... too much for my taste...
Posted by: emanuele | December 14, 2007 at 02:30 AM