From 0a3530ecd9201a96fa872f40c9c5392817dbbe79 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 30 Jan 2013 21:25:49 -0800 Subject: Add ruby/rake functions to use system framework version. --- Library/Homebrew/formula.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 47a2a4d11..1df4d4284 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -290,6 +290,18 @@ class Formula ] end + def ruby_bin + '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin' + end + + def rake *args + system "#{ruby_bin}/rake", *args + end + + def ruby + system "#{ruby_bin}/ruby", *args + end + def self.class_s name #remove invalid characters and then camelcase it name.capitalize.gsub(/[-_.\s]([a-zA-Z0-9])/) { $1.upcase } \ -- cgit v1.2.3