aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorXu Cheng2015-08-22 13:15:33 +0800
committerXu Cheng2015-08-22 13:15:33 +0800
commita88c40b8c888064f6514cf0646ea2140e2578d57 (patch)
tree73a31c1fd0b6984ccc8ea43fdfa242ad53c8cea8 /Library/Homebrew/cmd
parent3d1f9e0a9c6185b470630c29e44714ac2d050371 (diff)
downloadbrew-a88c40b8c888064f6514cf0646ea2140e2578d57.tar.bz2
core file style update
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/audit.rb2
-rw-r--r--Library/Homebrew/cmd/cleanup.rb2
-rw-r--r--Library/Homebrew/cmd/doctor.rb2
-rw-r--r--Library/Homebrew/cmd/update.rb3
4 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 49396224b..ca76c1c53 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -374,7 +374,7 @@ class FormulaAuditor
problem "Description should use \"command-line\" instead of \"#{$1}\""
end
- if desc =~ %r[^([Aa]n?)\s]
+ if desc =~ /^([Aa]n?)\s/
problem "Please remove the indefinite article \"#{$1}\" from the beginning of the description"
end
end
diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb
index f9203c68d..0561510cb 100644
--- a/Library/Homebrew/cmd/cleanup.rb
+++ b/Library/Homebrew/cmd/cleanup.rb
@@ -133,7 +133,7 @@ module Homebrew
workers.map(&:join)
end
- def prune?(path, options={})
+ def prune?(path, options = {})
@time ||= Time.now
path_modified_time = path.mtime
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 97e31a8e2..910aedc52 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -864,7 +864,7 @@ class Checks
# https://help.github.com/articles/https-cloning-errors
`git --version`.chomp =~ /git version ((?:\d+\.?)+)/
- if $1 && Version.new($1) < Version.new("1.7.10") then
+ if $1 && Version.new($1) < Version.new("1.7.10")
git_upgrade_cmd = Formula["git"].any_version_installed? ? "upgrade" : "install"
<<-EOS.undent
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb
index d9cecf5d5..33c7c49ae 100644
--- a/Library/Homebrew/cmd/update.rb
+++ b/Library/Homebrew/cmd/update.rb
@@ -71,7 +71,8 @@ module Homebrew
user, repo, oldname = oldname.split("/", 3)
newname = newname.split("/", 3).last
else
- user, repo = "homebrew", "homebrew"
+ user = "homebrew"
+ repo = "homebrew"
end
next unless (dir = HOMEBREW_CELLAR/oldname).directory? && !dir.subdirs.empty?