diff options
| author | Mike McQuaid | 2013-01-30 21:25:49 -0800 |
|---|---|---|
| committer | Mike McQuaid | 2013-01-30 21:29:19 -0800 |
| commit | 0a3530ecd9201a96fa872f40c9c5392817dbbe79 (patch) | |
| tree | 0be42bd4da419928d1e1aa4c8a69161bae917a03 /Library | |
| parent | 58bc3b80545b7d5a18e96b6a1d02bfd6aba97970 (diff) | |
| download | brew-0a3530ecd9201a96fa872f40c9c5392817dbbe79.tar.bz2 | |
Add ruby/rake functions to use system framework version.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 12 |
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 } \ |
