Skip to content

Instantly share code, notes, and snippets.

@ktheory
Created October 15, 2010 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ktheory/628713 to your computer and use it in GitHub Desktop.
Save ktheory/628713 to your computer and use it in GitHub Desktop.
# 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