diff options
| author | Markus Reiter | 2017-02-03 11:54:38 +0100 | 
|---|---|---|
| committer | Markus Reiter | 2017-02-12 23:06:35 +0100 | 
| commit | f48857d24657c2cf9c8d01c781ba270cff52c8a0 (patch) | |
| tree | f82ccce7c70a0ad46cc9a1538e2063ee7922c22a | |
| parent | 93724c0645f59ccdb4b4bf34f701957bacb5e45a (diff) | |
| download | brew-f48857d24657c2cf9c8d01c781ba270cff52c8a0.tar.bz2 | |
Use constants for RuboCop version.
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/style.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/style.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/config.rb | 4 | 
3 files changed, 6 insertions, 4 deletions
| diff --git a/Library/Homebrew/cask/lib/hbc/cli/style.rb b/Library/Homebrew/cask/lib/hbc/cli/style.rb index cdcc135b8..d3e44382d 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/style.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/style.rb @@ -23,12 +23,10 @@ module Hbc          $CHILD_STATUS.success?        end -      RUBOCOP_CASK_VERSION = "~> 0.10.6".freeze -        def install_rubocop          Utils.capture_stderr do            begin -            Homebrew.install_gem_setup_path! "rubocop-cask", RUBOCOP_CASK_VERSION, "rubocop" +            Homebrew.install_gem_setup_path! "rubocop-cask", HOMEBREW_RUBOCOP_CASK_VERSION, "rubocop"            rescue SystemExit              raise CaskError, Tty.strip_ansi($stderr.string).chomp.sub(/\AError: /, "")            end diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb index 586c6da6b..3d12561c1 100644 --- a/Library/Homebrew/cmd/style.rb +++ b/Library/Homebrew/cmd/style.rb @@ -47,7 +47,7 @@ module Homebrew    def check_style_impl(files, output_type, options = {})      fix = options[:fix] -    Homebrew.install_gem_setup_path! "rubocop", "0.47.1" +    Homebrew.install_gem_setup_path! "rubocop", HOMEBREW_RUBOCOP_VERSION      args = %w[        --force-exclusion diff --git a/Library/Homebrew/config.rb b/Library/Homebrew/config.rb index 38d7c8043..9831b0af8 100644 --- a/Library/Homebrew/config.rb +++ b/Library/Homebrew/config.rb @@ -48,3 +48,7 @@ end  # Load path used by standalone scripts to access the Homebrew code base  HOMEBREW_LOAD_PATH = HOMEBREW_LIBRARY_PATH + +# RuboCop version used for `brew style` and `brew cask style` +HOMEBREW_RUBOCOP_VERSION = "0.47.1".freeze +HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.10.6".freeze # has to be updated when RuboCop version changes | 
