diff options
author | Tim Smith <tsmith@chef.io> | 2020-12-18 17:35:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-18 17:35:04 -0800 |
commit | dae4fbe3cf2b753db8e0b9a33a0dc4b868561312 (patch) | |
tree | baca4e772525d206aef44e23c0c1ff3882390ad6 /lib/chef | |
parent | b8381407ce358a2c9008e763be8c5b6ecac2fb1e (diff) | |
parent | 6feba9dfd43cf917369757d27c0db894b4077f66 (diff) | |
download | chef-dae4fbe3cf2b753db8e0b9a33a0dc4b868561312.tar.gz |
Merge pull request #10379 from chef/rubygems_18
Chef 17: Assume Rubygems 1.8 in the rubygems provider / specs
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/provider/package/rubygems.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index 9ac1e7d31b..a0b569b8e3 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -72,7 +72,6 @@ class Chef # A rubygems specification object containing the list of gemspecs for all # available gems in the gem installation. # Implemented by subclasses - # For rubygems >= 1.8.0 # # @return [Gem::Specification] # @@ -107,10 +106,8 @@ class Chef # This isn't sorting before returning because the only code that # uses this method calls `max_by` so it doesn't need to be sorted. stubs - elsif rubygems_version >= Gem::Version.new("1.8.0") + else # >= rubygems 1.8 behavior gem_specification.find_all_by_name(gem_dep.name, gem_dep.requirement) - else - gem_source_index.search(gem_dep) end end |