diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-03-19 13:20:32 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-03-23 13:55:01 -0700 |
commit | dd9e9cd97682a528875c16d774048d6d48cd07f0 (patch) | |
tree | 9b3b447bb5e74bd53937152e58acfac973f2c225 | |
parent | ea4a811b568df951eecb4f711a02f7b2de90c390 (diff) | |
download | chef-dd9e9cd97682a528875c16d774048d6d48cd07f0.tar.gz |
Fix comment documenting include_default_source? function.fix-clear-sources
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r-- | lib/chef/provider/package/rubygems.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index 7416b9e28b..fd93affd97 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -484,11 +484,11 @@ class Chef end ## - # TODO: Fix comment - # If `clear_sources` is nil, clearing sources is implied if a `source` - # was added or if the global rubygems URL is set. If `clear_sources` - # is not nil, it has been set explicitly on the resource and its value - # should be used. + # If `include_default_source` is nil, return true if the global + # `rubygems_url` was set or if `clear_sources` and `source` on the + # resource are not set. + # If `include_default_source` is not nil, it has been set explicitly on + # the resource and that value should be used. def include_default_source? if new_resource.include_default_source.nil? !!Chef::Config[:rubygems_url] || !(new_resource.source || new_resource.clear_sources) |