diff --git a/.travis/configure.sh b/.travis/configure.sh index e5f82d664..17ed697b7 100755 --- a/.travis/configure.sh +++ b/.travis/configure.sh @@ -133,4 +133,4 @@ echo " app/Config/database.php - echo -e "{green}Unit Test was set up in app/Config/database.php{nc}" + echo -e "${green}Unit Test was set up in app/Config/database.php${nc}" diff --git a/Scripts/lib/parsing.sh b/Scripts/lib/parsing.sh index 688256143..6cf521da6 100755 --- a/Scripts/lib/parsing.sh +++ b/Scripts/lib/parsing.sh @@ -4,7 +4,7 @@ parse_sql_password() { [ $# -lt 2 ] && echo "Usage: $0 -p|-t|--*sql-password*|*= " && return $FALSE pass=$(echo $1 | cut -f 2 -d '=') while true; do case "$pass" in - *sql-password|-[pPtT]) + *sql-password*|-[pPtT]*) read -sp " Please, enter the $3 SQL password now: " pass;; @@ -15,6 +15,7 @@ Please, enter the $3 SQL password now: *) break;; esac; done + #;echo $pass export $2=$pass } #; export -f parse_sql_password diff --git a/app/Config/boot_profile.cms.php b/app/Config/boot_profile.cms.php index f15320817..74fa32c2e 100644 --- a/app/Config/boot_profile.cms.php +++ b/app/Config/boot_profile.cms.php @@ -13,7 +13,10 @@ PHP (more exactly spl_autoload) does the rest for you and is even quicker than a semantically equal self-defined autoload function like this one */ -App::build(array('Cms' => array(WWW_ROOT . 'php_cms' . DS . 'e13' . DS . 'include' . DS)), App::REGISTER); +App::build(array( + 'Cms' => array(WWW_ROOT . 'php_cms' . DS . 'e13' . DS . 'include' . DS), + 'Model/Datasource/Database' => array(APP . 'Model' . DS . 'Datasource' . DS . 'Database') +), App::REGISTER); /** * Load DebugKit plugin */ diff --git a/migrate-database.sh b/migrate-database.sh index 345034642..c70a89497 100755 --- a/migrate-database.sh +++ b/migrate-database.sh @@ -29,7 +29,7 @@ fix_socket="-Y" config_app_checked="" update_checked=0 import_identities=0 -identities=app/Config/Schema/database.sql +identities=app/Config/database.sql new_pass="" new_test_pass="" saved=("$*") @@ -45,8 +45,8 @@ while [[ "$#" > 0 ]]; do case $1 in ;; -[iI]* ) import_identities=1 - new_pass=$1 - new_test_pass=$2 + new_pass=$2 + new_test_pass=$3 shift;shift;; -[vV]*|--verbose ) [ -f $identities ] && cat $identities diff --git a/test-cake.sh b/test-cake.sh index 31f5e6899..8a08f2716 100755 --- a/test-cake.sh +++ b/test-cake.sh @@ -11,7 +11,10 @@ while [[ "$#" > 0 ]]; do case $1 in export TRAVIS_PHP_VERSION=$(php -v | grep -E "[5-7]\.\\d+\.\\d+" | cut -d " " -f 2 | cut -c 1-3 ) # remote servers CI don't need (-i) identities but the socket: use configure.sh --mig-database --openshift - source ./configure.sh "--mig-database" "-p=root" "-t=test" "-i" "-p=root" "-t=test" + notice="\n${cyan}Notice:${nc}The test script is about to modify the root and test users password to, resp. ${orange}'proot'${nc} and ${cyan}'ptest'${nc}\n" + echo -e $notice + source ./configure.sh "--mig-database" "-p" "-t" "-i" "-p=proot" "-t=ptest" + echo -e $notice source .travis/configure.sh;; --cov ) export COLLECT_COVERAGE=true;;