Skip to content

Commit

Permalink
Merge pull request #167 from Ortus-Solutions/development
Browse files Browse the repository at this point in the history
v6.3.0
  • Loading branch information
jclausen authored Feb 25, 2025
2 parents 9630b22 + a3c9370 commit e0a1864
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Daily Test BE Engines
name: Daily Tests

on:
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
tests:
name: Test Suites
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"TestBox",
"version":"6.2.1",
"version":"6.3.0",
"location":"https://downloads.ortussolutions.com/ortussolutions/testbox/@build.version@/testbox-@build.version@.zip",
"author":"Ortus Solutions <info@ortussolutions.com>",
"slug":"testbox",
Expand Down
2 changes: 1 addition & 1 deletion system/BaseSpec.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ component {
// init consolidated spec labels
var consolidatedLabels = arguments.spec.labels;
var md = getMetadata( this );
var mdLabels = md.labels ?: "";
var mdLabels = structKeyExists( md, "labels" ) ? md.labels : "";
consolidatedLabels.append( listToArray( mdLabels ), true );
// Build labels from nested suites, so suites inherit from parent suite labels
var parentSuite = arguments.suite;
Expand Down
41 changes: 41 additions & 0 deletions system/util/BoxLangMappingHelper.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
* www.ortussolutions.com
* ---
* Creation of mappings via BoxLang
*/
component {

/**
* Add an absolute custom tag path to the running application
*
* @path The absolute path to the directory containing the custom tags
*/
BoxLangMappingHelper function addCustomTagPath( required path ){
application
action ="update"
customTagPaths="#getApplicationSettings().customTagPaths.append( arguments.path )#";
return this;
}

/**
* Add a mapping
*
* @name The name of the mapping
* @path The path of the mapping
*/
BoxLangMappingHelper function addMapping( required name, required path ){
return addMappings( { "#arguments.name#" : arguments.path } );
}

/**
* Add a mapping using a struct of mappings
*
* @mappings A struct of mappings to register: { name : path }
*/
BoxLangMappingHelper function addMappings( required struct mappings ){
application action="update" mappings=getApplicationSettings().mappings.append( arguments.mappings );
return this;
}

}
9 changes: 3 additions & 6 deletions system/util/Util.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,9 @@ component {
private function getEngineMappingHelper(){
// Lazy load the helper
if ( isNull( variables.engineMappingHelper ) ) {
// Detect server
var engine = server.coldfusion.productname ?: "";
if ( engine == "" && server.keyExists( "boxlang" ) ) {
engine = "lucee";
}
if ( listFindNoCase( "Lucee", engine ) ) {
if ( server.keyExists( "boxlang" ) ) {
variables.engineMappingHelper = new BoxLangMappingHelper();
} else if ( listFindNoCase( "Lucee", server.coldfusion.productname ) ) {
variables.engineMappingHelper = new LuceeMappingHelper();
} else {
variables.engineMappingHelper = new CFMappingHelper();
Expand Down

0 comments on commit e0a1864

Please sign in to comment.