lib/berkshelf/source.rb in berkshelf-3.2.3 vs lib/berkshelf/source.rb in berkshelf-3.2.4
- old
+ new
@@ -51,10 +51,10 @@
# @return [Array<APIClient::RemoteCookbook]
def search(name)
universe
.select { |cookbook| cookbook.name =~ Regexp.new(name) }
.group_by(&:name)
- .collect { |name, versions| versions.max_by(&:version) }
+ .collect { |name, versions| versions.max_by { |v| Semverse::Version.new(v.version) } }
end
# Determine if this source is a "default" source, as defined in the
# {Berksfile}.
#