Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Jan 10, 2024
2 parents b84aaf7 + 8ca6fb8 commit 17effd5
Show file tree
Hide file tree
Showing 11 changed files with 134 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: Ortus-Solutions/[email protected]
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup CommandBox
uses: Ortus-Solutions/[email protected]
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
- name: Commit Changelog To Master
uses: EndBug/[email protected].1
uses: EndBug/[email protected].3
if: env.SNAPSHOT == 'false'
with:
author_name: Github Actions
Expand All @@ -73,7 +73,7 @@ jobs:
add: changelog.md

- name: Tag Version
uses: rickstaa/action-create-tag@v1.6.1
uses: rickstaa/action-create-tag@v1.7.2
if: env.SNAPSHOT == 'false'
with:
tag: "v${{ env.VERSION }}"
Expand All @@ -82,7 +82,7 @@ jobs:

- name: Upload Build Artifacts
if: success()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.MODULE_ID }}
path: |
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
box forgebox publish --force
- name: Create Github Release
uses: taiki-e/create-gh-release-action@v1.6.2
uses: taiki-e/create-gh-release-action@v1.8.0
continue-on-error: true
if: env.SNAPSHOT == 'false'
with:
Expand All @@ -138,7 +138,7 @@ jobs:
steps:
# Checkout development
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: development

Expand All @@ -148,7 +148,7 @@ jobs:
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}

- name: Download build artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ env.MODULE_ID }}
path: .tmp
Expand All @@ -165,7 +165,7 @@ jobs:
# Commit it back to development
- name: Commit Version Bump
uses: EndBug/[email protected].1
uses: EndBug/[email protected].3
with:
author_name: Github Actions
author_email: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Code Auto-Formatting
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Auto-format
uses: Ortus-Solutions/[email protected]
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
experimental: true
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4


- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "11"
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:

