Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v7.4.0 #6

Merged
merged 6 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 3 additions & 4 deletions box.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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":[
"**/.*",
Expand Down
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion commands/coldbox/create/bdd.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 5 additions & 1 deletion commands/coldbox/create/resource.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion commands/coldbox/create/unit.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
28 changes: 20 additions & 8 deletions models/Utility.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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();
}
}
Expand All @@ -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();
}
}
Expand All @@ -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;
}

/**
Expand Down
Loading