Changeset 1736
- Timestamp:
- 08/28/08 17:07:21 (4 months ago)
- Files:
-
- coldbox/trunk/CodeDepot/interceptors/com/ortussolutions/deployment/Deploy.cfc (modified) (1 diff)
- coldbox/trunk/system/config/settings.xml (modified) (1 diff)
- coldbox/trunk/system/frameworkSupertype.cfc (modified) (2 diffs)
- coldbox/trunk/system/interceptors/environmentControl.cfc (modified) (1 diff)
- coldbox/trunk/system/interceptors/security.cfc (modified) (1 diff)
- coldbox/trunk/system/plugins/ioc.cfc (modified) (1 diff)
- coldbox/trunk/system/plugins/logger.cfc (modified) (1 diff)
- coldbox/trunk/system/plugins/resourceBundle.cfc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
coldbox/trunk/CodeDepot/interceptors/com/ortussolutions/deployment/Deploy.cfc
r1729 r1736 20 20 21 21 - tagFile : config/_deploy.tag [required] 22 - cleanupCommandObject : The class path of the cleanup command object to use [optional]. Must implement 23 an init(controller) and an execute() method. 22 - deployCommandObject : The class path of the deploy command object to use [optional]. Must implement 23 an init(controller) and an execute() method. This command object will be executed before the framework 24 reinit bit is set. 24 25 25 26 -----------------------------------------------------------------------> coldbox/trunk/system/config/settings.xml
r1699 r1736 7 7 <Setting name="AuthorWebsite" value="http://www.coldboxframework.com"/> 8 8 <Setting name="Suffix" value="FAITH"/> 9 <Setting name="Version" value="2.6. 1"/>9 <Setting name="Version" value="2.6.2"/> 10 10 <Setting name="Description" value="This is the ColdBox ColdFusion Framework for web applications."/> 11 11 <Setting name="ModifyLogLocation" value="readme.txt"/> coldbox/trunk/system/frameworkSupertype.cfc
r1617 r1736 235 235 236 236 <!------------------------------------------- UTILITY METHODS -------------------------------------------> 237 238 <!--- locateFilePath ---> 239 <cffunction name="locateFilePath" output="false" access="private" returntype="string" hint="Locate the real path location of a file in a coldbox application. 3 checks: 1) inside of coldbox app, 2) expand the path, 3) Absolute location. If path not found, it returns an empty path"> 240 <cfargument name="pathToCheck" type="string" required="true" hint="The path to check"/> 241 <cfscript> 242 var foundPath = ""; 243 var appRoot = controller.getAppRootPath(); 244 245 //Check 1: Inside of App Root 246 if ( fileExists(appRoot & arguments.pathToCheck) ){ 247 foundPath = appRoot & arguments.pathToCheck; 248 } 249 //Check 2: Expand the Path 250 else if( fileExists( ExpandPath(arguments.pathToCheck) ) ){ 251 foundPath = ExpandPath( arguments.pathToCheck ); 252 } 253 //Check 3: Absolute Path 254 else if( fileExists( arguments.pathToCheck ) ){ 255 foundPath = arguments.pathToCheck; 256 } 257 258 //Return 259 return foundPath; 260 </cfscript> 261 </cffunction> 237 262 238 263 <!--- cfhtml head facade ---> … … 289 314 </cffunction> 290 315 316 <!--- Rethrow Facade ---> 317 <cffunction name="rethrowit" access="public" returntype="void" hint="Rethrow facade" output="false" > 318 <cfargument name="throwObject" required="true" type="any" hint="The cfcatch object"> 319 <cfthrow object="#arguments.throwObject#"> 320 </cffunction> 321 291 322 <!--- Abort Facade ---> 292 323 <cffunction name="abort" access="private" hint="Facade for cfabort" returntype="void" output="false"> coldbox/trunk/system/interceptors/environmentControl.cfc
r1533 r1736 30 30 <cfscript> 31 31 var configFile = ""; 32 var appRoot = getController().getAppRootPath();33 34 /* Clean app root */35 if( right(appRoot,1) neq getSetting("OSFileSeparator",true) ){36 appRoot = appRoot & getSetting("OSFileSeparator",true);37 }38 32 39 / /Verify that the configFile propety is set33 /* Verify that the configFile propety is set */ 40 34 if( not propertyExists('configFile') ){ 41 35 throw("Config File property does not exist. Please declare it.",'','interceptors.environmentControl.configFilePropertyNotDefined'); 42 36 } 43 //Test if the file exists AS RELATIVE 44 if ( fileExists(appRoot & getProperty('configFile')) ){ 45 configFile = appRoot & getProperty('configFile'); 46 } 47 /* Test as expanded relative */ 48 else if( fileExists( ExpandPath(getProperty('configFile')) ) ){ 49 configFile = ExpandPath( getProperty('configFile') ); 50 } 51 /* Test as absolute */ 52 else if( fileExists( getProperty('configFile') ) ){ 53 configFile = getProperty('configFile'); 54 } 55 else{ 37 /* Try to locate the path */ 38 configFile = locateFilePath(getProperty('configFile')); 39 /* Validate it */ 40 if( len(configFile) eq 0 ){ 56 41 throw('Config File could not be located: #getProperty('configFile')#. Please check again.','','interceptors.environmentControl.configFileNotFound'); 57 42 } coldbox/trunk/system/interceptors/security.cfc
r1606 r1736 287 287 var x=1; 288 288 var node = ""; 289 var appRoot = getController().getAppRootPath(); 290 291 /* Clean app root */ 292 if( right(appRoot,1) neq getSetting("OSFileSeparator",true) ){ 293 appRoot = appRoot & getSetting("OSFileSeparator",true); 294 } 295 296 //Test if the file exists 297 if ( fileExists(appRoot & getProperty('rulesFile')) ){ 298 rulesFile = appRoot & getProperty('rulesFile'); 299 } 300 /* Expanded Relative */ 301 else if( fileExists( ExpandPath(getProperty('rulesFile')) ) ){ 302 rulesFile = ExpandPath( getProperty('rulesFile') ); 303 } 304 /* Absolute Path */ 305 else if( fileExists( getProperty('rulesFile') ) ){ 306 rulesFile = getProperty('rulesFile'); 307 } 308 else{ 289 290 /* Try to locate the file path */ 291 rulesFile = locateFilePath(getProperty('rulesFile')); 292 /* Validate Location */ 293 if( len(rulesFile) eq 0 ){ 309 294 throw('Security Rules File could not be located: #getProperty('rulesFile')#. Please check again.','','interceptors.security.rulesFileNotFound'); 310 295 } 296 311 297 /* Set the correct expanded path now */ 312 298 setProperty('rulesFile',rulesFile); coldbox/trunk/system/plugins/ioc.cfc
r1735 r1736 222 222 <cffunction name="validateDefinitionFile" access="private" output="false" returntype="void" hint="Validate the IoC Definition File. Called internally to verify the file location and get the correct path to it."> 223 223 <cfscript> 224 var appRoot = getController().getAppRootPath(); 225 226 /* Clean app root */ 227 if( right(appRoot,1) neq getSetting("OSFileSeparator",true) ){ 228 appRoot = appRoot & getSetting("OSFileSeparator",true); 229 } 230 231 /* Relative App Path Check */ 232 if( fileExists(appRoot & getIOCDefinitionFile()) ){ 233 setExpandedIOCDefinitionFile( appRoot & getIOCDefinitionFile() ); 234 } 235 /* Expand Path Check */ 236 else if( fileExists( expandPath(getIOCDefinitionFile()) ) ){ 237 setExpandedIOCDefinitionFile( ExpandPath(getIOCDefinitionFile()) ); 238 } 239 /* Absolute Path Check */ 240 else if( fileExists(getIOCDefinitionFile()) ){ 241 setExpandedIOCDefinitionFile( getIOCDefinitionFile() ); 242 } 243 else{ 224 var foundFilePath = ""; 225 226 /* Try to locate the path */ 227 foundFilePath = locateFilePath(getIOCDefinitionFile()); 228 /* Validate it */ 229 if( len(foundFilePath) eq 0 ){ 244 230 throw("The definition file: #getIOCDefinitionFile()# does not exist. Please check your path","","ColdBox.plugins.ioc.InvalidDefitinionFile"); 245 231 } 232 /* Save the found location path */ 233 setExpandedIOCDefinitionFile( foundFilePath ); 246 234 </cfscript> 247 235 </cffunction> coldbox/trunk/system/plugins/logger.cfc
r1602 r1736 367 367 <!--- Create the default log directory ---> 368 368 <cffunction name="createDefaultLogDirectory" access="private" hint="Creates the default log directory." output="false" returntype="void"> 369 <cfset var DefaultLogDirectory = getSetting("ApplicationPath",1) & getSetting(" OSFileSeparator",1) & getSetting("DefaultLogDirectory",1)>369 <cfset var DefaultLogDirectory = getSetting("ApplicationPath",1) & getSetting("DefaultLogDirectory",1)> 370 370 <!--- Check if the directory already exists ---> 371 371 <cfif not directoryExists(DefaultLogDirectory)> coldbox/trunk/system/plugins/resourceBundle.cfc
r1654 r1736 115 115 var thisMSG = ""; 116 116 var keys = ""; 117 var appRoot = getController().getAppRootPath();118 117 var rbFilePath = arguments.rbFile & "_#arguments.rbLocale#.properties"; 119 118 var rbFullPath = rbFilePath; 120 121 /* Clean app root */ 122 if( right(appRoot,1) neq getSetting("OSFileSeparator",true) ){ 123 appRoot = appRoot & getSetting("OSFileSeparator",true); 119 120 /* Try to locate the path */ 121 rbFullPath = locateFilePath(rbFilePath); 122 /* Validate Location */ 123 if( len(rbFullPath) eq 0 ){ 124 throw("The resource bundle file: #rbFilePath# does not exist. Please check your path","","ColdBox.plugins.resourceBundle.InvalidBundlePath"); 124 125 } 125 /* Absolute Path Check */126 if( not fileExists(rbFullPath) ){127 /* Relative App Path Check */128 if( fileExists(appRoot & rbFilePath) ){129 rbFullPath = appRoot & rbFilePath;130 }131 /* Expand Path Check */132 else if( fileExists( expandPath(rbFilePath) ) ){133 rbFullPath = ExpandPath(rbFilePath);134 }135 else{136 throw("The resource bundle file: #rbFullPath# does not exist. Please check your path","","ColdBox.plugins.resourceBundle.InvalidBundlePath");137 }138 }139 126 140 127 //Load Instance
