Merge pull request #911 from MikeMcQuaid/language-rubocop

Fix Library/Homebrew/language RuboCop warnings
This commit is contained in:
Mike McQuaid 2016-09-11 17:55:03 +01:00 committed by GitHub
commit a70f8b9c30
4 changed files with 9 additions and 10 deletions

View File

@ -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]

View File

@ -187,14 +187,13 @@ 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
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
end
# Installs packages represented by `targets` into the virtualenv.
# @param targets [String, Pathname, Resource,

View File

@ -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