diff options
| author | Mike McQuaid | 2013-01-30 21:25:49 -0800 |
|---|---|---|
| committer | Mike McQuaid | 2013-01-30 21:29:19 -0800 |
| commit | 6555c0a2605a5db184e245f6fb7fd494dfb76ec6 (patch) | |
| tree | f5b35d6e8d1835d1614a4872262461ff6954d1a8 /Library | |
| parent | 8ab7cf827d0668a7a14697e5509cd22f4ddfa8e6 (diff) | |
| download | homebrew-6555c0a2605a5db184e245f6fb7fd494dfb76ec6.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 } \ |
