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
commit118b41bfcdb13a4fec8da48e35de162ac62fe65c (patch)
treec9fdffd72da6a8a53b5fac4529aefaf7f7df4129 /Library/Homebrew/formula.rb
parent1d4e18988019e14e90646018072f83e988531820 (diff)
downloadhomebrew-118b41bfcdb13a4fec8da48e35de162ac62fe65c.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