aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorMax Howell2009-07-31 02:51:17 +0100
committerMax Howell2009-07-31 04:59:02 +0100
commit9b19f194cc964222b47d0ef66bb7d08fdbc67e4f (patch)
tree6bc267fd5af3776bfc14b474abdd2184a478204a /Library/Homebrew/formula.rb
parent7f3e8bc36a8591e118abfe451c63e6e5dd9155bd (diff)
downloadbrew-9b19f194cc964222b47d0ef66bb7d08fdbc67e4f.tar.bz2
Refactor $foo into HOMEBREW_FOO
CONSTANTS are the far saner choice for these important parameters. Split env up so I can redefine the CONSTANTS in unittest.rb.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index ad975ef00..f2763f899 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -15,8 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with Homebrew. If not, see <http://www.gnu.org/licenses/>.
-require 'env'
-
class BuildError <RuntimeError
def initialize cmd
super "Build failed during: #{cmd}"
@@ -76,7 +74,7 @@ class AbstractFormula
def prefix
raise "@name.nil!" if @name.nil?
raise "@version.nil?" if @version.nil?
- $cellar+@name+@version
+ HOMEBREW_CELLAR+@name+@version
end
def bin
prefix+'bin'
@@ -239,7 +237,7 @@ class Formula <UnidentifiedFormula
end
def self.path name
- $formula+(name.downcase+'.rb')
+ Pathanme.new(HOMEBREW_PREFIX)+'Formula'+(name.downcase+'.rb')
end
def self.create name