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
Showing
22 changed files
with
563 additions
and
290 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
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 |
---|---|---|
@@ -1,7 +1,21 @@ | ||
LUCEE_EXTENSIONS=671B01B8-B3B3-42B9-AC055A356BED5281;version=42.7.4 | ||
|
||
## Module settings | ||
TINYURL_ENABLED=true | ||
KUTT_ENDPOINT=http://127.0.0.1:3000 | ||
KUTT_THROWONERROR=true | ||
KUTT_AUTHTOKEN= | ||
|
||
## Kutt PG database settings | ||
DB_CLASS=org.postgresql.Driver | ||
DB_DRIVER=PostgreSQL | ||
DB_BUNDLEVERSION=42.7.4 | ||
DB_BUNDLENAME=org.postgresql.jdbc42 | ||
# DB Location | ||
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 | ||
DB_PORT=5432 | ||
DB_CONNECTIONSTRING=jdbc:postgresql://localhost:5432/kutt | ||
# DB Credentials | ||
DB_DATABASE=kutt | ||
DB_USER= | ||
DB_PASSWORD= |
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
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 |
---|---|---|
|
@@ -12,8 +12,8 @@ jobs: | |
name: Tests | ||
runs-on: ubuntu-20.04 | ||
env: | ||
DB_USER: root | ||
DB_PASSWORD: root | ||
DB_USER: kutt | ||
DB_PASSWORD: T1nyURLs! | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
fail-fast: false | ||
|
@@ -39,12 +39,6 @@ jobs: | |
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
# - name: Setup Database and Fixtures | ||
# run: | | ||
# sudo systemctl start mysql.service | ||
# mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE mementifier;' | ||
# mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/coolblog.sql | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
|
@@ -54,20 +48,24 @@ jobs: | |
- name: Setup CommandBox CLI | ||
uses: Ortus-Solutions/[email protected] | ||
|
||
# Not Needed in this module | ||
#- name: Setup Environment For Testing Process | ||
# run: | | ||
# # Setup .env | ||
# touch .env | ||
# # ENV | ||
# printf "DB_HOST=localhost\n" >> .env | ||
# printf "DB_DATABASE=mydatabase\n" >> .env | ||
# printf "DB_DRIVER=MySQL\n" >> .env | ||
# printf "DB_USER=${{ env.DB_USER }}\n" >> .env | ||
# printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> .env | ||
# printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> .env | ||
# printf "DB_BUNDLEVERSION=8.0.19\n" >> .env | ||
# printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env | ||
- name: Setup Environment For Testing Process | ||
run: | | ||
touch .env | ||
printf "LUCEE_EXTENSIONS=671B01B8-B3B3-42B9-AC055A356BED5281;version=42.7.4" >> .env | ||
printf "TINYURL_ENABLED=true" >> .env | ||
printf "KUTT_ENDPOINT=http://127.0.0.1:3000" >> .env | ||
printf "KUTT_THROWONERROR=true" >> .env | ||
printf "KUTT_AUTHTOKEN=" >> .env | ||
printf "DB_CLASS=org.postgresql.Driver" >> .env | ||
printf "DB_DRIVER=PostgreSQL" >> .env | ||
printf "DB_BUNDLEVERSION=42.7.4" >> .env | ||
printf "DB_BUNDLENAME=org.postgresql.jdbc42" >> .env | ||
printf "DB_HOST=127.0.0.1" >> .env | ||
printf "DB_PORT=5432" >> .env | ||
printf "DB_CONNECTIONSTRING=jdbc:postgresql://localhost:5432/kutt" >> .env | ||
printf "DB_DATABASE=kutt" >> .env | ||
printf "DB_USER=${{ env.DB_USER }}\n" >> .env | ||
printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> .env | ||
- name: Install Test Harness with ColdBox ${{ matrix.coldboxVersion }} | ||
run: | | ||
|
@@ -76,6 +74,9 @@ jobs: | |
box package set dependencies.coldbox=${{ matrix.coldboxVersion }} | ||
box install | ||
- name: Start Kutt Stack | ||
uses: hoverkraft-tech/[email protected] | ||
|
||
- name: Start ${{ matrix.cfengine }} Server | ||
run: | | ||
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug | ||
|
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
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 |
---|---|---|
|
@@ -6,17 +6,17 @@ | |
component { | ||
|
||
// Module Properties | ||
this.title = "@MODULE_NAME@"; | ||
this.title = "Kutt SDK"; | ||
this.author = "Ortus Solutions"; | ||
this.webURL = "https://www.ortussolutions.com"; | ||
this.description = "@MODULE_DESCRIPTION@"; | ||
this.description = "Tiny URL SDK for kutt.it"; | ||
this.version = "@build.version@[email protected]@"; | ||
|
||
// Model Namespace | ||
this.modelNamespace = "@MODULE_SLUG@"; | ||
this.modelNamespace = "Kutt"; | ||
|
||
// CF Mapping | ||
this.cfmapping = "@MODULE_SLUG@"; | ||
this.cfmapping = "Kutt"; | ||
|
||
// Dependencies | ||
this.dependencies = []; | ||
|
@@ -25,9 +25,19 @@ component { | |
* Configure Module | ||
*/ | ||
function configure(){ | ||
// module settings - stored in modules.name.settings | ||
settings = { | ||
|
||
"enabled" : getSystemSetting( "TINYURL_ENABLED", true ), | ||
"endpoint" : getSystemSetting( "KUTT_ENDPOINT", "" ), | ||
"authToken" : getSystemSetting( "KUTT_AUTHTOKEN", "" ), | ||
"defaultExipration" : "30 days", | ||
"throwOnError" : getSystemSetting( "KUTT_THROWONERROR", false ) | ||
}; | ||
|
||
if( !len( settings.endpoint ) ){ | ||
log.error( "The tiny-url module requires an endpoint to be set in the configuration. Module functionality has been deactivated" ); | ||
settings.enabled = 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 |
---|---|---|
@@ -1,54 +1,62 @@ | ||
{ | ||
"name" : "@MODULE_NAME@", | ||
"version" : "1.0.0", | ||
"location" : "https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/@MODULE_SLUG@/@build.version@/@MODULE_SLUG@[email protected]@.zip", | ||
"author" : "Ortus Solutions <[email protected]>", | ||
"homepage" : "https://github.com/coldbox-modules/@MODULE_SLUG@", | ||
"documentation" : "https://github.com/coldbox-modules/@MODULE_SLUG@", | ||
"repository" : { "type" : "git", "url" : "https://github.com/coldbox-modules/@MODULE_SLUG@" }, | ||
"bugs" : "https://github.com/coldbox-modules/@MODULE_SLUG@", | ||
"shortDescription" : "Description goes here", | ||
"slug" : "@MODULE_SLUG@", | ||
"type" : "modules", | ||
"keywords":"", | ||
"license" : [ | ||
{ "type" : "Apache2", "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" } | ||
], | ||
"contributors" : [ | ||
], | ||
"dependencies" :{ | ||
}, | ||
"devDependencies" :{ | ||
"commandbox-cfformat":"*", | ||
"name":"KuttSDK", | ||
"version":"1.0.0", | ||
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/kutt-sdk/@build.version@/[email protected]@.zip", | ||
"author":"Ortus Solutions <[email protected]>", | ||
"homepage":"https://github.com/coldbox-modules/kutt-sdk", | ||
"documentation":"https://github.com/coldbox-modules/kutt-sdk", | ||
"repository":{ | ||
"type":"git", | ||
"url":"https://github.com/coldbox-modules/kutt-sdk" | ||
}, | ||
"bugs":"https://github.com/coldbox-modules/kutt-sdk", | ||
"shortDescription":"An SKD for creating short URLs with the Kutt API", | ||
"slug":"kutt-sdk", | ||
"type":"modules", | ||
"keywords":"", | ||
"license":[ | ||
{ | ||
"type":"Apache2", | ||
"url":"http://www.apache.org/licenses/LICENSE-2.0.html" | ||
} | ||
], | ||
"contributors":[], | ||
"dependencies":{ | ||
"hyper":"^8.0.0" | ||
}, | ||
"devDependencies":{ | ||
"commandbox-cfformat":"*", | ||
"commandbox-docbox":"*", | ||
"commandbox-dotenv":"*", | ||
"commandbox-dotenv":"*", | ||
"commandbox-cfconfig":"*" | ||
}, | ||
"ignore":[ | ||
}, | ||
"ignore":[ | ||
"**/.*", | ||
"test-harness", | ||
"/server*.json" | ||
"/server*.json" | ||
], | ||
"scripts":{ | ||
"setupTemplate": "task run taskFile=build/SetupTemplate.cfc", | ||
"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`", | ||
"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`", | ||
"install:dependencies":"install && cd test-harness && install", | ||
"release":"recipe build/release.boxr", | ||
"release":"recipe build/release.boxr", | ||
"format":"cfformat run helpers,models,test-harness/tests/,ModuleConfig.cfc --overwrite", | ||
"format:watch":"cfformat watch helpers,models,test-harness/tests/,ModuleConfig.cfc ./.cfformat.json", | ||
"format:check":"cfformat check helpers,models,test-harness/tests/,ModuleConfig.cfc ./.cfformat.json", | ||
"start:lucee" : "server start [email protected]", | ||
"start:2018" : "server start [email protected]", | ||
"start:2021" : "server start [email protected]", | ||
"stop:lucee" : "server stop [email protected]", | ||
"stop:2018" : "server stop [email protected]", | ||
"stop:2021" : "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" | ||
"start:lucee":"server start [email protected]", | ||
"start:2018":"server start [email protected]", | ||
"start:2021":"server start [email protected]", | ||
"stop:lucee":"server stop [email protected]", | ||
"stop:2018":"server stop [email protected]", | ||
"stop:2021":"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" | ||
}, | ||
"testbox":{ | ||
"testbox":{ | ||
"runner":"http://localhost:60299/tests/runner.cfm" | ||
}, | ||
"installPaths":{ | ||
"hyper":"modules/hyper/" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.