Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Mar 9, 2022
2 parents 6f264e9 + 1575d3b commit 999d595
Show file tree
Hide file tree
Showing 19 changed files with 145 additions and 107 deletions.
3 changes: 2 additions & 1 deletion test-harness/.cfconfig.json → .cfconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"adminPassword" : "coldbox",
"debuggingEnabled":true,
"debuggingReportExecutionTimes":false,
"disableInternalCFJavaComponents":false,
"inspectTemplate":"always",
"requestTimeout":"0,0,0,90",
"robustExceptionEnabled":true
}
}
1 change: 1 addition & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOLOCATION_DEVELOPER_KEY=
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@ jobs:
distribution: "adopt"
java-version: "11"

#- name: Setup nodejs
# uses: actions/setup-node@v2
# with:
# node-version: 12.x

- name: Cache CommandBox Dependencies
uses: actions/cache@v1
if: ${{ true }}
with:
path: ~/.CommandBox/artifacts
key: ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }}
restore-keys: |
${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }}
- name: Setup CommandBox
uses: Ortus-Solutions/setup-commandbox@main
with:
Expand All @@ -73,10 +59,6 @@ jobs:
- name: Build ${{ env.MODULE_ID }}
run: |
#npm i npm@latest -g
#npm install
#npm run prod
#rm -Rf node_modules
box install commandbox-docbox
box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
Expand Down
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/[email protected]
with:
# Produced by the build/Build.cfc
changelog: changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ jobs:
restore-keys: |
${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }}
- name: Install Test Harness Dependencies
working-directory: ./test-harness
- name: Install Dependencies
run: |
# Root Dependencies
box install
# Test Harness Dependencies
cd test-harness && box install
- name: Start ${{ matrix.cfengine }} Server
run: |
Expand Down Expand Up @@ -117,7 +119,7 @@ jobs:
SLACK_CHANNEL: coding
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
SLACK_ICON_EMOJI: ":bell:"
SLACK_MESSAGE: '${{ env.MODULE_ID }} tests failed :cry:'
SLACK_TITLE: ${{ env.MODULE_ID }} Tests For ${{ matrix.cfengine }} failed
SLACK_MESSAGE: '${{ github.repository }} tests failed :cry:'
SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} failed
SLACK_USERNAME: CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
.artifacts/**
.tmp/**

.env
.engine/**
test-harness/.engine/**
test-harness/coldbox/**
test-harness/docbox/**
test-harness/testbox/**
test-harness/logs/**
test-harness/modules/**

# modules
modules/**

# log files
logs/**
24 changes: 13 additions & 11 deletions box.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name":"JavaLoader",
"author":"Ortus Solutions.com <[email protected]>",
"version":"2.1.0",
"version":"2.1.1",
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbjavaloader/@build.version@/[email protected]@.zip",
"slug":"cbjavaloader",
"type":"modules",
Expand All @@ -22,27 +22,29 @@
"Brad Wood <[email protected]>",
"Curt Gratz <[email protected]>"
],
"dependencies":{},
"devDependencies":{
"commandbox-cfformat":"*",
"commandbox-docbox":"*",
"commandbox-dotenv":"*",
"commandbox-cfconfig":"*"
},
"ignore":[
"**/.*",
"test-harness",
"/server*.json"
"/server*.json"
],
"dependencies":{},
"devDependencies":{
"commandbox-dotenv":"*",
"commandbox-cfconfig":"*",
"commandbox-cfformat":"*"
},
"installPaths":{},
"testbox":{
"testbox":{
"runner":"http://localhost:60299/tests/runner.cfm"
},
"scripts":{
"build:module":"task run taskFile=build/Build.cfc :projectName=`package show slug` :version=`package show version`",
"build:docs":"task run taskFile=build/Build.cfc target=docs :projectName=`package show slug` :version=`package show version`",
"release":"recipe build/release.boxr",
"format":"cfformat run models/,test-harness/**/*.cfc,ModuleConfig.cfc --overwrite",
"format:watch":"cfformat watch models/,test-harness/**/*.cfc,ModuleConfig.cfc ./.cfformat.json",
"format:check":"cfformat check models/,test-harness/**/*.cfc,ModuleConfig.cfc",
"cfpm":"echo '\".engine/adobe2021/WEB-INF/cfusion/bin/cfpm.sh\"' | run",
"cfpm":"echo '\".engine/adobe2021/WEB-INF/cfusion/bin/cfpm.sh\"' | run",
"cfpm:install":"echo '\".engine/adobe2021/WEB-INF/cfusion/bin/cfpm.sh\" install ${1}' | run",
"install:2021":"run-script cfpm:install zip,debugger"
}
Expand Down
1 change: 1 addition & 0 deletions build/Build.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ component {
"test-harness",
"(package|package-lock).json",
"webpack.config.js",
"server-.*\.json",
"^\..*"
];

Expand Down
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

----

## [2.1.1] => 2022-MAR-09

### Fixed

* Updated the `setup-commandbox` command to avoid having the `box.zip` included in the repo
* Removal of `server-*.json` files on the final build
* Updated github actions to latests module standards

----

## [2.1.0] => 2022-FEB-04

### Added
Expand Down
8 changes: 7 additions & 1 deletion models/javaloader/JavaCompiler.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@
<cfreturn jarPath/>
</cffunction>

<cffunction name="getVersion" hint="returns the version number" access="public" returntype="string" output="false">
<cffunction
name ="getVersion"
hint ="returns the version number"
access ="public"
returntype="string"
output ="false"
>
<cfreturn "0.1.b"/>
</cffunction>

Expand Down
6 changes: 5 additions & 1 deletion models/javaloader/JavaLoader.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@
</cfscript>

<cfif isSimpleValue( arguments[ 1 ] )>
<cfinvoke method="#arguments[ 1 ]#" returnvariable="local.return" argumentCollection="#local.funcArgs#"/>
<cfinvoke
method ="#arguments[ 1 ]#"
returnvariable ="local.return"
argumentCollection="#local.funcArgs#"
/>
<cfelseif isCustomFunction( arguments[ 1 ] )>
<cfscript>
func = arguments[ 1 ];
Expand Down
44 changes: 22 additions & 22 deletions models/javaloader/JavaProxy.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -218,28 +218,28 @@
found = true;
} else if ( param.isPrimitive() )
// if it's a primitive, it can be mapped to object primtive classes
{
if ( param.getName() eq "boolean" AND class.getName() eq "java.lang.Boolean" ) {
found = true;
} else if ( param.getName() eq "int" AND class.getName() eq "java.lang.Integer" ) {
found = true;
} else if ( param.getName() eq "long" AND class.getName() eq "java.lang.Long" ) {
found = true;
} else if ( param.getName() eq "float" AND class.getName() eq "java.lang.Float" ) {
found = true;
} else if ( param.getName() eq "double" AND class.getName() eq "java.lang.Double" ) {
found = true;
} else if ( param.getName() eq "char" AND class.getName() eq "java.lang.Character" ) {
found = true;
} else if ( param.getName() eq "byte" AND class.getName() eq "java.lang.Byte" ) {
found = true;
} else if ( param.getName() eq "short" AND class.getName() eq "java.lang.Short" ) {
found = true;
} else {
found = false;
}
}
else {
{
if ( param.getName() eq "boolean" AND class.getName() eq "java.lang.Boolean" ) {
found = true;
} else if ( param.getName() eq "int" AND class.getName() eq "java.lang.Integer" ) {
found = true;
} else if ( param.getName() eq "long" AND class.getName() eq "java.lang.Long" ) {
found = true;
} else if ( param.getName() eq "float" AND class.getName() eq "java.lang.Float" ) {
found = true;
} else if ( param.getName() eq "double" AND class.getName() eq "java.lang.Double" ) {
found = true;
} else if ( param.getName() eq "char" AND class.getName() eq "java.lang.Character" ) {
found = true;
} else if ( param.getName() eq "byte" AND class.getName() eq "java.lang.Byte" ) {
found = true;
} else if ( param.getName() eq "short" AND class.getName() eq "java.lang.Short" ) {
found = true;
} else {
found = false;
}
}
else {
found = false;
}
}
Expand Down
5 changes: 4 additions & 1 deletion [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"rewrites":{
"enable":"true"
},
"webroot": "test-harness"
"webroot": "test-harness",
"aliases":{
"/moduleroot/cbjavaloader":"./"
}
},
"jvm":{
"heapSize":"1024"
Expand Down
5 changes: 4 additions & 1 deletion [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"rewrites":{
"enable":"true"
},
"webroot": "test-harness"
"webroot": "test-harness",
"aliases":{
"/moduleroot/cbjavaloader":"./"
}
},
"jvm":{
"heapSize":"1024"
Expand Down
5 changes: 4 additions & 1 deletion [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"rewrites":{
"enable":"true"
},
"webroot": "test-harness"
"webroot": "test-harness",
"aliases":{
"/moduleroot/cbjavaloader":"./"
}
},
"jvm":{
"heapSize":"1024"
Expand Down
5 changes: 4 additions & 1 deletion [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"rewrites":{
"enable":"true"
},
"webroot":"test-harness"
"webroot":"test-harness",
"aliases":{
"/moduleroot/cbjavaloader":"./"
}
},
"jvm":{
"heapSize":"1024"
Expand Down
14 changes: 8 additions & 6 deletions test-harness/config/Application.cfc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/**
* This is a protection Application cfm for the config file. You do not
* need to modify this file
*/
component{
/**
* This is a protection Application cfm for the config file. You do not
* need to modify this file
*/
component {

abort;
}

}
49 changes: 21 additions & 28 deletions test-harness/config/WireBox.cfc
Original file line number Diff line number Diff line change
@@ -1,46 +1,39 @@
component extends="coldbox.system.ioc.config.Binder"{
component extends="coldbox.system.ioc.config.Binder" {

/**
* Configure WireBox, that's it!
*/
* Configure WireBox, that's it!
*/
function configure(){

// The WireBox configuration structure DSL
wireBox = {
// Scope registration, automatically register a wirebox injector instance on any CF scope
// By default it registeres itself on application scope
scopeRegistration = {
enabled = true,
scope = "application", // server, cluster, session, application
key = "wireBox"
scopeRegistration : {
enabled : true,
scope : "application", // server, cluster, session, application
key : "wireBox"
},

// DSL Namespace registrations
customDSL = {
// namespace = "mapping name"
customDSL : {
// namespace = "mapping name"
},

// Custom Storage Scopes
customScopes = {
// annotationName = "mapping name"
customScopes : {
// annotationName = "mapping name"
},

// Package scan locations
scanLocations = [],

scanLocations : [],
// Stop Recursions
stopRecursions = [],

stopRecursions : [],
// Parent Injector to assign to the configured injector, this must be an object reference
parentInjector = "",

parentInjector : "",
// Register all event listeners here, they are created in the specified order
listeners = [
// { class="", name="", properties={} }
]
listeners : [
// { class="", name="", properties={} }
]
};

// Map Bindings below
}
}

}
}
Loading

0 comments on commit 999d595

Please sign in to comment.