Move ruby methods to FileUtils extension
This commit is contained in:
parent
2dac10a711
commit
ea15442b9a
@ -81,4 +81,13 @@ module FileUtils extend self
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
RUBY_BIN = '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin'
|
||||||
|
|
||||||
|
def rake *args
|
||||||
|
system "#{RUBY_BIN}/rake", *args
|
||||||
|
end
|
||||||
|
|
||||||
|
def ruby *args
|
||||||
|
system "#{RUBY_BIN}/ruby", *args
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -289,18 +289,6 @@ class Formula
|
|||||||
]
|
]
|
||||||
end
|
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 *args
|
|
||||||
system "#{ruby_bin}/ruby", *args
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.class_s name
|
def self.class_s name
|
||||||
#remove invalid characters and then camelcase it
|
#remove invalid characters and then camelcase it
|
||||||
name.capitalize.gsub(/[-_.\s]([a-zA-Z0-9])/) { $1.upcase } \
|
name.capitalize.gsub(/[-_.\s]([a-zA-Z0-9])/) { $1.upcase } \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user