aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compat
diff options
context:
space:
mode:
authorBrewTestBot2015-08-03 13:09:07 +0100
committerMike McQuaid2015-08-03 13:22:35 +0100
commit13d544e11e92ba8ea3788723432046f8dfe4adf9 (patch)
treee6da18436d9ce956e6fbe80e3185c67cf3b58808 /Library/Homebrew/compat
parent3b68215be793774fafd9ce124a2065f5968f50e5 (diff)
downloadbrew-13d544e11e92ba8ea3788723432046f8dfe4adf9.tar.bz2
Core files style updates.
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/compat')
-rw-r--r--Library/Homebrew/compat/fails_with_llvm.rb4
-rw-r--r--Library/Homebrew/compat/formula.rb12
-rw-r--r--Library/Homebrew/compat/formula_specialties.rb8
-rw-r--r--Library/Homebrew/compat/hardware.rb2
-rw-r--r--Library/Homebrew/compat/version.rb2
5 files changed, 15 insertions, 13 deletions
diff --git a/Library/Homebrew/compat/fails_with_llvm.rb b/Library/Homebrew/compat/fails_with_llvm.rb
index 2222a33e6..2c7df721d 100644
--- a/Library/Homebrew/compat/fails_with_llvm.rb
+++ b/Library/Homebrew/compat/fails_with_llvm.rb
@@ -1,10 +1,10 @@
class Formula
- def fails_with_llvm msg=nil, data=nil
+ def fails_with_llvm(_msg = nil, _data = nil)
opoo "Calling fails_with_llvm in the install method is deprecated"
puts "Use the fails_with DSL instead"
end
- def self.fails_with_llvm msg=nil, data={}
+ def self.fails_with_llvm(msg = nil, data = {})
data = msg if Hash === msg
fails_with(:llvm) { build(data.delete(:build).to_i) }
end
diff --git a/Library/Homebrew/compat/formula.rb b/Library/Homebrew/compat/formula.rb
index c790abc45..ee948572e 100644
--- a/Library/Homebrew/compat/formula.rb
+++ b/Library/Homebrew/compat/formula.rb
@@ -16,7 +16,7 @@ class Formula
"-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev"
end
- def cxxstdlib_check check_type
+ def cxxstdlib_check(check_type)
self.class.cxxstdlib_check check_type
end
@@ -44,16 +44,18 @@ class Formula
define_method(:require_universal_deps?) { true }
end
- def self.path name
+ def self.path(name)
Formulary.core_path(name)
end
DATA = :DATA
- def patches; {} end
+ def patches
+ {}
+ end
- def python(options={}, &block)
- opoo 'Formula#python is deprecated and will go away shortly.'
+ def python(_options = {}, &block)
+ opoo "Formula#python is deprecated and will go away shortly."
block.call if block_given?
PythonRequirement.new
end
diff --git a/Library/Homebrew/compat/formula_specialties.rb b/Library/Homebrew/compat/formula_specialties.rb
index 96673fdea..f082b00d9 100644
--- a/Library/Homebrew/compat/formula_specialties.rb
+++ b/Library/Homebrew/compat/formula_specialties.rb
@@ -3,7 +3,7 @@
# See chcase for an example
class ScriptFileFormula < Formula
def install
- bin.install Dir['*']
+ bin.install Dir["*"]
end
end
@@ -21,14 +21,14 @@ class AmazonWebServicesFormula < Formula
# Use this method to peform a standard install for Java-based tools,
# keeping the .jars out of HOMEBREW_PREFIX/lib
def install
- rm Dir['bin/*.cmd'] # Remove Windows versions
- libexec.install Dir['*']
+ rm Dir["bin/*.cmd"] # Remove Windows versions
+ libexec.install Dir["*"]
bin.install_symlink Dir["#{libexec}/bin/*"] - ["#{libexec}/bin/service"]
end
alias_method :standard_install, :install
# Use this method to generate standard caveats.
- def standard_instructions home_name, home_value=libexec
+ def standard_instructions(home_name, home_value = libexec)
<<-EOS.undent
Before you can use these tools you must export some variables to your $SHELL.
diff --git a/Library/Homebrew/compat/hardware.rb b/Library/Homebrew/compat/hardware.rb
index 550c10118..3013ed3b7 100644
--- a/Library/Homebrew/compat/hardware.rb
+++ b/Library/Homebrew/compat/hardware.rb
@@ -1,7 +1,7 @@
class Hardware
class << self
def is_32_bit?
- not CPU.is_64_bit?
+ !CPU.is_64_bit?
end
def is_64_bit?
diff --git a/Library/Homebrew/compat/version.rb b/Library/Homebrew/compat/version.rb
index 027df9fc3..0762d3694 100644
--- a/Library/Homebrew/compat/version.rb
+++ b/Library/Homebrew/compat/version.rb
@@ -1,5 +1,5 @@
class Version
- def slice *args
+ def slice(*args)
opoo "Calling slice on versions is deprecated, use: to_s.slice"
to_s.slice(*args)
end