Skip to content

Commit

Permalink
Add gem version option to gems attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
madwork committed Nov 21, 2018
1 parent 745ca19 commit a740b04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ See [attributes/default.rb](attributes/default.rb)
"id": "ruby-2.3.4",
"url": "https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.4.tar.gz",
"checksum": "98e18f17c933318d0e32fed3aea67e304f174d03170a38fd920c4fbe49fec0c3",
"gems": ["bundler"],
"gems": ["bundler 1.17.1"],
"environment": {
"ARCHFLAGS": "-arch x86_64",
"CFLAGS": "-g -O2",
Expand All @@ -228,7 +228,7 @@ Edit data bag `ruby-2.3.4.json`
"id": "ruby-2.3.4",
"url": "https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.4.tar.gz",
"checksum": "98e18f17c933318d0e32fed3aea67e304f174d03170a38fd920c4fbe49fec0c3",
"gems": ["bundler"],
"gems": ["bundler 1.17.1"],
"environment": {
"ARCHFLAGS": "-arch x86_64",
"CFLAGS": "-g -O2",
Expand Down
6 changes: 4 additions & 2 deletions recipes/rubies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@
mode "0644"
end

rubie['gems'].each do |gem_name|
rubie['gems'].each do |gem|
gem_name, gem_version = gem.split(' ')
gem_package gem_name do
gem_binary("chruby-exec #{rubie['id']} -- gem")
gem_binary "chruby-exec #{rubie['id']} -- gem"
version gem_version if gem_version
end
end
end
Expand Down

0 comments on commit a740b04

Please sign in to comment.