Skip to content

Commit 20c5cbe

Browse files
committed
Merge branch 'development'
2 parents 3fc41f6 + 49568ac commit 20c5cbe

30 files changed

+727
-1401
lines changed
File renamed without changes.

.cfformat.json

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"array.empty_padding": false,
33
"array.padding": true,
4-
"array.multiline.min_length": 40,
4+
"array.multiline.min_length": 50,
55
"array.multiline.element_count": 2,
66
"array.multiline.leading_comma.padding": true,
77
"array.multiline.leading_comma": false,
88
"alignment.consecutive.assignments": true,
99
"alignment.consecutive.properties": true,
1010
"alignment.consecutive.params": true,
11+
"alignment.doc_comments" : true,
1112
"brackets.padding": true,
1213
"comment.asterisks": "align",
1314
"binary_operators.padding": true,
@@ -17,22 +18,22 @@
1718
"function_call.multiline.leading_comma.padding": true,
1819
"function_call.casing.builtin": "cfdocs",
1920
"function_call.casing.userdefined": "camel",
20-
"function_call.multiline.element_count": 2,
21+
"function_call.multiline.element_count": 3,
2122
"function_call.multiline.leading_comma": false,
22-
"function_call.multiline.min_length": 40,
23+
"function_call.multiline.min_length": 50,
2324
"function_declaration.padding": true,
2425
"function_declaration.empty_padding": false,
2526
"function_declaration.multiline.leading_comma": false,
2627
"function_declaration.multiline.leading_comma.padding": true,
27-
"function_declaration.multiline.element_count": 2,
28-
"function_declaration.multiline.min_length": 40,
28+
"function_declaration.multiline.element_count": 3,
29+
"function_declaration.multiline.min_length": 50,
2930
"function_declaration.group_to_block_spacing": "compact",
3031
"function_anonymous.empty_padding": false,
3132
"function_anonymous.group_to_block_spacing": "compact",
32-
"function_anonymous.multiline.element_count": 2,
33+
"function_anonymous.multiline.element_count": 3,
3334
"function_anonymous.multiline.leading_comma": false,
3435
"function_anonymous.multiline.leading_comma.padding": true,
35-
"function_anonymous.multiline.min_length": 40,
36+
"function_anonymous.multiline.min_length": 50,
3637
"function_anonymous.padding": true,
3738
"indent_size": 4,
3839
"keywords.block_to_keyword_spacing": "spaced",
@@ -41,13 +42,13 @@
4142
"keywords.spacing_to_block": "spaced",
4243
"keywords.spacing_to_group": true,
4344
"keywords.empty_group_spacing": false,
44-
"max_columns": 120,
45+
"max_columns": 115,
4546
"metadata.multiline.element_count": 3,
46-
"metadata.multiline.min_length": 40,
47+
"metadata.multiline.min_length": 50,
4748
"method_call.chain.multiline" : 3,
4849
"newline":"\n",
4950
"property.multiline.element_count": 3,
50-
"property.multiline.min_length": 40,
51+
"property.multiline.min_length": 30,
5152
"parentheses.padding": true,
5253
"strings.quote": "double",
5354
"strings.attributes.quote": "double",
@@ -57,6 +58,6 @@
5758
"struct.multiline.leading_comma": false,
5859
"struct.multiline.leading_comma.padding": true,
5960
"struct.multiline.element_count": 2,
60-
"struct.multiline.min_length": 40,
61+
"struct.multiline.min_length": 60,
6162
"tab_indent": true
62-
}
63+
}

.env.template

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
DB_HOST=127.0.0.1
2+
DB_PORT=3306
3+
DB_USER=root
4+
DB_PASSWORD=mysql
5+
DB_CLASS=com.mysql.cj.jdbc.Driver
6+
DB_BUNDLEVERSION=8.0.19
7+
DB_BUNDLENAME=com.mysql.cj

.github/FUNDING.YML

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
patreon: ortussolutions

