Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

speed up gem updates

  • Loading branch information...
commit 8c6c17cad7ec9914f853dd322e7d1abbf0389b2b 1 parent 7401e63
@seamusabshere seamusabshere authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 vagrant/chef-repo/cookbooks/0_vagrant_main/recipes/default.rb
View
10 vagrant/chef-repo/cookbooks/0_vagrant_main/recipes/default.rb
@@ -227,6 +227,7 @@ def network?
if network?
::RVM_RUBY_VERSIONS.each do |v|
+ updates = Array.new
gem_installs.each do |name, ruby_version, gem_version|
if ruby_version == 'all' or ruby_version =~ v
execute "install gem #{name} version #{gem_version} in ruby version #{v}" do
@@ -235,13 +236,14 @@ def network?
not_if "rvm #{v} gem list --installed #{name}#{" --version \"#{gem_version}\"" unless gem_version == 'latest'}"
end
if gem_version == 'latest'
- execute "checking latest version of #{name} in ruby version #{v}" do
- user 'vagrant'
- command "rvm #{v} gem update #{name} --no-rdoc --no-ri"
- end
+ updates << name
end
end
end
+ execute "checking latest versions of #{updates.length} gems in ruby version #{v}" do
+ user 'vagrant'
+ command "rvm #{v} gem update #{updates.join(',')} --no-rdoc --no-ri"
+ end
end
end

0 comments on commit 8c6c17c

Please sign in to comment.
Something went wrong with that request. Please try again.