Changeset 191

Show
Ignore:
Timestamp:
06/14/06 20:47:10 (3 years ago)
Author:
scorfield
Message:

Fixes #72 by removing development-parse-only, renaming development-no-load (to development-circuit-load), adding development-full-load and deprecating development mode.

Location:
fusebox5
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • fusebox5/fusebox5.cfm

    r189 r191  
    182182</cftry> 
    183183<!--- 
    184         must special case development-no-load mode since it causes circuits to reload during 
     184        must special case development-circuit-load mode since it causes circuits to reload during 
    185185        the compile (post-load) phase and therefore must be exclusive 
    186186---> 
     
    188188        <cfset request._fuseboxLog.trace("Fusebox","Compiling requested fuseaction '#attributes.fuseaction#'") /> 
    189189</cfif> 
    190 <cfif _fba.mode is "development-no-load"> 
     190<cfif _fba.mode is "development-circuit-load"> 
    191191        <cflock name="#application.ApplicationName#_fusebox_#FUSEBOX_APPLICATION_KEY#" type="exclusive" timeout="300"> 
    192192                <cfset _parsedFileData = _fba.compileRequest(attributes.fuseaction,myFusebox) /> 
  • fusebox5/fuseboxApplication.cfc

    r190 r191  
    494494                                        detail="You specified a Circuit of #arguments.circuit# which is not defined." /> 
    495495                </cfif> 
    496                 <!--- FB5: development-no-load only reloads the requested circuit ---> 
    497                 <cfif this.mode is "development-no-load"> 
     496                <!--- FB5: development-circuit-load only reloads the requested circuit ---> 
     497                <cfif this.mode is "development-circuit-load"> 
    498498                        <!--- FB5: ensure we only reload each circuit once per request ---> 
    499499                        <cfif not structKeyExists(request._fuseboxCircuitsLoaded,arguments.circuit)> 
     
    657657                        </cfif> 
    658658                        <cfset alias = children[i].xmlAttributes.alias /> 
    659                         <!--- record each circuit load per request - optimization for development-no-load mode ---> 
     659                        <!--- record each circuit load per request - optimization for development-circuit-load mode ---> 
    660660                        <cfset request._fuseboxCircuitsLoaded[alias] = true /> 
    661661                        <cfif structKeyExists(previousCircuits,alias) and 
  • fusebox5/myFusebox.cfc

    r190 r191  
    6565        this.parameters = structNew(); 
    6666         
    67         // the basic default is development mode   
     67        // the basic default is development-full-load mode: 
    6868        this.parameters.load = true; 
     69        this.parameters.parse = true; 
     70        this.parameters.execute = true; 
     71        // FB5: new execution parameters: 
    6972        this.parameters.clean = false;          // don't delete parsed files by default 
    70         this.parameters.parse = true; 
    7173        this.parameters.parseall = false;       // don't compile all fuseactions by default 
    72         this.parameters.execute = true; 
    7374           
    7475        this.parameters.userProvidedLoadParameter = false; 
     
    102103                <cfif structKeyExists(theFusebox,"mode")> 
    103104                        <cfswitch expression="#theFusebox.mode#"> 
     105                        <!--- FB41 backward compatibility - now deprecated ---> 
    104106                        <cfcase value="development"> 
     107                                <cfif structKeyExists(theFusebox,"strictMode") and theFusebox.strictMode> 
     108                                        <!--- since we don't load fusebox.xml if we throw an exception, we must fixup the value for the next run ---> 
     109                                        <cfset theFusebox.mode = "development-full-load" /> 
     110                                        <cfthrow type="fusebox.badGrammar.deprecated"  
     111                                                        message="Deprecated feature" 
     112                                                        detail="'development' is a deprecated execution mode - use 'development-full-load' instead." /> 
     113                                </cfif> 
    105114                                <cfset this.parameters.load = true /> 
    106115                                <cfset this.parameters.parse = true /> 
    107116                                <cfset this.parameters.execute = true /> 
    108117                        </cfcase> 
    109                         <!--- FB5: new option - loading is slower so it's worth not loading everything ---> 
    110                         <cfcase value="development-no-load"> 
    111                                 <cfset this.parameters.load = false /> 
     118                        <!--- FB5: replacement for old development mode ---> 
     119                        <cfcase value="development-full-load"> 
     120                                <cfset this.parameters.load = true /> 
    112121                                <cfset this.parameters.parse = true /> 
    113122                                <cfset this.parameters.execute = true /> 
    114123                        </cfcase> 
    115                         <!--- FB5: new option - loading is slower so it's worth having a parse-only mode ---> 
    116                         <cfcase value="development-parse-only"> 
     124                        <!--- FB5: new option - does not load fusebox.xml and therefore does not (re-)load fuseboxApplication object ---> 
     125                        <cfcase value="development-circuit-load"> 
    117126                                <cfset this.parameters.load = false /> 
    118127                                <cfset this.parameters.parse = true /> 
     
    124133                                <cfset this.parameters.execute = true /> 
    125134                        </cfcase> 
     135                        <cfdefaultcase> 
     136                                <!--- since we don't load fusebox.xml if we throw an exception, we must fixup the value for the next run ---> 
     137                                <cfset theFusebox.mode = "development-full-load" /> 
     138                                <cfthrow type="fusebox.badGrammar.invalidParameterValue"  
     139                                                message="Parameter has invalid value"  
     140                                                detail="The parameter 'mode' must be one of 'development-full-load', 'development-circuit-load' or 'production' in the fusebox.xml file." /> 
     141                        </cfdefaultcase> 
    126142                        </cfswitch> 
    127143                </cfif> 
  • fusebox5/skeleton/fusebox.xml.cfm

    r186 r191  
    1717        <parameters> 
    1818                <parameter name="defaultFuseaction" value="app.welcome" /> 
    19                 <!-- you probably want to change this to development mode: --> 
    20                 <parameter name="mode" value="development-no-load" /> 
     19                <!-- you may want to change this to development-full-load mode: --> 
     20                <parameter name="mode" value="development-circuit-load" /> 
    2121                <!-- change this to something more secure: --> 
    2222                <parameter name="password" value="skeleton" />