.github/workflows/ci.yml

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: bcrypt CI
2+
3+
# Only on Development we build snapshots
4+
on:
5+
push:
6+
branches:
7+
- development
8+
- master
9+
10+
env:
11+
MODULE_ID: bcrypt
12+
13+
jobs:
14+
#############################################
15+
# Tests First baby! We fail, no build :(
16+
#############################################
17+
tests:
18+
uses: ./.github/workflows/tests.yml
19+
secrets:
20+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
21+
22+
#############################################
23+
# Build Module
24+
#############################################
25+
build:
26+
name: Build & Publish
27+
needs: tests
28+
runs-on: ubuntu-20.04
29+
steps:
30+
- name: Checkout Repository
31+
uses: actions/checkout@v2
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Setup Java
36+
uses: actions/setup-java@v2
37+
with:
38+
distribution: "adopt"
39+
java-version: "11"
40+
41+
- name: Setup CommandBox
42+
uses: Ortus-Solutions/setup-commandbox@main
43+
with:
44+
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}
45+
46+
- name: Setup Environment Variables For Build Process
47+
id: current_version
48+
run: |
49+
echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV
50+
51+
# master or snapshot
52+
echo "Github Ref is $GITHUB_REF"
53+
echo "BRANCH=master" >> $GITHUB_ENV
54+
if [ $GITHUB_REF == 'refs/heads/development' ]
55+
then
56+
echo "BRANCH=development" >> $GITHUB_ENV
57+
fi
58+
59+
- name: Build ${{ env.MODULE_ID }}
60+
run: |
61+
box install commandbox-docbox
62+
box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
63+
64+
- name: Upload Build Artifacts
65+
if: success()
66+
uses: actions/upload-artifact@v2
67+
with:
68+
name: ${{ env.MODULE_ID }}
69+
path: |
70+
.artifacts/**/*
71+
72+
- name: Upload Binaries to S3
73+
uses: jakejarvis/s3-sync-action@master
74+
with:
75+
args: --acl public-read
76+
env:
77+
AWS_S3_BUCKET: "downloads.ortussolutions.com"
78+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
79+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }}
80+
SOURCE_DIR: ".artifacts/${{ env.MODULE_ID }}"
81+
DEST_DIR: "ortussolutions/coldbox-modules/${{ env.MODULE_ID }}"
82+
83+
- name: Upload API Docs to S3
84+
uses: jakejarvis/s3-sync-action@master
85+
with:
86+
args: --acl public-read
87+
env:
88+
AWS_S3_BUCKET: "apidocs.ortussolutions.com"
89+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
90+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }}
91+
SOURCE_DIR: ".tmp/apidocs"
92+
DEST_DIR: "coldbox-modules/${{ env.MODULE_ID }}/${{ env.VERSION }}"
93+
94+
- name: Publish To ForgeBox
95+
run: |
96+
cd .tmp/${{ env.MODULE_ID }}
97+
cat box.json
98+
box forgebox publish
99+
100+
- name: Inform Slack
101+
if: ${{ always() }}
102+
uses: rtCamp/action-slack-notify@v2
103+
env:
104+
SLACK_CHANNEL: coding
105+
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
106+
SLACK_ICON_EMOJI: ":bell:"
107+
SLACK_MESSAGE: '${{ env.MODULE_ID }} Built with ${{ job.status }}!'
108+
SLACK_TITLE: "${{ env.MODULE_ID }} Build"
109+
SLACK_USERNAME: CI
110+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

.github/workflows/gh-release.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Publish Github Release
2+
name: Github Release
3+
4+
on:
5+
push:
6+
tags:
7+
- v[0-9]+.*
8+
9+
jobs:
10+
create-release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: taiki-e/[email protected]
15+
with:
16+
# Produced by the build/Build.cfc
17+
changelog: changelog.md
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Pull Requests
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- "main"
7+
- "master"
8+
- "development"
9+
pull_request:
10+
branches:
11+
- development
12+
13+
jobs:
14+
tests:
15+
uses: coldbox-modules/bcrypt/.github/workflows/tests.yml@development
16+
17+
# Format PR
18+
format:
19+
name: Format
20+
runs-on: ubuntu-20.04
21+
steps:
22+
- name: Checkout Repository
23+
uses: actions/checkout@v2
24+
25+
- uses: Ortus-Solutions/[email protected]
26+
with:
27+
cmd: run-script format
28+
29+
- name: Commit Format Changes
30+
uses: stefanzweifel/git-auto-commit-action@v4
31+
with:
32+
commit_message: Apply cfformat changes

