Created
October 15, 2010 18:43
-
-
Save ktheory/628713 to your computer and use it in GitHub Desktop.
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
# In attribute file: | |
my_gem_packages = [ | |
"nokigiri", # Only a gem name, without a version requirement or other options" | |
["bundler", "=1.0.0"], # A gem with a version requirement | |
["rails", "~>2.3.9", "--no-ri --no-rdoc --source http://rubygems.org"], # A gem with a version requirement and options" | |
["json", nil, "--source http://rubygems.org"] # Gem with options but no version requirement | |
] | |
# In recipe: | |
my_gem_packages.each do |name, ver, opts| | |
gem_package(name) do | |
action :install | |
version ver if ver | |
options opts if opts | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment