chef-cookbooks / rubygems

Configures Rubygems sources and provides rubygems_api resource
https://supermarket.chef.io/cookbooks/rubygems
Apache License 2.0
5 stars 14 forks source link

[QUESTION] Do I need to reload Gem configuration with this cookbook? #15

Closed ghost closed 7 years ago

ghost commented 7 years ago

Cookbook version

1.0.4

Chef-client version

12 & 13

Platform Details

All

Question

I had written a rubygems cookbook for my own personal use based on the instructions https://docs.chef.io/resource_gem_package.html#specify-with-gemrc-file in which after the gemrc file was written, I did the following:

ruby_block 'refresh_gemrc' do
  action :nothing
  block do
    Gem.configuration = Gem::ConfigFile.new []
  end
end

I cannot find it within this code but does this cookbook care for this detail?

ghost commented 7 years ago

Apparently I think I got my answer according to this: https://github.com/chef/chef/issues/6130

Additionally since Chef 13, I did not know it was possible in client.rb to specify rubygems_url 'https://whatever'. I am wondering if this is worth documenting?

iennae commented 7 years ago

It looks like you got your answer on the question. I have gotten the setting documented to the website.