This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def 'chef installed' do | |
requires 'chef', 'ohai' | |
define_var :server_name, :default => shell('hostname -f') | |
# this needs to go somewhere, like ~/solo.rb | |
solo_rb = %Q{ | |
file_cache_path "/tmp/chef-solo" | |
cookbook_path "/tmp/chef-solo/cookbooks" | |
recipe_url "http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def number_to_ordinal num | |
int = num.to_i | |
int.to_s + ((10...20) === int) ? "th" : (%w{th st nd rd}[int % 10] or "th") | |
end |
NewerOlder