Skip to content

Commit

Permalink
Now rvm_global_gem respects version attr in global.gems file.
Browse files Browse the repository at this point in the history
References #63
  • Loading branch information
fnichol committed Jan 21, 2012
1 parent c079b85 commit f40939f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion providers/global_gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ def gem_package_wrapper(exec_action, ruby_global_gemset)
#
# @oaram [Symbol] action to :create or :remove the gem from the file
def update_global_gems_file(exec_action)
gem = new_resource.package_name
gem = if new_resource.version
"#{new_resource.package_name} -v#{new_resource.version}"
else
new_resource.package_name
end
user_dir = Etc.getpwnam(new_resource.user).dir if new_resource.user
global_gems_file = if new_resource.user
"#{user_dir}/.rvm/gemsets/global.gems"
Expand Down

0 comments on commit f40939f

Please # to comment.