- name: Upload Test Results to Artifacts
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.cfengine }}-${{ matrix.coldboxVersion }}
path: |
Expand All @@ -109,7 +109,7 @@ jobs:
- name: Upload Debug Logs To Artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Failure Debugging Info - ${{ matrix.cfengine }} - ${{ matrix.coldboxVersion }}
path: |
Expand Down
1 change: 1 addition & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"no-multiple-blanks": {
"maximum": 2
},
"no-duplicate-heading" : false,
"no-duplicate-header" : {
"siblings_only" : true
},
Expand Down
5 changes: 4 additions & 1 deletion box.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,15 @@
"start:lucee":"server start [email protected]",
"start:2018":"server start [email protected]",
"start:2021":"server start [email protected]",
"start:2023":"server start [email protected]",
"stop:lucee":"server stop [email protected]",
"stop:2018":"server stop [email protected]",
"stop:2021":"server stop [email protected]",
"stop:2023":"server stop [email protected]",
"logs:lucee":"server log [email protected] --follow",
"logs:2018":"server log [email protected] --follow",
"logs:2021":"server log [email protected] --follow"
"logs:2021":"server log [email protected] --follow",
"logs:2023":"server log [email protected] --follow"
},
"installPaths":{
"jwt-cfml":"modules/jwtcfml/",
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Markdown rules updated to fix duplicate headers
- Updated security logs columns to work in Oracle as `clob`
- `cbsecurity_logs` is hard coded instead of using module setting

## [3.4.1] - 2023-08-09
Expand Down
4 changes: 2 additions & 2 deletions interceptors/Security.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,9 @@ component accessors="true" extends="coldbox.system.Interceptor" {
case "block": {
arguments.event
.renderData(
data = "<h1>Unathorized</h1>",
data = "<h1>Unauthorized</h1>",
statusCode = "401",
statusText = "Unathorized"
statusText = "Unauthorized"
)
.noExecution();
break;
Expand Down
2 changes: 1 addition & 1 deletion models/util/DBLogger.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ component accessors="true" singleton threadsafe {
return "TEXT";
}
case "Oracle": {
return "LONGTEXT";
return "CLOB";
}
default: {
return "TEXT";
Expand Down
169 changes: 109 additions & 60 deletions test-harness/tests/index.cfm
Original file line number Diff line number Diff line change
@@ -1,53 +1,48 @@
<cfsetting showdebugoutput="false" >
<!--- CPU Integration --->
<cfparam name="url.cpu" default="false">
<!--- SETUP THE ROOTS OF THE BROWSER RIGHT HERE --->
<cfset rootMapping = "/tests/specs">
<cfif directoryExists( rootMapping )>
<cfset rootPath = rootMapping>
<cfelse>
<cfset rootPath = expandPath( rootMapping )>
</cfif>

<!--- param incoming --->
<cfparam name="url.path" default="/">

<!--- Decodes & Path Defaults --->
<cfif !len( url.path )>
<cfset url.path = "/">
</cfif>

<!--- Prepare TestBox --->
<cfset testbox = new testbox.system.TestBox()>

<!--- Run Tests Action?--->
<cfif structKeyExists( url, "action")>
<cfif directoryExists( expandPath( rootMapping & url.path ) )>
<cfoutput>#testbox.init( directory=rootMapping & url.path ).run()#</cfoutput>
<cfelse>
<cfoutput><h2>Invalid incoming directory: #rootMapping & url.path#</h2></cfoutput>
</cfif>
<cfabort>

</cfif>

<!--- Get list of files --->
<cfdirectory action="list" directory="#rootPath & url.path#" name="qResults" sort="directory asc, name asc">
<!--- Get the execute path --->
<cfset executePath = rootMapping & ( url.path eq "/" ? "/" : url.path & "/" )>
<!--- Get the Back Path --->
<cfif url.path neq "/">
<cfset backPath = replacenocase( url.path, listLast( url.path, "/" ), "" )>
<cfset backPath = reReplace( backpath, "/$", "" )>
</cfif>

<cfset ASSETS_DIR = expandPath( "/testbox/system/reports/assets" )>
<!--- Do HTML --->
<cfscript>
// No cf debugging
cfsetting( showdebugoutput="false" );
// Path Navigation
param name="url.path" default="";
// Root Tests Directory
rootMapping = "/tests/specs";
rootPath = expandPath( rootMapping );
targetPath = rootPath;
// Append navigation path
if( len( url.path ) ){
targetPath = getCanonicalPath( rootpath & "/" & url.path );
// Avoid traversals
if( !findNoCase( rootpath, targetPath ) ){
targetPath = rootpath;
}
}
// Get the actual execution path
executePath = rootMapping & ( len( url.path ) ? "/#url.path#" : "/" );
// Directory Runner
if( !isNull( url.action ) ){
if( directoryExists( targetPath ) ){
writeOutput( "#new testbox.system.TestBox( directory=executePath ).run()#" );
} else {
writeOutput( "<h2>Invalid Directory: #encodeForHTML( targetPath )#</h2>" );
}
abort;
}
// Get target path listing
qResults = directoryList( targetPath, false, "query", "", "name" );
// Get the back path
if( len( url.path ) ){
backPath = url.path.listToArray( "/\" );
backPath.pop();
backPath = backPath.toList( "/" );
}
// TestBox Assets
ASSETS_DIR = expandPath( "/testbox/system/reports/assets" );
TESTBOX_VERSION = new testBox.system.TestBox().getVersion();
</cfscript>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="TestBox v#testbox.getVersion()#">
<meta name="generator" content="TestBox v#TESTBOX_VERSION#">
<title>TestBox Browser</title>
<cfoutput>
<style>#fileRead( '#ASSETS_DIR#/css/main.css' )#</style>
Expand All @@ -56,51 +51,105 @@
<script>#fileRead( '#ASSETS_DIR#/js/bootstrap.min.js' )#</script>
<script>#fileRead( '#ASSETS_DIR#/js/stupidtable.min.js' )#</script>
</cfoutput>
</head>
<cfoutput>
<body>
<!--- Title --->
<div id="tb-runner" class="container">
<!--- Header --->
<div class="row">
<div class="col-md-4 text-center mx-auto">
<img class="mt-3" src="http://www.ortussolutions.com/__media/testbox-185.png" alt="TestBox" id="tb-logo"/>
<br>
v#testbox.getVersion()#
v#TESTBOX_VERSION#
<br>
<a href="index.cfm?action=runTestBox&path=#URLEncodedFormat( url.path )#" target="_blank"><button class="btn btn-primary btn-sm my-1" type="button">Run All</button></a>
<a
href="index.cfm?action=runTestBox&path=#URLEncodedFormat( url.path )#"
target="_blank"
>
<button
class="btn btn-primary btn-sm my-1"
type="button">
Run All
</button>
</a>
</div>
</div>
<!--- Runners --->
<div class="row">
<div class="col-md-12 mb-4">
<h2>Availble Test Runners: </h2>
<p>
Below is a listing of the runners matching the "runner*.cfm" pattern.
</p>
<cfset runners = directoryList( expandPath( "./" ), false, "query", "runner*.cfm" )>
<cfoutput query="runners">
<a href="#runners.name#" target="_blank" class="btn btn-secondary btn-sm my-1 mx-1">#runners.name#</a>
</cfoutput>
</div>
</div>
<!--- Listing --->
<div class="row">
<div class="col-md-12">
<form name="runnerForm" id="runnerForm">
<input type="hidden" name="opt_run" id="opt_run" value="true">
<h2>TestBox Test Browser: </h2>
<p>
Below is a listing of the files and folders starting from your root <code>#rootPath#</code>. You can click on individual tests in order to execute them
Below is a listing of the files and folders starting from your root <code>#rootMapping#</code>. You can click on individual tests in order to execute them
or click on the <strong>Run All</strong> button on your left and it will execute a directory runner from the visible folder.
</p>
<fieldset>
<legend>Contents: #executePath#</legend>
<cfif url.path neq "/">
<a href="index.cfm?path=#URLEncodedFormat( backPath )#"><button type="button" class="btn btn-secondary btn-sm my-1">« Back</button></a><br><hr>
<legend>#targetPath.replace( rootPath, "" )#</legend>
<!--- Show Back If we are traversing --->
<cfif len( url.path )>
<a href="index.cfm?path=#URLEncodedFormat( backPath )#">
<button type="button" class="btn btn-secondary btn-sm my-1">&##xAB; Back</button>
</a>
<br>
<hr>
</cfif>
<cfloop query="qResults">
<!--- Skip . folder file names --->
<cfif refind( "^\.", qResults.name )>
<cfcontinue>
</cfif>
<cfset dirPath = URLEncodedFormat( ( url.path neq '/' ? '#url.path#/' : '/' ) & qResults.name )>
<cfif qResults.type eq "Dir">
<a class="btn btn-secondary btn-sm my-1" href="index.cfm?path=#dirPath#">✚ #qResults.name#</a><br/>
<a
class="btn btn-secondary btn-sm my-1"
href="index.cfm?path=#urlEncodedFormat( url.path & "/" & qResults.name )#"
>
&##x271A; #qResults.name#
</a>
<br />
<cfelseif listLast( qresults.name, ".") eq "cfm">
<a class="btn btn-primary btn-sm my-1" href="#executePath & qResults.name#" <cfif !url.cpu>target="_blank"</cfif>>#qResults.name#</a><br/>
<a
class="btn btn-primary btn-sm my-1"
href="#executePath & "/" & qResults.name#"
target="_blank"
>
#qResults.name#
</a>
<br />
<cfelseif listLast( qresults.name, ".") eq "cfc" and qresults.name neq "Application.cfc">
<a class="btn btn-primary btn-sm my-1" href="#executePath & qResults.name#?method=runRemote" <cfif !url.cpu>target="_blank"</cfif>>#qResults.name#</a><br/>
<a
class="btn btn-primary btn-sm my-1"
href="#executePath & "/" & qResults.name#?method=runRemote"
target="_blank"
>
#qResults.name#
</a>
<br />
<cfelse>
#qResults.name#<br/>
#qResults.name#
<br/>
</cfif>
</cfloop>
Expand All @@ -112,4 +161,4 @@
</body>
</html>
</cfoutput>
</cfoutput>
Loading

0 comments on commit 17effd5

Please sign in to comment.