aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/unittest.rb
diff options
context:
space:
mode:
authorMax Howell2009-09-04 15:28:18 +0100
committerMax Howell2009-09-16 14:49:06 +0100
commitc28bd7b57193c808f896c0f2a0eac20e8fd075bb (patch)
treec8958503c4ae1017b3404ad013877e38c360d882 /Library/Homebrew/unittest.rb
parentfd5ed391be80b4170efa9d34ab47b011c94f9e54 (diff)
downloadbrew-c28bd7b57193c808f896c0f2a0eac20e8fd075bb.tar.bz2
Allow formulae to use __END__
For this to work the "running script" must be the formulae file. Making this so wasn't so hard, there is now an install.rb script which is included with the -r flag to the ruby executable. An at_exit handler calls the install function. Having the install logic in its own file made it feel like there was so much space that I added extra error handling. So there is something to be said for separating functionality out into its own files. Still the error handling sucks, we'll need to marshall the exception back to the bin/brew command. Which is another PITA. Still overall I think this will prove worthwhile. But if it doesn't we'll revert. As a first usage, you can put a diff after __END__ and return DATA from Formula::patches to make Homebrew aware of it.
Diffstat (limited to 'Library/Homebrew/unittest.rb')
-rwxr-xr-xLibrary/Homebrew/unittest.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/unittest.rb b/Library/Homebrew/unittest.rb
index 15b0dc3cf..8d5f1b76f 100755
--- a/Library/Homebrew/unittest.rb
+++ b/Library/Homebrew/unittest.rb
@@ -14,7 +14,7 @@ require 'utils'
require 'brew.h'
require 'hardware.rb'
-# these are defined in bin/brew, but we don't want to break our actual
+# these are defined in global.rb, but we don't want to break our actual
# homebrew tree, and we do want to test everything :)
HOMEBREW_PREFIX=Pathname.new '/tmp/testbrew/prefix'
HOMEBREW_CACHE=HOMEBREW_PREFIX.parent+"cache"