diff options
| author | Mike McQuaid | 2017-05-29 19:22:46 +0100 | 
|---|---|---|
| committer | GitHub | 2017-05-29 19:22:46 +0100 | 
| commit | 744e7dd1907aaf6493e6e4622a5997b562bfbf17 (patch) | |
| tree | bbc05eebc29bdb6d539cd0e9d197b3762b49ffce /Library/Homebrew/dev-cmd | |
| parent | 3165fd2519c41a2be7e12442a5098d3b699fda04 (diff) | |
| parent | 7a38bab333c6808022fe53aac2be9ca2e329cd53 (diff) | |
| download | brew-744e7dd1907aaf6493e6e4622a5997b562bfbf17.tar.bz2 | |
Merge pull request #2679 from MikeMcQuaid/parallel-rubocop
Use parallel RuboCop
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 | 8 | 
4 files changed, 9 insertions, 17 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 d90326768..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 @@ -91,12 +89,12 @@ module Homebrew        end        args = ["-I", HOMEBREW_LIBRARY_PATH/"test"] -      args += %w[ +      args += %W[          --color          --require spec_helper          --format progress          --format ParallelTests::RSpec::RuntimeLogger -        --out tmp/parallel_runtime_rspec.log +        --out #{HOMEBREW_CACHE}/tests/parallel_runtime_rspec.log        ]        args << "--seed" << ARGV.next if ARGV.include? "--seed"  | 
