From 78603a24f687b75e5487953f9212667e14cba8d2 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 10 Sep 2016 10:38:35 +0100 Subject: [PATCH 1/4] language/haskell: fix Rubocop warnings. --- Library/Homebrew/language/haskell.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/language/haskell.rb b/Library/Homebrew/language/haskell.rb index 87725e9181..b5d0e1220b 100644 --- a/Library/Homebrew/language/haskell.rb +++ b/Library/Homebrew/language/haskell.rb @@ -72,7 +72,7 @@ module Language end def install_cabal_package(*args) - options = if args[-1].kind_of?(Hash) then args.pop else {} end + options = args[-1].is_a?(Hash) ? args.pop : {} cabal_sandbox do cabal_install_tools(*options[:using]) if options[:using] From bde8d69d6e1129530fa2bbe1e88cf88e350521af Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 10 Sep 2016 10:38:35 +0100 Subject: [PATCH 2/4] language/node: fix Rubocop warnings. --- Library/Homebrew/language/node.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/language/node.rb b/Library/Homebrew/language/node.rb index 15a2ddc100..ab2206a5b4 100644 --- a/Library/Homebrew/language/node.rb +++ b/Library/Homebrew/language/node.rb @@ -21,7 +21,7 @@ module Language setup_npm_environment # tell npm to not install .brew_home by adding it to the .npmignore file # (or creating a new one if no .npmignore file already exists) - open(".npmignore", "a") { |f| f.write( "\n.brew_home\n") } + open(".npmignore", "a") { |f| f.write("\n.brew_home\n") } # npm install args for global style module format installed into libexec ["--verbose", "--global", "--prefix=#{libexec}", "."] end From 16be0f105ed3eef07133cdd09e48e562b85b7697 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 10 Sep 2016 10:38:35 +0100 Subject: [PATCH 3/4] language/python: fix Rubocop warnings. --- Library/Homebrew/language/python.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/language/python.rb b/Library/Homebrew/language/python.rb index eb06756387..95259c8411 100644 --- a/Library/Homebrew/language/python.rb +++ b/Library/Homebrew/language/python.rb @@ -187,12 +187,11 @@ module Language # Robustify symlinks to survive python3 patch upgrades @venv_root.find do |f| next unless f.symlink? - if (rp = f.realpath.to_s).start_with? HOMEBREW_CELLAR - python = rp.include?("python3") ? "python3" : "python" - new_target = rp.sub %r{#{HOMEBREW_CELLAR}/#{python}/[^/]+}, Formula[python].opt_prefix - f.unlink - f.make_symlink new_target - end + next unless (rp = f.realpath.to_s).start_with? HOMEBREW_CELLAR + python = rp.include?("python3") ? "python3" : "python" + new_target = rp.sub %r{#{HOMEBREW_CELLAR}/#{python}/[^/]+}, Formula[python].opt_prefix + f.unlink + f.make_symlink new_target end end From ba852444131d021b1190cb670b038b78818229fb Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 10 Sep 2016 10:38:35 +0100 Subject: [PATCH 4/4] language/python_virtualenv_constants: fix Rubocop warnings. --- Library/Homebrew/language/python_virtualenv_constants.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/language/python_virtualenv_constants.rb b/Library/Homebrew/language/python_virtualenv_constants.rb index 23dbe1f723..c8b71aa85a 100644 --- a/Library/Homebrew/language/python_virtualenv_constants.rb +++ b/Library/Homebrew/language/python_virtualenv_constants.rb @@ -1,2 +1,2 @@ -PYTHON_VIRTUALENV_URL = "https://files.pythonhosted.org/packages/5c/79/5dae7494b9f5ed061cff9a8ab8d6e1f02db352f3facf907d9eb614fb80e9/virtualenv-15.0.2.tar.gz" -PYTHON_VIRTUALENV_SHA256 = "fab40f32d9ad298fba04a260f3073505a16d52539a84843cf8c8369d4fd17167" +PYTHON_VIRTUALENV_URL = "https://files.pythonhosted.org/packages/5c/79/5dae7494b9f5ed061cff9a8ab8d6e1f02db352f3facf907d9eb614fb80e9/virtualenv-15.0.2.tar.gz".freeze +PYTHON_VIRTUALENV_SHA256 = "fab40f32d9ad298fba04a260f3073505a16d52539a84843cf8c8369d4fd17167".freeze