@@ -18,17 +18,17 @@ component excludeFromHelp=true {
1818 // we could also test for the existence of /wheels/dbmigrate, but that only gives us the major version.
1919 string function $getWheelsVersion (){
2020 // First, look for a wheels folder..
21- if (! directoryExists ( fileSystemUtil .resolvePath (" wheels" ) ) ){
21+ if (! directoryExists ( fileSystemUtil .resolvePath (" vendor/ wheels" ) ) ){
2222 error (" We're currently looking in #getCWD () #, but can't find a /wheels/ folder?" );
2323 }
24- if (fileExists (fileSystemUtil .resolvePath (" wheels/box.json" ))){
25- var output = command ( ' cd wheels' ).run ( returnOutput = true );
24+ if (fileExists (fileSystemUtil .resolvePath (" vendor/ wheels/box.json" ))){
25+ var output = command ( ' cd vendor\ wheels' ).run ( returnOutput = true );
2626 local .boxJSON = packageService .readPackageDescriptorRaw ( getCWD () );
2727 var output = command ( ' cd ../' ).run ( returnOutput = true );
2828 return local .boxJSON .version ;
29- } else if (fileExists (fileSystemUtil .resolvePath (" wheels/events/onapplicationstart.cfm" ))) {
30- var output = command ( ' cd wheels' ).run ( returnOutput = true );
31- local .target = fileSystemUtil .resolvePath (" events/onapplicationstart.cfm" );
29+ } else if (fileExists (fileSystemUtil .resolvePath (" vendor/ wheels/events/onapplicationstart.cfm" ))) {
30+ var output = command ( ' cd vendor\ wheels' ).run ( returnOutput = true );
31+ local .target = fileSystemUtil .resolvePath (" app/ events/onapplicationstart.cfm" );
3232 local .content = fileRead (local .target );
3333 local .content = listFirst (mid (local .content , (find (' application.$wheels.version' ,local .content )+ 31 ),20 ),' "' );
3434 var output = command ( ' cd ../' ).run ( returnOutput = true );
@@ -83,10 +83,10 @@ component excludeFromHelp=true {
8383 // Inject CLI content into template
8484 function $injectIntoView (required struct objectNames , required string property , required string type , string action = " input" ){
8585 if (arguments .action EQ " input" ){
86- local .target = fileSystemUtil .resolvePath (" views/#objectNames .objectNamePlural #/_form.cfm" );
86+ local .target = fileSystemUtil .resolvePath (" app/ views/#objectNames .objectNamePlural #/_form.cfm" );
8787 local .inject = $generateFormField (objectname = objectNames .objectNameSingular , property = arguments .property , type = arguments .type );
8888 } else if (arguments .action EQ " output" ){
89- local .target = fileSystemUtil .resolvePath (" views/#objectNames .objectNamePlural #/show.cfm" );
89+ local .target = fileSystemUtil .resolvePath (" app/ views/#objectNames .objectNamePlural #/show.cfm" );
9090 local .inject = $generateOutputField (objectname = objectNames .objectNameSingular , property = arguments .property , type = arguments .type );
9191 }
9292 local .content = fileRead (local .target );
@@ -101,7 +101,7 @@ component excludeFromHelp=true {
101101
102102 // Inject CLI content into index template
103103 function $injectIntoIndex (required struct objectNames , required string property , required string type ){
104- local .target = fileSystemUtil .resolvePath (" views/#objectNames .objectNamePlural #/index.cfm" );
104+ local .target = fileSystemUtil .resolvePath (" app/ views/#objectNames .objectNamePlural #/index.cfm" );
105105 local .thead = " <th>#helpers .capitalize (arguments .property ) #</th>" ;
106106 local .tbody = " <td>" & cr & " ~[~#arguments .property #~]~" & cr & " </td>" ;
107107
@@ -208,7 +208,7 @@ component excludeFromHelp=true {
208208 }
209209
210210 // Wheels folder in expected place? (just a good check to see if the user has actually installed wheels...)
211- var wheelsFolder = fileSystemUtil .resolvePath (" wheels" );
211+ var wheelsFolder = fileSystemUtil .resolvePath (" vendor/ wheels" );
212212 if (! directoryExists (wheelsFolder )){
213213 error (" We can't find your wheels folder. Check you have installed CFWheels, and you're running this from the site root: If you've not started an app yet, try wheels new myApp" );
214214 }
@@ -223,12 +223,12 @@ component excludeFromHelp=true {
223223 // Wheels 2.x has dbmigrate + dbmigratebridge equivalents in core
224224 if ($isWheelsVersion (1 , " major" )){
225225
226- var DBMigratePluginLocation = fileSystemUtil .resolvePath (" plugins/dbmigrate" );
226+ var DBMigratePluginLocation = fileSystemUtil .resolvePath (" app/ plugins/dbmigrate" );
227227 if (! directoryExists (DBMigratePluginLocation )){
228228 error (" We can't find your plugins/dbmigrate folder? Please check the plugin is successfully installed; if you've not started the server using server start for the first time, this folder may not be created yet." );
229229 }
230230
231- var DBMigrateBridgePluginLocation = fileSystemUtil .resolvePath (" plugins/dbmigratebridge" );
231+ var DBMigrateBridgePluginLocation = fileSystemUtil .resolvePath (" app/ plugins/dbmigratebridge" );
232232 if (! directoryExists (DBMigrateBridgePluginLocation )){
233233 error (" We can't find your plugins/dbmigratebridge folder? Please check the plugin is successfully installed; if you've not started the server using server start for the first time, this folder may not be created yet." );
234234 }
@@ -249,7 +249,7 @@ component excludeFromHelp=true {
249249 string function $getBridgeURL () {
250250 var serverInfo = $getServerInfo ();
251251 var geturl = serverInfo .serverUrl ;
252- getURL & = " /rewrite.cfm?controller=wheels&action=wheels&view=cli" ;
252+ getURL & = " /public/ rewrite.cfm?controller=wheels&action=wheels&view=cli" ;
253253 return geturl ;
254254 }
255255
0 commit comments