Allow formula names with '+' in them

HFS+ handles the + fine. However the Ruby class name needs a s/+/x/g.

I acknowledge that supporting + will make it harder to port to certain other
filesystems. However that's your challenge! :D
This commit is contained in:
Max Howell 2009-10-19 01:43:57 +01:00
parent 06e16bff7d
commit 53d6f617d7

View File

@ -181,7 +181,7 @@ class Formula
def self.class_s name
#remove invalid characters and camelcase
name.capitalize.gsub(/[-_\s]([a-zA-Z0-9])/) { $1.upcase }
name.capitalize.gsub(/[-_\s]([a-zA-Z0-9])/) { $1.upcase }.gsub('+', 'x')
end
def self.factory name