diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-02 10:36:36 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-09 09:16:06 -0800 |
commit | 1d063284f755b996a6563d7210496afd716a9f2d (patch) | |
tree | 52d7ad076704b5ca12c62d02933827a85e4a9801 /lib | |
parent | aa74c0ac58393e9186c2ebecbc3144c2c8d2ee85 (diff) | |
download | chef-1d063284f755b996a6563d7210496afd716a9f2d.tar.gz |
make rubygems.org configurable
for bonus points gem_package will pick this up as well.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/cookbook/gem_installer.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/package/rubygems.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/cookbook/gem_installer.rb b/lib/chef/cookbook/gem_installer.rb index fa6dccfa4f..c0330f6c46 100644 --- a/lib/chef/cookbook/gem_installer.rb +++ b/lib/chef/cookbook/gem_installer.rb @@ -47,7 +47,7 @@ class Chef unless cookbook_gems.empty? begin inline_gemfile do - source "https://rubygems.org" + source Chef::Config[:rubygems_url] cookbook_gems.each do |args| gem *args end diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index 7a2db6b32b..6b01927d50 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -535,7 +535,7 @@ class Chef src = " --clear-sources" src << (@new_resource.source && " --source=#{@new_resource.source}" || "") else - src = @new_resource.source && " --source=#{@new_resource.source} --source=https://rubygems.org" + src = @new_resource.source && " --source=#{@new_resource.source} --source=#{Chef::Config[:rubygems_url]}" end if !version.nil? && version.length > 0 shell_out_with_timeout!("#{gem_binary_path} install #{name} -q --no-rdoc --no-ri -v \"#{version}\"#{src}#{opts}", :env => nil) |