class TrustyCms::ExtensionPath
def self.from_path(path, name=nil)
If two arguments are given, the second is taken to be the full extension name.
ExtensionLoader, to load and activate the extension.
is returned, and also remembered here for later use by the initializer (to find load paths) and the
stripping the extra bits from radiant-something-extension-1.0.0 to leave just 'something'. The object
Builds a new ExtensionPath object from the supplied path, working out the name of the extension by
def self.from_path(path, name=nil) name = path if name.blank? name = File.basename(name).gsub(/^trusty-|-extension(-[\d\.a-z]+|-[a-z\d]+)*$/, '') new(:name => name, :path => path) end