Skip to content

Commit

Permalink
Merge branches 'development' and 'master' of github.com:coldbox-modul…
Browse files Browse the repository at this point in the history
…es/route-visualizer
  • Loading branch information
lmajano committed Mar 27, 2023
2 parents d64027e + 54dbc5a commit 5732a0a
Show file tree
Hide file tree
Showing 47 changed files with 1,190 additions and 757 deletions.
26 changes: 26 additions & 0 deletions .cfconfig.json
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"
}
}
}
63 changes: 63 additions & 0 deletions .cfformat.json
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
}
12 changes: 2 additions & 10 deletions .cflintrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{
"rule": [],
"includes": [
{ "code": "AVOID_USING_STRUCTNEW" },
{ "code": "AVOID_USING_ARRAYNEW" },
{ "code": "AVOID_USING_CFINCLUDE_TAG" },
{ "code": "AVOID_USING_CFABORT_TAG" },
{ "code": "AVOID_USING_CFEXECUTE_TAG" },
{ "code": "AVOID_USING_DEBUG_ATTR" },
{ "code": "AVOID_USING_CREATEOBJECT" },
{ "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_VAR_MIXED" },
{ "code": "ARG_HINT_MISSING" },
{ "code": "ARG_HINT_MISSING_SCRIPT" },
{ "code" : "ARGUMENT_INVALID_NAME" },
Expand All @@ -32,16 +28,13 @@
{ "code" : "COMPONENT_IS_TEMPORARY" },
{ "code" : "COMPONENT_HAS_PREFIX_OR_POSTFIX" },
{ "code": "COMPLEX_BOOLEAN_CHECK" },
{ "code": "EXCESSIVE_FUNCTION_LENGTH" },
{ "code": "EXCESSIVE_COMPONENT_LENGTH" },
{ "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_VAR" },
{ "code": "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN" },
{ "code": "MISSING_VAR" },
{ "code" : "METHOD_INVALID_NAME" },
Expand All @@ -57,11 +50,10 @@
{ "code": "SCOPE_ALLCAPS_NAME" },
{ "code": "VAR_ALLCAPS_NAME" },
{ "code": "VAR_INVALID_NAME" },
{ "code": "VAR_TOO_WORDY" },
{ "code": "VAR_IS_TEMPORARY" }
{ "code": "VAR_TOO_WORDY" }
],
"inheritParent": false,
"parameters": {
"TooManyFunctionsChecker.maximum" : 20
"TooManyFunctionsChecker.maximum" : 50
}
}
7 changes: 7 additions & 0 deletions .env.template
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
20 changes: 10 additions & 10 deletions .gitattributes
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
*.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
*.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
1 change: 1 addition & 0 deletions .github/FUNDING.YML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patreon: ortussolutions
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
---

<!-- Thanks for reporting an issue! Please fill out the blanks below. -->

## What are the steps to reproduce this issue?

1.
2.
3.

## What happens?


## What were you expecting to happen?


## Any logs, error output, etc?


## Any other comments?


## What versions are you using?

**Operating System:**
**Package Version:**
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature Request
about: Request a new feature or enhancement
---

<!-- Thanks for taking the time to recommend a feature! Please fill out the form below -->

## Summary

<!-- High level description of what this feature is -->

## Detailed Description

<!-- Lets get into the weeds here -->

## Possible Implementation Ideas

<!-- If you already have some idea of how to implement this, this would be the place to put it -->
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Description

Please include a summary of the changes and which issue(s) is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

**Please note that all PRs must have tests attached to them**

IMPORTANT: Please review the [CONTRIBUTING.md](../CONTRIBUTING.md) file for detailed contributing guidelines.

## Issues

All PRs must have an accompanied issue. Please make sure you created it and linked it here.

## Type of change

Please delete options that are not relevant.

- [ ] Bug Fix
- [ ] Improvement
- [ ] New Feature
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## Checklist

- [ ] My code follows the style guidelines of this project [cfformat](../.cfformat.json)
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
107 changes: 107 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: route-visualizer CI

# Only on Development we build snapshots
on:
push:
branches:
- development
- master

env:
MODULE_ID: route-visualizer

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/[email protected]

- name: Setup Java
uses: actions/[email protected]
with:
distribution: "temurin"
java-version: "11"

- 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/[email protected]
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 }}
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/[email protected]
- uses: taiki-e/[email protected]
with:
# Produced by the build/Build.cfc
changelog: changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 5732a0a

Please sign in to comment.