generated from coldbox-modules/module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 15d7e7d
Showing
41 changed files
with
2,358 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"adminPassword" : "coldbox", | ||
"debuggingEnabled":true, | ||
"debuggingReportExecutionTimes":false, | ||
"disableInternalCFJavaComponents":false, | ||
"inspectTemplate":"always", | ||
"requestTimeout":"0,0,0,90", | ||
"robustExceptionEnabled":true, | ||
"datasources": { | ||
"coolblog": { | ||
"class":"${DB_CLASS}", | ||
"dbdriver": "MySQL", | ||
"dsn":"jdbc:mysql://{host}:{port}/{database}", | ||
"custom":"useUnicode=true&characterEncoding=UTF8&serverTimezone=UTC&useLegacyDatetimeCode=true&autoReconnect=true&useSSL=false", | ||
"host":"${DB_HOST:127.0.0.1}", | ||
"username": "${DB_USER:root}", | ||
"password": "${DB_PASSWORD}", | ||
"database": "coolblog", | ||
"port": "${DB_PORT:3306}", | ||
"storage":"false", | ||
"bundleName": "${DB_BUNDLENAME}", | ||
"bundleVersion": "${DB_BUNDLEVERSION}", | ||
"validate":"false" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"array.empty_padding": false, | ||
"array.padding": true, | ||
"array.multiline.min_length": 50, | ||
"array.multiline.element_count": 2, | ||
"array.multiline.leading_comma.padding": true, | ||
"array.multiline.leading_comma": false, | ||
"alignment.consecutive.assignments": true, | ||
"alignment.consecutive.properties": true, | ||
"alignment.consecutive.params": true, | ||
"alignment.doc_comments" : true, | ||
"brackets.padding": true, | ||
"comment.asterisks": "align", | ||
"binary_operators.padding": true, | ||
"for_loop_semicolons.padding": true, | ||
"function_call.empty_padding": false, | ||
"function_call.padding": true, | ||
"function_call.multiline.leading_comma.padding": true, | ||
"function_call.casing.builtin": "cfdocs", | ||
"function_call.casing.userdefined": "camel", | ||
"function_call.multiline.element_count": 3, | ||
"function_call.multiline.leading_comma": false, | ||
"function_call.multiline.min_length": 50, | ||
"function_declaration.padding": true, | ||
"function_declaration.empty_padding": false, | ||
"function_declaration.multiline.leading_comma": false, | ||
"function_declaration.multiline.leading_comma.padding": true, | ||
"function_declaration.multiline.element_count": 3, | ||
"function_declaration.multiline.min_length": 50, | ||
"function_declaration.group_to_block_spacing": "compact", | ||
"function_anonymous.empty_padding": false, | ||
"function_anonymous.group_to_block_spacing": "compact", | ||
"function_anonymous.multiline.element_count": 3, | ||
"function_anonymous.multiline.leading_comma": false, | ||
"function_anonymous.multiline.leading_comma.padding": true, | ||
"function_anonymous.multiline.min_length": 50, | ||
"function_anonymous.padding": true, | ||
"indent_size": 4, | ||
"keywords.block_to_keyword_spacing": "spaced", | ||
"keywords.group_to_block_spacing": "spaced", | ||
"keywords.padding_inside_group": true, | ||
"keywords.spacing_to_block": "spaced", | ||
"keywords.spacing_to_group": true, | ||
"keywords.empty_group_spacing": false, | ||
"max_columns": 115, | ||
"metadata.multiline.element_count": 3, | ||
"metadata.multiline.min_length": 50, | ||
"method_call.chain.multiline" : 3, | ||
"newline":"\n", | ||
"property.multiline.element_count": 3, | ||
"property.multiline.min_length": 30, | ||
"parentheses.padding": true, | ||
"strings.quote": "double", | ||
"strings.attributes.quote": "double", | ||
"struct.separator": " : ", | ||
"struct.padding": true, | ||
"struct.empty_padding": false, | ||
"struct.multiline.leading_comma": false, | ||
"struct.multiline.leading_comma.padding": true, | ||
"struct.multiline.element_count": 2, | ||
"struct.multiline.min_length": 60, | ||
"tab_indent": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"rule": [], | ||
"includes": [ | ||
{ "code": "AVOID_USING_CFINCLUDE_TAG" }, | ||
{ "code": "AVOID_USING_CFABORT_TAG" }, | ||
{ "code": "AVOID_USING_CFEXECUTE_TAG" }, | ||
{ "code": "AVOID_USING_DEBUG_ATTR" }, | ||
{ "code": "AVOID_USING_ABORT" }, | ||
{ "code": "AVOID_USING_ISDATE" }, | ||
{ "code": "AVOID_USING_ISDEBUGMODE" }, | ||
{ "code": "AVOID_USING_CFINSERT_TAG" }, | ||
{ "code": "AVOID_USING_CFUPDATE_TAG" }, | ||
{ "code": "ARG_VAR_CONFLICT" }, | ||
{ "code": "ARG_HINT_MISSING" }, | ||
{ "code": "ARG_HINT_MISSING_SCRIPT" }, | ||
{ "code" : "ARGUMENT_INVALID_NAME" }, | ||
{ "code" : "ARGUMENT_ALLCAPS_NAME" }, | ||
{ "code" : "ARGUMENT_TOO_WORDY" }, | ||
{ "code" : "ARGUMENT_IS_TEMPORARY" }, | ||
{ "code": "CFQUERYPARAM_REQ" }, | ||
{ "code": "COMPARE_INSTEAD_OF_ASSIGN" }, | ||
{ "code": "COMPONENT_HINT_MISSING" }, | ||
{ "code" : "COMPONENT_INVALID_NAME" }, | ||
{ "code" : "COMPONENT_ALLCAPS_NAME" }, | ||
{ "code" : "COMPONENT_TOO_SHORT" }, | ||
{ "code" : "COMPONENT_TOO_LONG" }, | ||
{ "code" : "COMPONENT_TOO_WORDY" }, | ||
{ "code" : "COMPONENT_IS_TEMPORARY" }, | ||
{ "code" : "COMPONENT_HAS_PREFIX_OR_POSTFIX" }, | ||
{ "code": "COMPLEX_BOOLEAN_CHECK" }, | ||
{ "code": "EXCESSIVE_ARGUMENTS" }, | ||
{ "code": "EXCESSIVE_FUNCTIONS" }, | ||
{ "code": "EXPLICIT_BOOLEAN_CHECK" }, | ||
{ "code": "FUNCTION_TOO_COMPLEX" }, | ||
{ "code": "FUNCTION_HINT_MISSING" }, | ||
{ "code": "FILE_SHOULD_START_WITH_LOWERCASE" }, | ||
{ "code": "LOCAL_LITERAL_VALUE_USED_TOO_OFTEN" }, | ||
{ "code": "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN" }, | ||
{ "code": "MISSING_VAR" }, | ||
{ "code" : "METHOD_INVALID_NAME" }, | ||
{ "code" : "METHOD_ALLCAPS_NAME" }, | ||
{ "code" : "METHOD_IS_TEMPORARY" }, | ||
{ "code": "NESTED_CFOUTPUT" }, | ||
{ "code": "NEVER_USE_QUERY_IN_CFM" }, | ||
{ "code": "OUTPUT_ATTR" }, | ||
{ "code" : "QUERYPARAM_REQ" }, | ||
{ "code": "UNUSED_LOCAL_VARIABLE" }, | ||
{ "code": "UNUSED_METHOD_ARGUMENT" }, | ||
{ "code": "SQL_SELECT_STAR" }, | ||
{ "code": "SCOPE_ALLCAPS_NAME" }, | ||
{ "code": "VAR_ALLCAPS_NAME" }, | ||
{ "code": "VAR_INVALID_NAME" }, | ||
{ "code": "VAR_TOO_WORDY" } | ||
], | ||
"inheritParent": false, | ||
"parameters": { | ||
"TooManyFunctionsChecker.maximum" : 50 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = false | ||
indent_style = tab | ||
indent_size = 4 | ||
tab_width = 4 | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.{md,markdown}] | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_USER=root | ||
DB_PASSWORD=mysql | ||
DB_CLASS=com.mysql.cj.jdbc.Driver | ||
DB_BUNDLEVERSION=8.0.19 | ||
DB_BUNDLENAME=com.mysql.cj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
*.sln merge=union | ||
*.csproj merge=union | ||
*.vbproj merge=union | ||
*.fsproj merge=union | ||
*.dbproj merge=union | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
patreon: ortussolutions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
name: @MODULE_NAME@ CI | ||
|
||
# Only on Development we build snapshots | ||
on: | ||
push: | ||
branches: | ||
- development | ||
- master | ||
|
||
env: | ||
MODULE_ID: @MODULE_SLUG@ | ||
|
||
jobs: | ||
############################################# | ||
# Tests First baby! We fail, no build :( | ||
############################################# | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
secrets: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
|
||
############################################# | ||
# Build ContentBox | ||
############################################# | ||
build: | ||
name: Build & Publish | ||
needs: tests | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: "adopt" | ||
java-version: "11" | ||
|
||
- 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/[email protected] | ||
with: | ||
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} | ||
|
||
- name: Setup Environment Variables For Build Process | ||
id: current_version | ||
run: | | ||
echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV | ||
box package set [email protected]@[email protected]@ | ||
# master or snapshot | ||
echo "Github Ref is $GITHUB_REF" | ||
echo "BRANCH=master" >> $GITHUB_ENV | ||
if [ $GITHUB_REF == 'refs/heads/development' ] | ||
then | ||
echo "BRANCH=development" >> $GITHUB_ENV | ||
fi | ||
- name: Build ${{ env.MODULE_ID }} | ||
run: | | ||
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 }} | ||
- name: Upload Build Artifacts | ||
if: success() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.MODULE_ID }} | ||
path: | | ||
.artifacts/**/* | ||
- name: Upload Binaries to S3 | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read | ||
env: | ||
AWS_S3_BUCKET: "downloads.ortussolutions.com" | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} | ||
SOURCE_DIR: ".artifacts/${{ env.MODULE_ID }}" | ||
DEST_DIR: "ortussolutions/coldbox-modules/${{ env.MODULE_ID }}" | ||
|
||
- name: Upload API Docs to S3 | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read | ||
env: | ||
AWS_S3_BUCKET: "apidocs.ortussolutions.com" | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} | ||
SOURCE_DIR: ".tmp/apidocs" | ||
DEST_DIR: "coldbox-modules/${{ env.MODULE_ID }}/${{ env.VERSION }}" | ||
|
||
- name: Publish To ForgeBox | ||
run: | | ||
cd .tmp/${{ env.MODULE_ID }} | ||
cat box.json | ||
box forgebox publish | ||
- name: Inform Slack of Build | ||
if: ${{ always() }} | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_CHANNEL: coding | ||
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' | ||
SLACK_ICON_EMOJI: ":bell:" | ||
SLACK_MESSAGE: '${{ env.MODULE_ID }} Built with ${{ job.status }}!' | ||
SLACK_TITLE: "${{ env.MODULE_ID }} Build" | ||
SLACK_USERNAME: CI | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Pull Requests | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- "main" | ||
- "master" | ||
- "development" | ||
pull_request: | ||
branches: | ||
- development | ||
|
||
jobs: | ||
# UPDATE TO THE MODULE REPO SO PR'S CAN REUSE IT | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
|
||
# Format PR | ||
format: | ||
name: Format | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- uses: Ortus-Solutions/[email protected] | ||
with: | ||
cmd: run-script format | ||
|
||
- name: Commit Format Changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Apply cfformat changes |
Oops, something went wrong.