From 72f9106f9a4a8f69aec91eb85bdb5d8b1e398b8c Mon Sep 17 00:00:00 2001 From: lmajano Date: Mon, 12 Feb 2024 09:33:45 +0000 Subject: [PATCH 1/5] Apply cfformat changes --- commands/coldbox/create/bdd.cfc | 2 +- commands/coldbox/create/unit.cfc | 2 +- models/Utility.cfc | 28 ++++++++++++++++++++-------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/commands/coldbox/create/bdd.cfc b/commands/coldbox/create/bdd.cfc index a99e326..9000ab5 100644 --- a/commands/coldbox/create/bdd.cfc +++ b/commands/coldbox/create/bdd.cfc @@ -8,7 +8,7 @@ * {code} * **/ - component extends="coldbox-cli.models.BaseCommand" { +component extends="coldbox-cli.models.BaseCommand" { /** * @name Name of the BDD spec to create without the .cfc. For packages, specify name as 'myPackage/myBDDSpec' diff --git a/commands/coldbox/create/unit.cfc b/commands/coldbox/create/unit.cfc index 783461d..b375cf4 100644 --- a/commands/coldbox/create/unit.cfc +++ b/commands/coldbox/create/unit.cfc @@ -8,7 +8,7 @@ * {code} * **/ - component extends="coldbox-cli.models.BaseCommand" { +component extends="coldbox-cli.models.BaseCommand" { /** * @name Name of the xUnit Bundle to create without the .cfc. For packages, specify name as 'myPackage/MyServiceTest' diff --git a/models/Utility.cfc b/models/Utility.cfc index 7523769..2efc8b9 100644 --- a/models/Utility.cfc +++ b/models/Utility.cfc @@ -2,8 +2,8 @@ component singleton { // DI property name="moduleService" inject="ModuleService"; - property name="wirebox" inject="wirebox"; - property name="print" inject="PrintBuffer"; + property name="wirebox" inject="wirebox"; + property name="print" inject="PrintBuffer"; this.BREAK = chr( 13 ) & chr( 10 ); this.TAB = chr( 9 ); @@ -13,13 +13,16 @@ component singleton { * else install it */ function ensureTestBoxModule(){ - if( !isTestBoxModuleInstalled() ){ + if ( !isTestBoxModuleInstalled() ) { variables.print .redLine( "TestBox-CLI module not installed. Installing it for you, please wait..." ) .line() .toConsole(); variables.wirebox - .getInstance( name : "CommandDSL", initArguments : { name : "install testbox-cli" } ) + .getInstance( + name : "CommandDSL", + initArguments: { name : "install testbox-cli" } + ) .run(); } } @@ -29,13 +32,16 @@ component singleton { * else install it */ function ensureMigrationsModule(){ - if( !isMigrationsModuleInstalled() ){ + if ( !isMigrationsModuleInstalled() ) { variables.print .redLine( "CommandBox-Migrations module not installed. Installing it for you, please wait..." ) .line() .toConsole(); variables.wirebox - .getInstance( name : "CommandDSL", initArguments : { name : "install commandbox-migrations" } ) + .getInstance( + name : "CommandDSL", + initArguments: { name : "install commandbox-migrations" } + ) .run(); } } @@ -44,14 +50,20 @@ component singleton { * Is TestBox module installed */ boolean function isTestBoxModuleInstalled(){ - return variables.moduleService.getModuleRegistry().keyArray().findNoCase( "testbox-cli" ) > 0 ? true : false; + return variables.moduleService + .getModuleRegistry() + .keyArray() + .findNoCase( "testbox-cli" ) > 0 ? true : false; } /** * Is CommandBox Migrations module installed */ boolean function isMigrationsModuleInstalled(){ - return variables.moduleService.getModuleRegistry().keyArray().findNoCase( "commandbox-migrations" ) > 0 ? true : false; + return variables.moduleService + .getModuleRegistry() + .keyArray() + .findNoCase( "commandbox-migrations" ) > 0 ? true : false; } /** From cdbb3fa9dfaf421b689b6aaaee76808df51ea311 Mon Sep 17 00:00:00 2001 From: Github Actions Date: Mon, 12 Feb 2024 09:45:46 +0000 Subject: [PATCH 2/5] Version bump --- box.json | 7 +++---- changelog.md | 6 +++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/box.json b/box.json index 770205a..7f3b257 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"ColdBox CLI", - "version":"7.3.0", + "version":"7.4.0", "location":"https://downloads.ortussolutions.com/ortussolutions/commandbox-modules/coldbox-cli/@build.version@/coldbox-cli-@build.version@.zip", "slug":"coldbox-cli", "author":"Ortus Solutions, Corp", @@ -26,11 +26,10 @@ "devDependencies":{ "commandbox-cfformat":"*", "commandbox-docbox":"*", - "commandbox-migrations":"^5.0.0", + "commandbox-migrations":"^5.0.0", "testbox-cli":"^1.0.0" }, - "dependencies":{ - }, + "dependencies":{}, "installPaths":{}, "ignore":[ "**/.*", diff --git a/changelog.md b/changelog.md index 9180dc0..4141ab8 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [7.3.0] - 2024-02-12 + ### Added - New github actions @@ -78,7 +80,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Eclipse support -[Unreleased]: https://github.com/ColdBox/coldbox-cli/compare/v7.2.1...HEAD +[Unreleased]: https://github.com/ColdBox/coldbox-cli/compare/v7.3.0...HEAD + +[7.3.0]: https://github.com/ColdBox/coldbox-cli/compare/v7.2.1...v7.3.0 [7.2.1]: https://github.com/ColdBox/coldbox-cli/compare/v7.2.0...v7.2.1 From 3ab718d42e1ea4ee933de01020ec2463fc54f17b Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Wed, 20 Mar 2024 10:31:09 +0100 Subject: [PATCH 3/5] ### Fixed - Create resources missing `open` param ### Added - More documentation --- changelog.md | 8 ++++++++ commands/coldbox/create/resource.cfc | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 4141ab8..27e969b 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Create resources missing `open` param + +### Added + +- More documentation + ## [7.3.0] - 2024-02-12 ### Added diff --git a/commands/coldbox/create/resource.cfc b/commands/coldbox/create/resource.cfc index 2aec4d7..4d65a36 100644 --- a/commands/coldbox/create/resource.cfc +++ b/commands/coldbox/create/resource.cfc @@ -70,6 +70,9 @@ component extends="coldbox-cli.models.BaseCommand" { * @specsDirectory Your specs directory. Only used if tests is true * @api If true, this will generate api resources, else normal html resources * @force Force the generation of the resource, even if it exists + * @migration Generate the cfmigrations for the entities + * @seeder Generate a mock data seeder for the entitites + * @open Open the resources once created */ function run( required resource, @@ -95,7 +98,8 @@ component extends="coldbox-cli.models.BaseCommand" { boolean api = false, boolean force = false, boolean migration = false, - boolean seeder = false + boolean seeder = false, + boolean open = false ){ // Normalize paths arguments.specsDirectory = resolvePath( arguments.specsDirectory ); From 7507e46722cbb682db50aedae528478663caff59 Mon Sep 17 00:00:00 2001 From: lmajano Date: Wed, 20 Mar 2024 09:31:38 +0000 Subject: [PATCH 4/5] Apply cfformat changes --- commands/coldbox/create/resource.cfc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/coldbox/create/resource.cfc b/commands/coldbox/create/resource.cfc index 4d65a36..27282d7 100644 --- a/commands/coldbox/create/resource.cfc +++ b/commands/coldbox/create/resource.cfc @@ -70,9 +70,9 @@ component extends="coldbox-cli.models.BaseCommand" { * @specsDirectory Your specs directory. Only used if tests is true * @api If true, this will generate api resources, else normal html resources * @force Force the generation of the resource, even if it exists - * @migration Generate the cfmigrations for the entities - * @seeder Generate a mock data seeder for the entitites - * @open Open the resources once created + * @migration Generate the cfmigrations for the entities + * @seeder Generate a mock data seeder for the entitites + * @open Open the resources once created */ function run( required resource, @@ -99,7 +99,7 @@ component extends="coldbox-cli.models.BaseCommand" { boolean force = false, boolean migration = false, boolean seeder = false, - boolean open = false + boolean open = false ){ // Normalize paths arguments.specsDirectory = resolvePath( arguments.specsDirectory ); From 91ef313b545bcd6085a3bedff9254bd98ef182ed Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Wed, 20 Mar 2024 10:39:20 +0100 Subject: [PATCH 5/5] fixing issue with missing folder on ci --- .github/workflows/tests.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8a9d6f6..bbb4737 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,12 +45,13 @@ jobs: - name: Run Tests run: | - # Create the CommandBox modules folder, for some reason it is not created - mkdir -p ~/.CommandBox/cfml/modules - # Link up the module so we can do testing! - box link --force - # Test - box task run taskfile=build/Build target="runTests" + # Create the CommandBox modules folder, for some reason it is not created + rm -Rf ~/.CommandBox/cfml/modules/coldbox-cli + mkdir -p ~/.CommandBox/cfml/modules + # Link up the module so we can do testing! + box link --force + # Test + box task run taskfile=build/Build target="runTests" - name: Failure Logs if: failure()