Skip to content

Commit

Permalink
v6.8.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Jul 23, 2022
2 parents 83ccc79 + 9179e40 commit 9e8d441
Show file tree
Hide file tree
Showing 22 changed files with 156 additions and 109 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Publish Github Release
name: Github Release

on:
push:
tags:
- v[0-9]+.*

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: taiki-e/create-gh-release-action@v1.5.0
with:
# Produced by the build/Build.cfc
changelog: changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"ColdBox Platform",
"version":"6.7.0",
"version":"6.8.0",
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox/@build.version@/coldbox-@build.version@.zip",
"author":"Ortus Solutions <info@ortussolutions.com>",
"slug":"coldbox",
Expand Down
25 changes: 25 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

----

## [6.8.0] => 2022-JUL-23

### ColdBox HMVC Core

#### Bug

* [COLDBOX-1134](https://ortussolutions.atlassian.net/browse/COLDBOX-1134) Router closure responses not marshalling complex content to json
* [COLDBOX-1132](https://ortussolutions.atlassian.net/browse/COLDBOX-1132) New virtual app was always starting up the virtual coldbox app instead of checking if it was running already

#### Improvement

* [COLDBOX-1131](https://ortussolutions.atlassian.net/browse/COLDBOX-1131) Updated Missing Action Response Code to 404 instead of 405
* [COLDBOX-1127](https://ortussolutions.atlassian.net/browse/COLDBOX-1127) All core async proxies should send exceptions to the error log

#### New Feature

* [COLDBOX-1130](https://ortussolutions.atlassian.net/browse/COLDBOX-1130) New config/ColdBox.cfc global injections: webMapping, coldboxVersion
* [COLDBOX-1126](https://ortussolutions.atlassian.net/browse/COLDBOX-1126) Funnel all out and err logging on a ColdBox Scheduled Task to LogBox

#### Task

* [COLDBOX-1135](https://ortussolutions.atlassian.net/browse/COLDBOX-1135) Remove HandlerTestCase as it is no longer in usage.

----

## [6.7.0] => 2022-JUN-22

### ColdBox HMVC Core
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Bleeding edge releases are updated automatically when code is committed.

First, read our [contributing](CONTRIBUTING.md) guidelines, then you will need to download [CommandBox](https://www.ortussolutions.com/products/commandbox) so you can install dependencies, run the development server and much more.

Then you need to install some CommandBox modules in order to work with environment variables and cfml engine configuration. Once you fork/clone the repository, startup a CommandBox shell in the root of the project via `box` and then install all of the project development dependencies:
Then you need to install some CommandBox modules in order to work with environment variables and CFML engine configuration. Once you fork/clone the repository, startup a CommandBox shell in the root of the project via `box` and then install all of the project development dependencies:

```bash
install
Expand Down
2 changes: 1 addition & 1 deletion system/RestHandler.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ component extends="EventHandler" {
.getResponse()
.setError( true )
.addMessage( "Action '#arguments.missingAction#' could not be found" )
.setStatusCode( arguments.event.STATUS.NOT_ALLOWED )
.setStatusCode( arguments.event.STATUS.NOT_FOUND )
.setStatusText( "Invalid Action" );

// Render Error Out
Expand Down
5 changes: 5 additions & 0 deletions system/async/proxies/BiConsumer.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ component extends="BaseProxy" {
lock name="#getConcurrentEngineLockName()#" type="exclusive" timeout="60" {
variables.target( arguments.t, arguments.u );
}
} catch ( any e ) {
// Log it, so it doesn't go to ether
err( "Error running BiConsumer: #e.message & e.detail#" );
err( "Stacktrace for BiConsumer: #e.stackTrace#" );
rethrow;
} finally {
unLoadContext();
}
Expand Down
5 changes: 5 additions & 0 deletions system/async/proxies/BiFunction.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ component extends="BaseProxy" {
isNull( arguments.u ) ? javacast( "null", "" ) : arguments.u
);
}
} catch ( any e ) {
// Log it, so it doesn't go to ether
err( "Error running BiFunction: #e.message & e.detail#" );
err( "Stacktrace for BiFunction: #e.stackTrace#" );
rethrow;
} finally {
unLoadContext();
}
Expand Down
5 changes: 5 additions & 0 deletions system/async/proxies/Callable.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ component extends="Supplier" {
return invoke( variables.target, variables.method );
}
}
} catch ( any e ) {
// Log it, so it doesn't go to ether
err( "Error running Callable: #e.message & e.detail#" );
err( "Stacktrace for Callable: #e.stackTrace#" );
rethrow;
} finally {
unLoadContext();
}
Expand Down
9 changes: 8 additions & 1 deletion system/async/proxies/Consumer.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ component extends="BaseProxy" {
lock name="#getConcurrentEngineLockName()#" type="exclusive" timeout="60" {
variables.target( arguments.t );
}
} finally {
}
catch( any e ){
// Log it, so it doesn't go to ether
err( "Error running Consumer: #e.message & e.detail#" );
err( "Stacktrace for Consumer: #e.stackTrace#" );
rethrow;
}
finally {
unLoadContext();
}
}
Expand Down
5 changes: 5 additions & 0 deletions system/async/proxies/Function.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ component extends="BaseProxy" {
}
return variables.target( arguments.t );
}
} catch ( any e ) {
// Log it, so it doesn't go to ether
err( "Error running Function: #e.message & e.detail#" );
err( "Stacktrace for Function: #e.stackTrace#" );
rethrow;
} finally {
unLoadContext();
}
Expand Down
5 changes: 5 additions & 0 deletions system/async/proxies/FutureFunction.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ component extends="Function" {
}
return local.oFuture.getNative();
}
} catch ( any e ) {
// Log it, so it doesn't go to ether
err( "Error running FutureFunction: #e.message & e.detail#" );
err( "Stacktrace for FutureFunction: #e.stackTrace#" );
rethrow;
} finally {
unLoadContext();
}
Expand Down
5 changes: 5 additions & 0 deletions system/async/proxies/Runnable.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ component extends="BaseProxy" {
invoke( variables.target, variables.method );
}
}
} catch ( any e ) {
// Log it, so it doesn't go to ether
err( "Error running runnable: #e.message & e.detail#" );
err( "Stacktrace for runnable: #e.stackTrace#" );
rethrow;
} finally {
unLoadContext();
}
Expand Down
9 changes: 8 additions & 1 deletion system/async/proxies/Supplier.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ component extends="BaseProxy" {
return invoke( variables.target, variables.method );
}
}
} finally {
}
catch( any e ){
// Log it, so it doesn't go to ether
err( "Error running Supplier: #e.message & e.detail#" );
err( "Stacktrace for Supplier: #e.stackTrace#" );
rethrow;
}
finally {
unLoadContext();
}
}
Expand Down
8 changes: 6 additions & 2 deletions system/async/tasks/ScheduledTask.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,9 @@ component accessors="true" {
* @time The specific time using 24 hour format => HH:mm, defaults to 00:00
*/
ScheduledTask function startOn( required date, string time = "00:00" ){
variables.startOnDateTime = variables.chronoUnitHelper.parse( "#dateFormat( arguments.date, "yyyy-mm-dd" )#T#arguments.time#" );
variables.startOnDateTime = variables.chronoUnitHelper.parse(
"#dateFormat( arguments.date, "yyyy-mm-dd" )#T#arguments.time#"
);
return this;
}

Expand All @@ -1275,7 +1277,9 @@ component accessors="true" {
* @time The specific time using 24 hour format => HH:mm, defaults to 00:00
*/
ScheduledTask function endOn( required date, string time = "00:00" ){
variables.endOnDateTime = variables.chronoUnitHelper.parse( "#dateFormat( arguments.date, "yyyy-mm-dd" )#T#arguments.time#" );
variables.endOnDateTime = variables.chronoUnitHelper.parse(
"#dateFormat( arguments.date, "yyyy-mm-dd" )#T#arguments.time#"
);
return this;
}

Expand Down
34 changes: 17 additions & 17 deletions system/async/time/ChronoUnit.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,41 @@ component singleton {
this.ChronoField = createObject( "java", "java.time.temporal.ChronoField" );

// The java chrono unit we model
variables.jChronoUnit = createObject( "java", "java.time.temporal.ChronoUnit" );
variables.jChronoUnit = createObject( "java", "java.time.temporal.ChronoUnit" );
// Java LocalDateTime class
variables.jLocalDateTime = createObject( "java", "java.time.LocalDateTime" );
// Unit that represents the concept of a century.
this.CENTURIES = variables.jChronoUnit.CENTURIES;
this.CENTURIES = variables.jChronoUnit.CENTURIES;
// Unit that represents the concept of a day.
this.DAYS = variables.jChronoUnit.DAYS;
this.DAYS = variables.jChronoUnit.DAYS;
// Unit that represents the concept of a decade.
this.DECADES = variables.jChronoUnit.DECADES;
this.DECADES = variables.jChronoUnit.DECADES;
// Unit that represents the concept of an era.
this.ERAS = variables.jChronoUnit.ERAS;
this.ERAS = variables.jChronoUnit.ERAS;
// Artificial unit that represents the concept of forever.
this.FOREVER = variables.jChronoUnit.FOREVER;
this.FOREVER = variables.jChronoUnit.FOREVER;
// Unit that represents the concept of half a day, as used in AM/PM.
this.HALF_DAYS = variables.jChronoUnit.HALF_DAYS;
this.HALF_DAYS = variables.jChronoUnit.HALF_DAYS;
// Unit that represents the concept of an hour.
this.HOURS = variables.jChronoUnit.HOURS;
this.HOURS = variables.jChronoUnit.HOURS;
// Unit that represents the concept of a microsecond.
this.MICROS = variables.jChronoUnit.MICROS;
this.MICROS = variables.jChronoUnit.MICROS;
// Unit that represents the concept of a millennium.
this.MILLENNIA = variables.jChronoUnit.MILLENNIA;
this.MILLENNIA = variables.jChronoUnit.MILLENNIA;
// Unit that represents the concept of a millisecond.
this.MILLIS = variables.jChronoUnit.MILLIS;
this.MILLIS = variables.jChronoUnit.MILLIS;
// Unit that represents the concept of a minute.
this.MINUTES = variables.jChronoUnit.MINUTES;
this.MINUTES = variables.jChronoUnit.MINUTES;
// Unit that represents the concept of a month.
this.MONTHS = variables.jChronoUnit.MONTHS;
this.MONTHS = variables.jChronoUnit.MONTHS;
// Unit that represents the concept of a nanosecond, the smallest supported unit of time.
this.NANOS = variables.jChronoUnit.NANOS;
this.NANOS = variables.jChronoUnit.NANOS;
// Unit that represents the concept of a second.
this.SECONDS = variables.jChronoUnit.SECONDS;
this.SECONDS = variables.jChronoUnit.SECONDS;
// Unit that represents the concept of a week.
this.WEEKS = variables.jChronoUnit.WEEKS;
this.WEEKS = variables.jChronoUnit.WEEKS;
// Unit that represents the concept of a year.
this.YEARS = variables.jChronoUnit.YEARS;
this.YEARS = variables.jChronoUnit.YEARS;

/**
* Convert any ColdFusion date/time or string date/time object to a Java instant temporal object
Expand Down
73 changes: 0 additions & 73 deletions system/testing/BaseHandlerTest.cfc

This file was deleted.

17 changes: 16 additions & 1 deletion system/testing/VirtualApp.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,16 @@ component accessors="true" {
/**
* Startup a virtual ColdBox application for integration testing purposes.
*
* @force Force the startup of the application even if found. Default is false
*
* @return The loaded Application controller
*/
function startup(){
function startup( boolean force = false ){
// Return back if it's already running and not forcing
if( isRunning() && !arguments.force ){
return application.cbController;
}

// Initialize mock Controller
application.cbController = new coldbox.system.testing.mock.web.MockController(
appRootPath = variables.appRootPath,
Expand Down Expand Up @@ -87,6 +94,14 @@ component accessors="true" {
return !isNull( application.cbController );
}

/**
* Get the running application controller. Null if not in scope!
*
*/
function getController(){
return isRunning() ? application.cbController : javaCast( "null", "" );
}

/**
* Shuts down a virtual ColdBox application.
* It expects the <pre>cbController</pre> to be the app by convention.
Expand Down
2 changes: 2 additions & 0 deletions system/web/config/ApplicationLoader.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ component accessors="true" {
.injectPropertyMixin( "controller", variables.controller )
.injectPropertyMixin( "logBoxConfig", variables.controller.getLogBox().getConfig() )
.injectPropertyMixin( "appMapping", configStruct.appMapping )
.injectPropertyMixin( "webMapping", configStruct.webMapping )
.injectPropertyMixin( "coldboxVersion", coldboxSettings.version )
.injectPropertyMixin( "getJavaSystem", variables.util.getJavaSystem )
.injectPropertyMixin( "getSystemSetting", variables.util.getSystemSetting )
.injectPropertyMixin( "getSystemProperty", variables.util.getSystemProperty )
Expand Down
1 change: 1 addition & 0 deletions system/web/services/RoutingService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" {
// render it out
event
.renderdata(
type = isSimpleValue( theResponse ) ? "HTML" : "JSON",
data = theResponse,
statusCode = aRoute.statusCode,
statusText = aRoute.statusText
Expand Down
Loading

0 comments on commit 9e8d441

Please sign in to comment.