Posts tagged with "Ruby"

Berksfile Magic

The Berksfile is really one of the most magical compontents of Berkshelf - a cookbook dependency manager for Chef. As a core team member, I sometimes take for granted the extensibility of Berkshelf, so I decided to blog about some patterns! Because the Berksfil...

Spice up your recipes with Chef Sugar

A few months ago, I was having a discussion with some colleagues internally and CHEF-494 came up. In short, the ticket was created by Seth Chisamore and proposed creating a core cookbook that included some useful primitives for common patterns:

Authorizers, Extractors, and Policy objects

Recently I was working on a Rails 4 project, and much to my surprise, my favorite authorization framework is not supported! CanCan had long been my "go-to" framework for its simplicty and readability. I started searching the Internet for alternative gems, but m...

Unit Testing Correctly

Let's talk about testing. Testing is fun, it's awesome, and if you want to be agile, it's a necessity. But chances are, you're doing it wrong. Before we dive into Chef, let's look at a small Ruby example. Consider a class writes a downloads an HTML page from a ...

Install Ruby 2.0.rc1

Ruby 2.0 is no longer a work in progress! Ruby 2.0 Release Candidate 1 was released today! Here's how to get it: Install Homebrew: ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)" Make sure brew is up to date: brew update Install rbenv, ruby-build, and ...

Install Ruby 2.0 Preview 2

Ruby 2.0 is still a work in progress, but it's already at preview 2. If you're looking to play with it, here are some steps to install Ruby 2.0 Preview 2 on Mac OSX Mountain Lion (and older OSX versions) Install Homebrew: ruby -e "$(curl -fsSkL raw.github.com/m...