Aliases, Growl & Rspec

August 17, 2007 @ 02:01 PM | posted by carmelyne

(last updated: 08.17.07)

New tools new tool new tools

1. Aliases in bash

I'm a mac newbie. It sounds like a bad thing but it's not. Many moons ago, I only watched people type ss on their terminals and tada! it magically starts the built in webrick/mongrel server. I've been meaning to get aliases working since I converted but never got around to actually doing it. Thankfully, John Nunemaker posted his I Can Has Command Line? article. I can do bash magic now. My bash talk: ss sc a e et sup wu omg inbd idk my bff jill tinf! I think I'll use those for shortcuts anyway. ;p

2. Growl

I am a happy peepcoder. I recently saw the RSPEC Basics PeepCode. Geoffrey had a happy face/ sad face flashing bar on his screen when he would run tests. Oh, I so want. I want! You'll just have to buy the peepcode now, dont you? Anyway, it was Growl. I installed Growl but can't get it to work with autotest. Now I just do "a" to run autotest but I get this error: "177 examples, 0 failures sh: line 1: growlnotify: command not found". Obviously, I missed something here. I copied the .autotest file to ~
I'm off to search for a fix and will post it here too as an update.....

Update:

I knew I was missing something. I had to install growlnotify that came with the install files. (http://growl.info/documentation/growlnotify.php). I got my happy/sad bars now!

3.RSpec

New to RSpec and would you hold it against me if I said lazy with writing test? Ok then no, I love writing tests!!! Learning RSpec makes it easier to do test. I find that I do like BDD. I'm no expert but it's very fun to do, that I can say.

[ Last updated: August 17, 2007 @ 02:26 PM ]

Sorry, comments are closed for this article.

Snippets of 06/24/07

Rails 'A'..'Z' Paginate

1
2
3
4
5
6
7
8
9
10
11
# Starts with 'A'..'Z' Paginate / model
def self.sort(sort)
  if sort
    find(:all, :conditions => ['name LIKE ?', "#{sort}%"])
  else
    find(:all, :order => 'name')
  end  
end

# index action / controller
@models = Model.sort(params[:sort]) 
RailsConf 2006
I heart devChix