.github/workflows/tests.yml

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Test Suites
2+
3+
# We are a reusable Workflow only
4+
on:
5+
workflow_call:
6+
secrets:
7+
SLACK_WEBHOOK_URL:
8+
required: true
9+
10+
jobs:
11+
tests:
12+
name: Tests
13+
runs-on: ubuntu-20.04
14+
env:
15+
DB_USER: root
16+
DB_PASSWORD: root
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
cfengine: [ "lucee@5", "adobe@2018", "adobe@2021" ]
21+
steps:
22+
- name: Checkout Repository
23+
uses: actions/checkout@v2
24+
25+
- name: Setup Java
26+
uses: actions/setup-java@v2
27+
with:
28+
distribution: "adopt"
29+
java-version: "11"
30+
31+
- name: Setup Environment For Testing Process
32+
run: |
33+
# Setup .env
34+
touch .env
35+
# ENV
36+
printf "ENVIRONMENT=development\n" >> .env
37+
printf "DB_HOST=localhost\n" >> .env
38+
printf "DB_USER=${{ env.DB_USER }}\n" >> .env
39+
printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> .env
40+
printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> .env
41+
printf "DB_BUNDLEVERSION=8.0.19\n" >> .env
42+
printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env
43+
44+
- name: Setup CommandBox CLI
45+
uses: Ortus-Solutions/setup-commandbox@main
46+
47+
- name: Install Dependencies
48+
run: |
49+
box install
50+
cd test-harness && box install
51+
52+
- name: Start ${{ matrix.cfengine }} Server
53+
run: |
54+
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug
55+
# Install Adobe 2021 cfpm modules
56+
if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then
57+
box run-script install:2021
58+
fi
59+
curl http://127.0.0.1:60299
60+
61+
- name: Run Tests
62+
run: |
63+
mkdir -p test-harness/tests/results
64+
box testbox run --verbose outputFile=test-harness/tests/results/test-results outputFormats=json,antjunit
65+
ls -lR test-harness/tests
66+
67+
- name: Publish Test Results
68+
uses: EnricoMi/publish-unit-test-result-action@v1
69+
if: always()
70+
with:
71+
files: test-harness/tests/results/**/*.xml
72+
check_name: "${{ matrix.cfengine }} Test Results"
73+
74+
- name: Upload Test Results to Artifacts
75+
if: always()
76+
uses: actions/upload-artifact@v2
77+
with:
78+
name: test-results-${{ matrix.cfengine }}
79+
path: |
80+
test-harness/tests/results/**/*
81+
82+
- name: Failure Debugging Log
83+
if: ${{ failure() }}
84+
run: |
85+
box server log serverConfigFile="server-${{ matrix.cfengine }}.json"
86+
87+
- name: Upload Debugging Log To Artifacts
88+
if: ${{ failure() }}
89+
uses: actions/upload-artifact@v2
90+
with:
91+
name: Failure Debugging Info - ${{ matrix.cfengine }}
92+
path: |
93+
.engine/**/logs/*
94+
.engine/**/WEB-INF/cfusion/logs/*
95+
96+
- name: Slack Notifications
97+
# Only on failures and NOT in pull requests
98+
if: ${{ failure() && !startsWith( 'pull_request', github.event_name ) }}
99+
uses: rtCamp/action-slack-notify@v2
100+
env:
101+
SLACK_CHANNEL: coding
102+
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
103+
SLACK_ICON_EMOJI: ":bell:"
104+
SLACK_MESSAGE: '${{ github.repository }} tests failed :cry:'
105+
SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} failed
106+
SLACK_USERNAME: CI
107+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

.gitignore

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
.vscode
2-
1+
# Artifacts and temp folders
32
.artifacts/**
43
.tmp/**
54

6-
test-harness/.engine/**
5+
# Engine + Secrets + databases
6+
.env
7+
.engine/**
8+
.db/**
9+
10+
# Dependencies
711
test-harness/coldbox/**
812
test-harness/docbox/**
913
test-harness/testbox/**
1014
test-harness/logs/**
1115
test-harness/modules/**
1216

17+
# modules
18+
modules/**
19+
1320
# log files
14-
logs/**
21+
logs/**

ModuleConfig.cfc

+1-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ component {
2222
*/
2323
function configure(){
2424
// Module Settings
25-
settings = {
26-
libPath : modulePath & "/models/lib",
27-
workFactor : 12
28-
};
25+
settings = { libPath : modulePath & "/models/lib", workFactor : 12 };
2926
}
3027

3128
/**

0 commit comments

Comments
 (0)