aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2013-06-05 09:47:08 -0700
committerAdam Vandenberg2013-06-05 09:48:12 -0700
commitd9a96734097f23249104f0af36ef32b59829f545 (patch)
tree898d84d4e4a80ccdde1eaed6c0ded032d48bbd92 /Library
parent150370dcc6c7fcabd75aa20945b7bb21b309dda1 (diff)
downloadhomebrew-d9a96734097f23249104f0af36ef32b59829f545.tar.bz2
Consolidate formula visibility blocks
Closes #20261.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb58
1 files changed, 28 insertions, 30 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index ed251f6b0..ead132bbf 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -548,6 +548,33 @@ class Formula
end
+ # For brew-fetch and others.
+ def fetch
+ # Ensure the cache exists
+ HOMEBREW_CACHE.mkpath
+ downloader.fetch
+ cached_download
+ end
+
+ # For FormulaInstaller.
+ def verify_download_integrity fn
+ active_spec.verify_download_integrity(fn)
+ end
+
+ def test
+ ret = nil
+ mktemp do
+ @testpath = Pathname.pwd
+ ret = instance_eval(&self.class.test)
+ @testpath = nil
+ end
+ ret
+ end
+
+ def test_defined?
+ not self.class.instance_variable_get(:@test_defined).nil?
+ end
+
protected
# Pretty titles the command and buffers stdout/stderr
@@ -613,35 +640,6 @@ class Formula
end if removed_ENV_variables
end
- public
-
- # For brew-fetch and others.
- def fetch
- # Ensure the cache exists
- HOMEBREW_CACHE.mkpath
- downloader.fetch
- cached_download
- end
-
- # For FormulaInstaller.
- def verify_download_integrity fn
- active_spec.verify_download_integrity(fn)
- end
-
- def test
- ret = nil
- mktemp do
- @testpath = Pathname.pwd
- ret = instance_eval(&self.class.test)
- @testpath = nil
- end
- ret
- end
-
- def test_defined?
- not self.class.instance_variable_get(:@test_defined).nil?
- end
-
private
def stage
@@ -685,8 +683,8 @@ class Formula
end
end
+ # The methods below define the formula DSL.
class << self
- # The methods below define the formula DSL.
attr_rw :homepage, :keg_only_reason, :skip_clean_all, :cc_failures
attr_rw :plist_startup, :plist_manual