diff --git a/commands/testbox/create/bdd.cfc b/commands/testbox/create/bdd.cfc index 9641d9b..e44acb3 100644 --- a/commands/testbox/create/bdd.cfc +++ b/commands/testbox/create/bdd.cfc @@ -7,7 +7,7 @@ * {code} * **/ -component extends="testboxCLI.models.BaseCommand"{ +component extends="testboxCLI.models.BaseCommand" { /** * @name Name of the BDD spec to create without the .cfc. For packages, specify name as 'myPackage/myBDDSpec' @@ -17,8 +17,8 @@ component extends="testboxCLI.models.BaseCommand"{ **/ function run( required name, - boolean open = false, - directory = getCWD(), + boolean open = false, + directory = getCWD(), boolean boxlang = isBoxLangProject( getCWD() ) ){ isBoxLangProject(); @@ -49,7 +49,7 @@ component extends="testboxCLI.models.BaseCommand"{ print.line(); // Read in Templates - var BDDContent = fileRead( "#variables.settings.templatesPath#/#arguments.boxlang ? 'bx' : 'cfml'#/bdd.txt" ); + var BDDContent = fileRead( "#variables.settings.templatesPath#/#arguments.boxlang ? "bx" : "cfml"#/bdd.txt" ); // Write out BDD Spec var BDDPath= "#arguments.directory#/#name#.cfc"; diff --git a/commands/testbox/create/unit.cfc b/commands/testbox/create/unit.cfc index 196de57..9d47e4c 100644 --- a/commands/testbox/create/unit.cfc +++ b/commands/testbox/create/unit.cfc @@ -7,7 +7,7 @@ * {code} * **/ - component extends="testboxCLI.models.BaseCommand"{ +component extends="testboxCLI.models.BaseCommand" { /** * @name Name of the xUnit bundle to create without the .cfc. For packages, specify name as 'myPackage/MyTest' @@ -17,8 +17,8 @@ **/ function run( required name, - boolean open = false, - directory = getCWD(), + boolean open = false, + directory = getCWD(), boolean boxlang = isBoxLangProject( getCWD() ) ){ // Allow dot-delimited paths @@ -46,7 +46,7 @@ print.line(); // Read in Templates - var content = fileRead( "#variables.settings.templatesPath#/#arguments.boxlang ? 'bx' : 'cfml'#/unit.txt" ); + var content = fileRead( "#variables.settings.templatesPath#/#arguments.boxlang ? "bx" : "cfml"#/unit.txt" ); // Write out BDD Spec var thisPath= "#arguments.directory#/#name#.cfc"; diff --git a/commands/testbox/generate/browser.cfc b/commands/testbox/generate/browser.cfc index c25d5b8..5429aae 100644 --- a/commands/testbox/generate/browser.cfc +++ b/commands/testbox/generate/browser.cfc @@ -11,7 +11,7 @@ * testbox create browser C:\myApp * {code} */ -component extends="testboxCLI.models.BaseCommand"{ +component extends="testboxCLI.models.BaseCommand" { /** * @directory The base directory to create your test browser @@ -19,7 +19,7 @@ component extends="testboxCLI.models.BaseCommand"{ */ function run( string directory = getCWD(), - boolean boxlang = isBoxLangProject( getCWD() ) + boolean boxlang = isBoxLangProject( getCWD() ) ){ // This will make each directory canonical and absolute arguments.directory = resolvePath( arguments.directory & "/tests/browser" ); @@ -30,7 +30,7 @@ component extends="testboxCLI.models.BaseCommand"{ // Copy template from testbox source directoryCopy( - "#variables.settings.templatesPath#/#arguments.boxlang ? 'bx' : 'cfml'#/browser/", + "#variables.settings.templatesPath#/#arguments.boxlang ? "bx" : "cfml"#/browser/", arguments.directory, true ); diff --git a/commands/testbox/generate/harness.cfc b/commands/testbox/generate/harness.cfc index a965908..10da762 100644 --- a/commands/testbox/generate/harness.cfc +++ b/commands/testbox/generate/harness.cfc @@ -11,7 +11,7 @@ * testbox create harness C:\myApp * {code} */ -component extends="testboxCLI.models.BaseCommand"{ +component extends="testboxCLI.models.BaseCommand" { /** * @directory The base directory to create your test browser @@ -19,7 +19,7 @@ component extends="testboxCLI.models.BaseCommand"{ */ function run( string directory = getCWD(), - boolean boxlang = isBoxLangProject( getCWD() ) + boolean boxlang = isBoxLangProject( getCWD() ) ){ // This will make each directory canonical and absolute arguments.directory = resolvePath( arguments.directory & "/tests" ); @@ -30,7 +30,7 @@ component extends="testboxCLI.models.BaseCommand"{ // Copy template from testbox source directoryCopy( - "#variables.settings.templatesPath#/#arguments.boxlang ? 'bx' : 'cfml'#/tests/", + "#variables.settings.templatesPath#/#arguments.boxlang ? "bx" : "cfml"#/tests/", arguments.directory, true ); diff --git a/commands/testbox/generate/module.cfc b/commands/testbox/generate/module.cfc index c57e8eb..59e096a 100644 --- a/commands/testbox/generate/module.cfc +++ b/commands/testbox/generate/module.cfc @@ -11,7 +11,7 @@ * testbox create module myModule tests/resources/modules * {code} */ -component extends="testboxCLI.models.BaseCommand"{ +component extends="testboxCLI.models.BaseCommand" { /** * @name The name of the module @@ -21,7 +21,7 @@ component extends="testboxCLI.models.BaseCommand"{ function run( required name, string rootDirectory = getCWD(), - boolean boxlang = isBoxLangProject( getCWD() ) + boolean boxlang = isBoxLangProject( getCWD() ) ){ var moduleDirectory = resolvePath( arguments.rootDirectory ) & "/" & arguments.name; @@ -31,7 +31,7 @@ component extends="testboxCLI.models.BaseCommand"{ // Copy template directoryCopy( - "#variables.settings.templatesPath#/#arguments.boxlang ? 'bx' : 'cfml'#/module/", + "#variables.settings.templatesPath#/#arguments.boxlang ? "bx" : "cfml"#/module/", moduleDirectory, true ); diff --git a/commands/testbox/generate/visualizer.cfc b/commands/testbox/generate/visualizer.cfc index 902d920..6956dbb 100644 --- a/commands/testbox/generate/visualizer.cfc +++ b/commands/testbox/generate/visualizer.cfc @@ -11,7 +11,7 @@ * testbox create visualizer C:\myApp * {code} */ -component extends="testboxCLI.models.BaseCommand"{ +component extends="testboxCLI.models.BaseCommand" { /** * @directory The base directory to create your test visualizer diff --git a/commands/testbox/run.cfc b/commands/testbox/run.cfc index 3a710b6..e726ea8 100644 --- a/commands/testbox/run.cfc +++ b/commands/testbox/run.cfc @@ -54,7 +54,7 @@ * {code} * **/ -component extends="testboxCLI.models.BaseCommand"{ +component extends="testboxCLI.models.BaseCommand" { // DI property name="testingService" inject="TestingService@testbox-cli"; diff --git a/models/BaseCommand.cfc b/models/BaseCommand.cfc index 91f750c..490c714 100644 --- a/models/BaseCommand.cfc +++ b/models/BaseCommand.cfc @@ -1,9 +1,9 @@ -component{ +component { // Global Injections - property name="settings" inject="box:modulesettings:testbox-cli"; - property name="moduleConfig" inject="box:moduleConfig:testbox-cli"; - property name="serverService" inject="serverService"; + property name="settings" inject="box:modulesettings:testbox-cli"; + property name="moduleConfig" inject="box:moduleConfig:testbox-cli"; + property name="serverService" inject="serverService"; property name="packageService" inject="PackageService"; /** @@ -124,22 +124,22 @@ component{ private function isBoxLangProject( required cwd ){ // Detect if it's a BoxLang server first. var serverInfo = variables.serverService.resolveServerDetails( {} ).serverInfo; - if( serverInfo.cfengine.findNoCase( "boxlang" ) ){ + if ( serverInfo.cfengine.findNoCase( "boxlang" ) ) { return true; } // Detect if you have the BoxLang runner set. var boxOptions = variables.packageService.readPackageDescriptor( arguments.cwd ); - if( + if ( boxOptions.testbox.keyExists( "runner" ) && isSimpleValue( boxOptions.testbox.runner ) && boxOptions.testbox.runner == "boxlang" - ){ + ) { return true; } // Language mode - if( boxOptions.keyExists( "language" ) && boxOptions.language == "boxlang" ){ + if ( boxOptions.keyExists( "language" ) && boxOptions.language == "boxlang" ) { return true; }