Created
November 28, 2012 12:11
-
-
Save mlafeldt/4160812 to your computer and use it in GitHub Desktop.
Add github method to Cheffile (similar to Berkshelf's github shortcut)
This file contains hidden or 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
| # vi: set ft=ruby : | |
| def github(user, repo, protocol = :git) | |
| prefix = { | |
| :git => 'git://github.com/', | |
| :ssh => 'git@github.com:', | |
| :https => 'https://github.com/' | |
| }[protocol] | |
| "#{prefix}#{user}/#{repo}.git" | |
| end | |
| cookbook 'apt', :git => github('opscode-cookbooks', 'apt') | |
| cookbook 'rbenv', :git => github('fnichol', 'chef-rbenv') | |
| cookbook 'ruby_build', :git => github('fnichol', 'chef-ruby_build') | |
| cookbook 'ruby', :git => github('Bigpoint', 'ruby', protocol = :ssh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment