diff options
author | Prajakta Purohit <prajakta@opscode.com> | 2016-04-19 12:37:05 -0700 |
---|---|---|
committer | Prajakta Purohit <prajakta@opscode.com> | 2016-04-21 10:23:35 -0700 |
commit | 87c6582638a2357af39e100da8d41aa77d00f083 (patch) | |
tree | 4463dd69e7fc9bff74b37cde40a8d0d072557365 /lib/chef/provider | |
parent | b37b683c624ce598643669167dfcbb56086c14ed (diff) | |
download | chef-87c6582638a2357af39e100da8d41aa77d00f083.tar.gz |
Update rubygems provider to support local install of gems if so specifiedksubrama+praj/FLOW-298/local_gem
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/package/rubygems.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index 39eff19bd0..a15ee1bdea 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -517,7 +517,9 @@ class Chef install_via_gem_command(name, version) end elsif @new_resource.gem_binary.nil? - @gem_env.install(@new_resource.source) + # domain is used by Gem::DependencyInstaller rather than by Chef code + # domain can be :local, :remote or :both + @gem_env.install(@new_resource.source, domain: :local) else install_via_gem_command(name, version) end @@ -531,6 +533,7 @@ class Chef def install_via_gem_command(name, version) if @new_resource.source =~ /\.gem$/i name = @new_resource.source + src = " --local" unless source_is_remote? elsif @new_resource.clear_sources src = " --clear-sources" src << (@new_resource.source && " --source=#{@new_resource.source}" || "") |