Created
July 31, 2011 08:58
-
-
Save rip747/1116619 to your computer and use it in GitHub Desktop.
cfwheels api doc generation... idea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent extends="Controller"> | |
<cffunction name="index"> | |
<cfsetting showdebugoutput="false"> | |
<cfset releasesDir ="#get('rootpath')##get('filePath')#/releases"> | |
<cfdirectory action="list" directory="#expandPath(releasesDir)#" filter="*.zip" name="releases"> | |
<cfloop query="releases"> | |
<cfset version = ListToArray(name, ".")> | |
<cfset ArrayDeleteAt(version, 1)> | |
<cfset ArrayDeleteAt(version, ArrayLen(version))> | |
<cfset version = ArrayToList(version, ".")> | |
<!--- can't have "." in directory ---> | |
<cfset versionDashed = ReplaceNoCase(version, ".", "-", "all")> | |
<cfset unZipDir = ListAppend(releasesDir, versionDashed, "/")> | |
<cfset zipfile = ListAppend(releasesDir, name, "/")> | |
<cfset wheelsDir = ListAppend(unZipDir, "wheels", "/")> | |
<cfset wheelsComponentPath = ListAppend(ListChangeDelims(unZipDir, "/", "."), "wheels", ".")> | |
<cfset loc.function = model("function")> | |
<cfzip action="unzip" destination="#expandPath(unZipDir)#" file="#expandPath(zipfile)#" overwrite="true"> | |
<cfdirectory action="list" directory="#expandPath(wheelsDir)#" name="components" filter="*.cfc"> | |
<cfloop query="components"> | |
<cfset objName = ListFirst(name, '.')> | |
<cfif !ListFindNoCase("connection,test", objName)> | |
<cfset obj = createobject("component", "#wheelsComponentPath#.#objName#")> | |
<cfset loc.function.generateFunctionsFromScope(obj, version)> | |
</cfif> | |
</cfloop> | |
</cfloop> | |
</cffunction> | |
</cfcomponent> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment