-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
19 changed files
with
271 additions
and
255 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 |
---|---|---|
|
@@ -10,7 +10,6 @@ env: | |
- MODULE_ID=mementifier | ||
matrix: | ||
- ENGINE=lucee@5 | ||
- ENGINE=adobe@11 | ||
- ENGINE=adobe@2016 | ||
- ENGINE=adobe@2018 | ||
|
||
|
@@ -33,31 +32,31 @@ addons: | |
before_install: | ||
# CommandBox Keys | ||
- curl -fsSl https://downloads.ortussolutions.com/debs/gpg | sudo apt-key add - | ||
- sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a | ||
- sudo echo "deb https://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a | ||
/etc/apt/sources.list.d/commandbox.list | ||
|
||
install: | ||
# Install Commandbox | ||
- sudo apt-get update && sudo apt-get --assume-yes install rsync jq commandbox | ||
# Install CommandBox Supporting Librarires | ||
- box install commandbox-cfconfig,commandbox-dotenv,commandbox-docbox | ||
# If using auto-publish, you will need to provide your API token with this line: | ||
- box config set endpoints.forgebox.APIToken=$FORGEBOX_API_TOKEN > /dev/null | ||
|
||
before_script: | ||
# create test database | ||
# create database | ||
- mysql -u root -e 'create database mementifier;' | ||
# import database | ||
#- mysql -u root < test-harness/tests/resources/coolblog.sql | ||
#- mysql -u root < test-harness/tests/resources/cbsecurity.sql | ||
#- echo "Database created and loaded with test data" | ||
# Seed .env | ||
- echo "Seeding database .env file at /test-harness/.env" | ||
- touch test-harness/.env | ||
- printf "DB_HOST=localhost\n" >> test-harness/.env | ||
- printf "DB_DATABASE=mementifier\n" >> test-harness/.env | ||
- printf "DB_USER=root\n" >> test-harness/.env | ||
- printf "DB_USERNAME=root\n" >> test-harness/.env | ||
- printf "DB_PASSWORD=\n" >> test-harness/.env | ||
|
||
install: | ||
# Install Commandbox | ||
- sudo apt-get update && sudo apt-get --assume-yes install rsync jq commandbox | ||
# Install CommandBox Supporting Librarires | ||
- box install commandbox-cfconfig,commandbox-dotenv,commandbox-docbox | ||
# If using auto-publish, you will need to provide your API token with this line: | ||
- box config set endpoints.forgebox.APIToken=$FORGEBOX_API_TOKEN > /dev/null | ||
|
||
script: | ||
# Set Current Version | ||
- TARGET_VERSION=`cat $TRAVIS_BUILD_DIR/box.json | jq '.version' -r` | ||
|
@@ -68,12 +67,9 @@ script: | |
- cd test-harness | ||
# run our dependency install to ensure the workbench is in place | ||
- box install | ||
- rm -Rf modules/cborm/modules/mementifier | ||
# run our matrix server | ||
- box server start serverConfigFile="server-${ENGINE}.json" | ||
# If lucee 5 stop it due to stupid ORM bug that never gets fixed on first start. | ||
- echo "Checking if lucee5 so we can do a restart due to a stupid ORM startup bug." | ||
- if [ ${ENGINE} = 'lucee@5' ]; then box server stop; fi | ||
- if [ ${ENGINE} = 'lucee@5' ]; then box server start serverConfigFile="[email protected]"; fi | ||
# Startup the app | ||
- curl http://localhost:60299 | ||
# Debugging of tests | ||
|
@@ -86,7 +82,6 @@ script: | |
- cat build/results.json | ||
|
||
after_failure: | ||
- cat build/results.json | ||
- cd $TRAVIS_BUILD_DIR/test-harness | ||
# Display the contents of our root directory | ||
# Spit out our Commandbox log in case we need to debug | ||
|
@@ -132,4 +127,4 @@ after_deploy: | |
- cd ${TRAVIS_BUILD_DIR}/.tmp/${MODULE_ID} | ||
- cat box.json | ||
# Only publish once | ||
- if [ ${ENGINE} = 'lucee@5' ]; then box forgebox publish; fi | ||
- if [ ${ENGINE} = 'lucee@5' ]; then box forgebox publish; fi |
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,6 +1,6 @@ | ||
{ | ||
"name":"Mementifier : The State Maker!", | ||
"version":"1.9.0", | ||
"version":"2.0.0", | ||
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/mementifier/@build.version@/[email protected]@.zip", | ||
"author":"Ortus Solutions, Corp", | ||
"homepage":"https://github.com/coldbox-modules/mementifier", | ||
|
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
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 |
---|---|---|
|
@@ -23,7 +23,9 @@ moduleSettings = { | |
// Enable orm auto default includes: If true and an object doesn't have any `memento` struct defined | ||
// this module will create it with all properties and relationships it can find for the target entity | ||
// leveraging the cborm module. | ||
ormAutoIncludes = true | ||
ormAutoIncludes = true, | ||
// The default value for relationships/getters which return null | ||
nullDefaultValue = '' | ||
} | ||
} | ||
``` | ||
|
@@ -269,6 +271,37 @@ function process( | |
){} | ||
``` | ||
|
||
## Running The Test Suites | ||
|
||
In order to collaborate on this project you will need to do a few things in order to get the test harness ready for execution. The `test-harness` folder is where the ColdBox test app exists that consumes the module for testing. The `test-harness/tests/specs` is where all the specs for testing are located. | ||
|
||
### Database | ||
|
||
Create a database called `mementifier` in any RDBMS you like. We have mostly used MySQL for the tests. | ||
|
||
### Environment | ||
|
||
Copy the `.env.template` as `.env` and modify it accordingly so it can connect to your database. | ||
|
||
### Dependencies | ||
|
||
Go into the root of `test-harness` and run a CommandBox shell: `box`. Once in the shell install the dependencies `install`. | ||
|
||
### Start a Server | ||
|
||
Start a server, we have configured for you several CFML engines for you to test against, pick one from the list below: | ||
|
||
- `server start [email protected]` | ||
- `server start [email protected]` | ||
- `server start [email protected]` | ||
- `server start [email protected]` | ||
|
||
Then you can hit the test site app at http://localhost:60299. This will create the database for you using the ColdFusion ORM. | ||
|
||
### Running Tests | ||
|
||
You can then run the tests at http://localhost:60299/tests/runner.cfm | ||
|
||
******************************************************************************** | ||
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp | ||
www.ortussolutions.com | ||
|
Oops, something went wrong.