Merge pull request #4082 from MikeMcQuaid/rubocop-0.55.0

RuboCop 0.55.0.
This commit is contained in:
Mike McQuaid 2018-04-17 11:16:09 +01:00 committed by GitHub
commit a5849cb100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -22,7 +22,7 @@ module Hbc
end
path = if timestamp == :latest
Pathname.glob(metadata_versioned_path(version: version).join("*")).sort.last
Pathname.glob(metadata_versioned_path(version: version).join("*")).max
else
timestamp = new_timestamp if timestamp == :now
metadata_versioned_path(version: version).join(timestamp)

View File

@ -52,7 +52,7 @@ module Homebrew
end
def option_to_description(*names)
names.map { |name| name.to_s.sub(/\A--?/, "").tr("-", " ") }.sort.last
names.map { |name| name.to_s.sub(/\A--?/, "").tr("-", " ") }.max
end
def parse(cmdline_args = ARGV)

View File

@ -1,5 +1,5 @@
# frozen_string_literal: true
# RuboCop version used for `brew style` and `brew cask style`
HOMEBREW_RUBOCOP_VERSION = "0.54.0"
HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.18.1" # has to be updated when RuboCop version changes
HOMEBREW_RUBOCOP_VERSION = "0.55.0"
HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.19.0" # has to be updated when RuboCop version changes

View File

@ -1131,7 +1131,7 @@ class Formula
return false unless old_rack.directory?
return false if old_rack.subdirs.empty?
tap == Tab.for_keg(old_rack.subdirs.sort.first).tap
tap == Tab.for_keg(old_rack.subdirs.min).tap
end
# @private

View File

@ -129,7 +129,7 @@ class Keg
f_kegs = kegs_by_source[[f.name, f.tap]]
next unless f_kegs
f_kegs.sort_by(&:version).last
f_kegs.max_by(&:version)
end.compact
next if required_kegs.empty?