diff options
| author | Mike McQuaid | 2017-05-29 18:24:52 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2017-05-29 18:43:18 +0100 |
| commit | 7a38bab333c6808022fe53aac2be9ca2e329cd53 (patch) | |
| tree | bbc05eebc29bdb6d539cd0e9d197b3762b49ffce /Library/Homebrew/dev-cmd | |
| parent | 4356016b4a1c2eaba02680b4ad7f1747d2df53bf (diff) | |
| download | brew-7a38bab333c6808022fe53aac2be9ca2e329cd53.tar.bz2 | |
Fixup all RuboCop warnings.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/dev-cmd/bottle.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/dev-cmd/edit.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/dev-cmd/tests.rb | 4 |
4 files changed, 7 insertions, 15 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index b79d8bb42..d1665ea6f 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -591,9 +591,7 @@ class FormulaAuditor def audit_homepage homepage = formula.homepage - if homepage.nil? || homepage.empty? - return - end + return if homepage.nil? || homepage.empty? return unless @online @@ -988,9 +986,7 @@ class FormulaAuditor problem ":apr is deprecated. Usage should be \"apr-util\"" end - if line =~ /depends_on :tex/ - problem ":tex is deprecated" - end + problem ":tex is deprecated" if line =~ /depends_on :tex/ if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+:(lua|perl|python|ruby)(\d*)/ problem "#{$2} modules should be vendored rather than use deprecated `depends_on \"#{$1}\" => :#{$2}#{$3}`" diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 8d3038a5a..e301cc423 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -314,8 +314,8 @@ module Homebrew old_spec = f.bottle_specification if ARGV.include?("--keep-old") && !old_spec.checksums.empty? - mismatches = [:root_url, :prefix, :cellar, :rebuild].select do |key| - old_spec.send(key) != bottle.send(key) + mismatches = [:root_url, :prefix, :cellar, :rebuild].reject do |key| + old_spec.send(key) == bottle.send(key) end mismatches.delete(:cellar) if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation unless mismatches.empty? @@ -382,9 +382,7 @@ module Homebrew bottle = BottleSpecification.new bottle.root_url bottle_hash["bottle"]["root_url"] cellar = bottle_hash["bottle"]["cellar"] - if cellar == "any" || cellar == "any_skip_relocation" - cellar = cellar.to_sym - end + cellar = cellar.to_sym if ["any", "any_skip_relocation"].include?(cellar) bottle.cellar cellar bottle.prefix bottle_hash["bottle"]["prefix"] bottle.rebuild bottle_hash["bottle"]["rebuild"] diff --git a/Library/Homebrew/dev-cmd/edit.rb b/Library/Homebrew/dev-cmd/edit.rb index df5bc0605..a8612fc63 100644 --- a/Library/Homebrew/dev-cmd/edit.rb +++ b/Library/Homebrew/dev-cmd/edit.rb @@ -21,7 +21,7 @@ module Homebrew # If no brews are listed, open the project root in an editor. if ARGV.named.empty? editor = File.basename which_editor - if editor == "mate" || editor == "subl" + if ["mate", "subl"].include?(editor) # If the user is using TextMate or Sublime Text, # give a nice project view instead. exec_editor HOMEBREW_REPOSITORY+"bin/brew", diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index f434868b6..08f77c648 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -60,9 +60,7 @@ module Homebrew end Homebrew.install_gem_setup_path! "bundler" - unless quiet_system("bundle", "check") - system "bundle", "install" - end + system "bundle", "install" unless quiet_system("bundle", "check") parallel = true |
