aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-01-30 21:25:49 -0800
committerMike McQuaid2013-01-30 21:29:19 -0800
commit0a3530ecd9201a96fa872f40c9c5392817dbbe79 (patch)
tree0be42bd4da419928d1e1aa4c8a69161bae917a03 /Library
parent58bc3b80545b7d5a18e96b6a1d02bfd6aba97970 (diff)
downloadbrew-0a3530ecd9201a96fa872f40c9c5392817dbbe79.tar.bz2
Add ruby/rake functions to use system framework version.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb12
1 files changed, 12 insertions, 0 deletions
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 } \