Monthly Archives: January 2011
Tap before you squash
Tap is a pretty awesome ruby method I recently discovered.
Let’s say I have the following request:
post '/api/v1/users/',
params.merge(:sig =>
Authentication.calculate(TestAuthData.secret_access_key,params.to_query)
).to_json
I realize [...]
RSpec 2, Sinatra and Mongoid example
I spent yesterday coding a very abbreviated version of an authentication service that uses Sinatra, Mongoid and RSpec 2. It took more than a couple hours because there are so many outdated code samples on the web that just don’t work. I put my code up on github for people to see. [...]

More cool stuff with ruby’s tap method