diff --git a/README.md b/README.md
index 5db7e6c..9dfff35 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,34 @@
# General
-The Orange Management software is a modular web application for small to mid sized companies that need CRM, ERP, Intranet and/or CMS features. The Orange Management modules can be split into the following different categories:
+The Orange Management build system is a collection of scripts to create builds. Builds that can get created are:
-* General
-* Business
-* Education
-* Health Care
+* Public release builds
+* Public developer release builds
-There is no limitation on how to combine modules. The modules are structured in a way that there is a minimum amount of dependencies between modules. Often modules provide additional functionality for other modules or modules request features from existing modules. Only in a few cases modules require another module for it's functionality, this is usually only the case for core modules or modules that have a strong relation to an other module.
+On top of the release builds the build system can also perform automated code inspections. This allows to run all tests and inspections without interaction and generates a report for developers at the end.
-Thanks to the modular structure it's easy to have full control over the costs and keep the functionality to the exact amount that is needed. There is no fear of having too many functions that reduce the usability if they are not needed. This also results in a fast environment not just because only the necessary parts get installed but also because the core is built for a good experience in terms of performance.
+The last feature is the backend and documentation generation based on the DocBlock documentation.
-## Development Status
+# Setup
-Currently Orange Management is still fully developing the first Alpha version. As soon as we have a running Beta version we are allowing external testers to use our software and a selected amount of inhouse developed modules.
+* Clone the repository somewhere save
+* Modify the `config.sh` file to your needs
+* Run `setup.sh`
-## Developers
+# Usage
-We are always looking for people that are interested in joining this project. We are looking for:
+* Run `build_dev.sh`
+* Run `build_public.sh`
+* Run `inspection.sh`
-* PHP developer
-* JavaScript developer
-* Frontend developer
-* Designer
+## Inspections
-Are you interested in joining us? Feel free to contact us at spl1nes.com@gmail.com.
+The following inspections are performed:
-## Overview
+* Linting
+* Security
+* Unit tests
+* Metrics (loc, dependencies)
+* Code quality (crap, code coverage, code style)
-* Project: Orange Management
-* Group: Orange Management
-* Developers: 1
-* Languages: PHP, JS, Java, HTML, CSS
-* Dependencies: d3.js, THREE.js, tcpdf, PhpExcel
-* Website: [http://orange-management.de/Website](http://orange-management.de/Website)
\ No newline at end of file
+In order to perform these inspections the build system relies on third party tools as well as custom scripts.
\ No newline at end of file
diff --git a/build_dev.sh b/build_dev.sh
index eec70f0..c8769c8 100644
--- a/build_dev.sh
+++ b/build_dev.sh
@@ -24,3 +24,5 @@ find ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Dev -name "*.css" -type f -del
find ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Dev -name "*.min.js" -type f -delete
find ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Dev -name "private.php" -type f -delete
find ${ROOT_PATH}/${RELEASE_PATH}/${VERSION_HASH}/Dev -name "private.sh" -type f -delete
+
+# Documentation
\ No newline at end of file
diff --git a/build_frontend.sh b/build_frontend.sh
deleted file mode 100644
index a9bf588..0000000
--- a/build_frontend.sh
+++ /dev/null
@@ -1 +0,0 @@
-#!/bin/bash
diff --git a/config.sh b/config.sh
new file mode 100644
index 0000000..b3e4a06
--- /dev/null
+++ b/config.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# Paths
+BASE_PATH="/var/www/html"
+ROOT_PATH="/var/www/html/Orange-Management"
+
+TOOLS_PATH="/var/www/html/Tools"
+RELEASE_PATH="/var/www/html/Release"
+INSPECTION_PATH="/var/www/html/Inspection"
+TEST_PATH="/var/www/html/Orange-Management/Tests"
+
+# Web
+WEB_URL="http://orange-management.de"
+MAIL_ADDR=""
+
+# Authentications
+DB_USER="root"
+DB_PASSWORD="123456"
+
+# Git variables
+GITHUB_URL[0]="https://github.com/Orange-Management/Orange-Management.git"
+GITHUB_URL[1]="https://github.com/Orange-Management/Console.git"
+GITHUB_URL[2]="https://github.com/Orange-Management/cssOMS.git"
+GITHUB_URL[3]="https://github.com/Orange-Management/Demo.git"
+GITHUB_URL[4]="https://github.com/Orange-Management/Docs.git"
+GITHUB_URL[5]="https://github.com/Orange-Management/Documentation.git"
+GITHUB_URL[6]="https://github.com/Orange-Management/Install.git"
+GITHUB_URL[7]="https://github.com/Orange-Management/jsOMS.git"
+GITHUB_URL[8]="https://github.com/Orange-Management/Model.git"
+GITHUB_URL[9]="https://github.com/Orange-Management/Modules.git"
+GITHUB_URL[10]="https://github.com/Orange-Management/phpOMS.git"
+GITHUB_URL[11]="https://github.com/Orange-Management/Release.git"
+GITHUB_URL[12]="https://github.com/Orange-Management/Resources.git"
+GITHUB_URL[13]="https://github.com/Orange-Management/Socket.git"
+GITHUB_URL[14]="https://github.com/Orange-Management/Tests.git"
+GITHUB_URL[15]="https://github.com/Orange-Management/Web.git"
+GITHUB_URL[16]="https://github.com/Orange-Management/Website.git"
+GITHUB_URL[17]="https://github.com/Orange-Management/GitDashboard.git"
+GITHUB_URL[18]="https://github.com/Orange-Management/Documentor.git"
+
+GIT_BRANCH="develop"
+
+DATE=$(date +%Y-%m-%d)
+VERSION_HASH=${DATE}
diff --git a/inspection.sh b/inspection.sh
index d32f345..23457df 100644
--- a/inspection.sh
+++ b/inspection.sh
@@ -1,77 +1,24 @@
#!/bin/bash
# Include
-. var.sh
+. config.sh
# Executing unit tests
-php ${ROOT_PATH}/phpunit.phar --configuration ${ROOT_PATH}/${TEST_PATH}/PHPUnit/phpunit_default.xml > ${ROOT_PATH}/${BUILD_PATH}/logs/phpunit.log
-#phpdbg -qrr phpunit.phar --configuration Tests/PHPUnit/phpunit_default.xml
-#php Documentor/src/index.php -s C:\Users\coyle\Desktop\Orange-Management\phpOMS -d C:\Users\coyle\Desktop\outtest -c C:\Users\coyle\Desktop\Orange-Management\Build\log\coverage.xml -u C:\Users\coyle\Desktop\Orange-Management\Build\log\test.xml -g C:\Users\coyle\Desktop\Orange-Management\Developer-Guide
-#phpdbg -qrr phpunit.phar Tests/PHPUnit/Framework/Math/Matrix/MatrixTest.php --bootstrap Tests/PHPUnit/Bootstrap.php
+. Inspection/Php/tests.sh
# Stats & metrics
-php ${ROOT_PATH}/phploc.phar ${ROOT_PATH}/phpOMS/ > ${ROOT_PATH}/${BUILD_PATH}/Framework/phploc.log
-php ${ROOT_PATH}/phploc.phar ${ROOT_PATH}/Modules/ > ${ROOT_PATH}/${BUILD_PATH}/Modules/phploc.log
-
-php ${ROOT_PATH}/phpmetrics.phar --report-html=${ROOT_PATH}/${BUILD_PATH}/Framework/metrics/metrics.html ${ROOT_PATH}/phpOMS/ >> ${ROOT_PATH}/${BUILD_PATH}/Framework/build.log
-php ${ROOT_PATH}/phpmetrics.phar --report-html=${ROOT_PATH}/${BUILD_PATH}/Modules/metrics/metrics.html ${ROOT_PATH}/Modules/ >> ${ROOT_PATH}/${BUILD_PATH}/Modules/build.log
-
-php ${ROOT_PATH}/pdepend.phar --summary-xml=${ROOT_PATH}/${BUILD_PATH}/Framework/pdepend/pdepend.xml --jdepend-chart=${ROOT_PATH}/${BUILD_PATH}/Framework/pdepend/chart.svg --overview-pyramid=${ROOT_PATH}/${BUILD_PATH}/Framework/pdepend/pyramid.svg ${ROOT_PATH}/phpOMS
-php ${ROOT_PATH}/pdepend.phar --summary-xml=${ROOT_PATH}/${BUILD_PATH}/Modules/pdepend/pdepend.xml --jdepend-chart=${ROOT_PATH}/${BUILD_PATH}/Modules/pdepend/chart.svg --overview-pyramid=${ROOT_PATH}/${BUILD_PATH}/Modules/pdepend/pyramid.svg ${ROOT_PATH}/Modules
-
-# Documentation
-php ${ROOT_PATH}/phpDocumentor.phar -d ${ROOT_PATH} --ignore "*/phpOMS/Localization/*" -t ${ROOT_PATH}/${BUILD_PATH}/docs
+. Inspection/Php/stats.sh
# Local inspection
-php phpcs.phar --report-file=${ROOT_PATH}/${BUILD_PATH}/Framework/phpcs/phpcs.log --ignore=${ROOT_PATH}/phpOMS/Localization --standard=${ROOT_PATH}/${BUILD_PATH}/phpcs.xml ${ROOT_PATH}/phpOMS
-php phpcs.phar --report-file=${ROOT_PATH}/${BUILD_PATH}/Modules/phpcs/phpcs.log --standard=${ROOT_PATH}/${BUILD_PATH}/phpcs.xml ${ROOT_PATH}/Modules
-#php phpmd.phar ${ROOT_PATH}/phpOMS xml ${ROOT_PATH}/${BUILD_PATH}/phpmd.xml --reportfile ${ROOT_PATH}/${BUILD_PATH}/logs/phpmdFramework.log -- bzip missing
-#php phpmd.phar ${ROOT_PATH}/Modules xml ${ROOT_PATH}/${BUILD_PATH}/phpmd.xml --reportfile ${ROOT_PATH}/${BUILD_PATH}/logs/phpmdModules.log -- bzip missing
-php phpcpd.phar ${ROOT_PATH}/phpOMS --exclude Localization --no-interaction > ${ROOT_PATH}/${BUILD_PATH}/Framework/phpcpd/phpcpd.log
-php phpcpd.phar ${ROOT_PATH}/Modules --no-interaction > ${ROOT_PATH}/${BUILD_PATH}/Modules/phpcpd/phpcpd.log
+. Inspection/Php/tools.sh
# Linting
-find ${ROOT_PATH}/phpOMS -name "*.php" | xargs -L1 php -l > ${ROOT_PATH}/${BUILD_PATH}/logs/temp.log
-sed '/^No syntax.*/ d' < ${ROOT_PATH}/${BUILD_PATH}/logs/temp.log > ${ROOT_PATH}/${BUILD_PATH}/Framework/linting/linting_php.log
-find ${ROOT_PATH}/Modules -name "*.php" | xargs -L1 php -l > ${ROOT_PATH}/${BUILD_PATH}/logs/temp.log
-sed '/^No syntax.*/ d' < ${ROOT_PATH}/${BUILD_PATH}/logs/temp.log > ${ROOT_PATH}/${BUILD_PATH}/Modules/linting/linting_php.log
-rm ${ROOT_PATH}/${BUILD_PATH}/logs/temp.log
-find ${ROOT_PATH} -name "*.json" | xargs -L1 jsonlint -q > ${ROOT_PATH}/${BUILD_PATH}/Modules/linting/linting_json.log
+. Inspection/Php/linting.sh
+. Inspection/Json/linting.sh
-# External inspection and build
-#curl -H "Content-Type: application/json" -X POST -d '{"branch":"$GIT_BRANCH","access_token":"$SCRUTINIZER_TOKEN"}' https://scrutinizer-ci.com/api/repositories/g/spl1nes/oms/inspections?access_token=${SCRUTINIZER_TOKEN}
-#curl --get --data api_token=$CODECLIMATE_TOKEN https://codeclimate.com/api/repos/oms/branches/$GIT_BRANCH/refresh -- Coming in the future... right now not available for free
-#curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token $TRAVIS_TOKEN" -d '{"request": {"branch":"$GIT_BRANCH"}}' https://api.travis-ci.org/repo/spl1nes%2FOrange-Management/requests
+# Custom html inspections
+. Inspection/Html/tags.sh
+. Inspection/Html/attributes.sh
-# Html tag inspection
-TAG[0]="<\/html>"
-TAG[1]="<\/body>"
-TAG[2]="<\/head>"
-TAG[3]="<\/thead>"
-TAG[4]="<\/tbody>"
-TAG[5]="<\/tfoot>"
-TAG[6]="<\/tr>"
-TAG[7]="<\/th>"
-TAG[8]="<\/td>"
-TAG[9]="<\/option>"
-TAG[10]="<\/li>"
-TAG[11]="
"
-TAG[12]=""
-TAG[13]=""
-TAG[14]="
"
-TAG[15]=""
-TAG[16]=""
-TAG[17]=""
-TAG[18]=""
-
-for i in "${TAG[@]}"
-do
- grep -rln "$i" --include \*.tpl.php ${ROOT_PATH}/phpOMS >> ${ROOT_PATH}/${BUILD_PATH}/Framework/html/inspection.log
- grep -rln "$i" --include \*.tpl.php ${ROOT_PATH}/Modules >> ${ROOT_PATH}/${BUILD_PATH}/Modules/html/inspection.log
-done
-
-# Find empty attributes
-grep -rln "=\"\"" --include \*.tpl.php ${ROOT_PATH} > ${ROOT_PATH}/${BUILD_PATH}/Modules/html/attributes_empty.log
-
-# Html tag inspection
-. ${ROOT_PATH}/${BUILD_PATH}/security.sh
+# Custom php inspections
+. Inspection/Php/security.sh
diff --git a/ipGeoLocationBuilder.php b/ipGeoLocationBuilder.php
deleted file mode 100644
index 2ac09c4..0000000
--- a/ipGeoLocationBuilder.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
- Orange Management ruleset! www.orange-management.de
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/phpmd.xml b/phpmd.xml
deleted file mode 100644
index f9a6818..0000000
--- a/phpmd.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-Orange Management ruleset! www.orange-management.de
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pre_commit.sh b/pre_commit.sh
deleted file mode 100644
index b984d52..0000000
--- a/pre_commit.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-git diff --cached --name-only | while read FILE; do
-if [[ "$FILE" =~ ^.+(php)$ ]]; then
- if [[ -f ${FILE} ]]; then
- php -l "$FILE" 1> /dev/null
- if [ $? -ne 0 ]; then
- echo -e "\e[1;31m\tAborting commit due to files with syntax errors.\e[0m" >&2
- exit 1
- fi
- fi
-fi
-done || exit $?
diff --git a/security.sh b/security.sh
deleted file mode 100644
index af7669f..0000000
--- a/security.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-. var.sh
-
-# PHP code inspection
-CODE[0]="file_get_content"
-CODE[1]="fopen"
-CODE[2]="include"
-CODE[3]="require"
-CODE[4]="file_put_content"
-CODE[5]="fread"
-CODE[6]="fwrite"
-CODE[7]="fget"
-CODE[8]="fput"
-CODE[9]="chmod"
-CODE[10]="eval"
-CODE[11]="delete"
-CODE[12]="mkdir"
-CODE[13]="move_uploaded_file"
-CODE[14]="mkdir"
-CODE[15]="copy"
-CODE[16]="chown"
-CODE[17]="touch"
-CODE[18]="exec"
-CODE[19]="_GET"
-CODE[20]="_POST"
-CODE[21]="_SESSION"
-CODE[22]="_REQUEST"
-CODE[23]="_SERVER"
-CODE[24]="_COOKIE"
-CODE[25]="_FILES"
-CODE[26]="unlink"
-CODE[27]="action=\""
-
-for i in "${CODE[@]}"
-do
- grep -rln "$i" --include \*.php ${ROOT_PATH}/phpOMS >> ${ROOT_PATH}/${BUILD_PATH}/Framework/critical_php.log
- grep -rln "$i" --include \*.php ${ROOT_PATH}/Modules >> ${ROOT_PATH}/${BUILD_PATH}/Modules/citical_php.log
-done
diff --git a/setup.sh b/setup.sh
index d70590f..97c0522 100644
--- a/setup.sh
+++ b/setup.sh
@@ -1,11 +1,20 @@
#!/bin/bash
-. var.sh
+. config.sh
# Previous cleanup
rm -r -f ${ROOT_PATH}
mkdir -p ${ROOT_PATH}
+rm -r -f ${INSPECTION_PATH}
+mkdir -p ${INSPECTION_PATH}
+
+rm -r -f ${TOOLS_PATH}
+mkdir -p ${TOOLS_PATH}
+
+rm -r -f ${BUILD_PATH}
+mkdir -p ${BUILD_PATH}
+
# Handling git
c=0;
for i in "${GITHUB_URL[@]}"
@@ -25,21 +34,21 @@ do
done
# Creating directories
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/logs
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Framework/logs
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Framework/metrics
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Framework/pdepend
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Framework/phpcs
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Framework/phpcpd
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Framework/linting
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Framework/html
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Modules/logs
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Modules/metrics
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Modules/pdepend
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Modules/phpcs
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Modules/phpcpd
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Modules/linting
-mkdir -p ${ROOT_PATH}/${BUILD_PATH}/Modules/html
+mkdir -p ${INSPECTION_PATH}/logs
+mkdir -p ${INSPECTION_PATH}/Framework/logs
+mkdir -p ${INSPECTION_PATH}/Framework/metrics
+mkdir -p ${INSPECTION_PATH}/Framework/pdepend
+mkdir -p ${INSPECTION_PATH}/Framework/phpcs
+mkdir -p ${INSPECTION_PATH}/Framework/phpcpd
+mkdir -p ${INSPECTION_PATH}/Framework/linting
+mkdir -p ${INSPECTION_PATH}/Framework/html
+mkdir -p ${INSPECTION_PATH}/Modules/logs
+mkdir -p ${INSPECTION_PATH}/Modules/metrics
+mkdir -p ${INSPECTION_PATH}/Modules/pdepend
+mkdir -p ${INSPECTION_PATH}/Modules/phpcs
+mkdir -p ${INSPECTION_PATH}/Modules/phpcpd
+mkdir -p ${INSPECTION_PATH}/Modules/linting
+mkdir -p ${INSPECTION_PATH}/Modules/html
# Permission handling
chmod -R 777 ${ROOT_PATH}
@@ -52,6 +61,8 @@ mysql -e 'create database oms;' -u ${DB_USER} -p${DB_PASSWORD}
cd ${ROOT_PATH}
touch private.php
+cd ${TOOLS_PATH}
+
# Downloading tools
wget -nc https://getcomposer.org/composer.phar
wget -nc https://phar.phpunit.de/phploc.phar
diff --git a/testGenerator.php b/testGenerator.php
deleted file mode 100644
index aaf2cf5..0000000
--- a/testGenerator.php
+++ /dev/null
@@ -1,143 +0,0 @@
-= 0 && strpos($haystack, $needle, $temp) !== false);
-}
-
-function listFolderFiles($dir, $extension)
-{
- $files = [];
- $ffs = scandir($dir);
- foreach ($ffs as $ff) {
- if ($ff !== '.' && $ff !== '..') {
- if (is_dir($dir . '/' . $ff)) {
- $files = array_merge($files, listFolderFiles($dir . '/' . $ff, $extension));
- } else {
- if (endsWith($ff, $extension)) {
- $files[] = $dir . '/' . $ff;
- }
- }
- }
- }
-
- return $files;
-}
-
-// PHP tests
-$base = __DIR__ . '/../phpOMS';
-$files = listFolderFiles($base, '.php');
-$testBase = __DIR__ . '/../Tests/PHPUnit/Framework';
-
-foreach ($files as $file) {
- $file = str_replace($base, '', $file);
- $subdir = trim($file, '/');
- $split = explode('.', $file);
- $testPath = $testBase . '/' . $split[0] . 'Test.' . $split[1];
-
- if (stripos($subdir, 'Status.php') === false
- && stripos($subdir, 'Type.php') === false
- && stripos($subdir, 'Layout.php') === false
- && stripos($subdir, 'Level.php') === false
- && stripos($subdir, 'Status') === false
- && stripos($subdir, 'Enum') === false
- && stripos($subdir, 'Null') === false
- && stripos($subdir, 'Interface') === false
- && stripos($subdir, 'Trait') === false
- && stripos($subdir, 'Abstract') === false
- ) {
- if (!file_exists($testPath)) {
- $namespace = str_replace('/', '\\', $split[0]);
- $namespace = explode('\\', $namespace);
- $classnameSrc = $namespace[count($namespace) - 1];
- $classname = $classnameSrc . 'Test';
- unset($namespace[count($namespace) - 1]);
- $use = trim('phpOMS\\' . trim(implode('\\', $namespace), '\\') . '\\' . $classnameSrc, '\\');
- $namespace = trim('Tests\PHPUnit\Framework\\' . trim(implode('\\', $namespace), '\\'), '\\');
- $autoloader = str_repeat('/..', count(explode('\\', $namespace)));
-
- if(!file_exists(dirname($testPAth))) {
- mkdir(dirname($testPath), 0777, true);
- }
-
- file_put_contents($testPath,
- '' . PHP_EOL
- . ' * @author Dennis Eichhorn ' . PHP_EOL
- . ' * @copyright Dennis Eichhorn' . PHP_EOL
- . ' * @license OMS License 1.0' . PHP_EOL
- . ' * @version 1.0.0' . PHP_EOL
- . ' * @link http://orange-management.com' . PHP_EOL
- . ' */' . PHP_EOL
- . '' . PHP_EOL
- . 'namespace ' . $namespace . ';' . PHP_EOL
- . '' . PHP_EOL
- . 'require_once __DIR__ . \'' . $autoloader . '/phpOMS/Autoloader.php\';' . PHP_EOL
- . '' . PHP_EOL
- . 'use ' . $use . ';' . PHP_EOL
- . '' . PHP_EOL
- . 'class ' . $classname . ' extends \PHPUnit_Framework_TestCase' . PHP_EOL
- . '{' . PHP_EOL
- . ' public function testPlaceholder()' . PHP_EOL
- . ' {' . PHP_EOL
- . ' self::markTestIncomplete();' . PHP_EOL
- . ' }' . PHP_EOL
- . '}' . PHP_EOL
- );
- }
- }
-}
-
-// JS tests
-$base = __DIR__ . '/../jsOMS';
-$files = listFolderFiles($base, '.js');
-$testBase = __DIR__ . '/../Tests/JS/Framework';
-
-foreach ($files as $file) {
- $file = str_replace($base, '', $file);
- $subdir = trim($file, '/');
- $split = explode('.', $file);
- $testPath = $testBase . '/' . $split[0] . 'Test.' . $split[1];
-
- if (stripos($subdir, 'Status.php') === false
- && stripos($subdir, 'Type.php') === false
- && stripos($subdir, 'Layout.php') === false
- && stripos($subdir, 'Level.php') === false
- && stripos($subdir, 'Status') === false
- && stripos($subdir, 'Enum') === false
- && stripos($subdir, 'Null') === false
- && stripos($subdir, 'Interface') === false
- && stripos($subdir, 'Trait') === false
- && stripos($subdir, 'Abstract') === false
- ) {
- if (!file_exists($testPath)) {
- $name = explode('/', $split[0]);
-
- if(!file_exists(dirname($testPath))) {
- mkdir(dirname($testPath), 0777, true);
- }
-
- file_put_contents($testPath,
- 'describe(\'' . $name[count($name) - 1] . 'Test\', function ()' . PHP_EOL
- . '{' . PHP_EOL
- . ' "use strict";' . PHP_EOL
- . '' . PHP_EOL
- . ' beforeEach(function ()' . PHP_EOL
- . ' {' . PHP_EOL
- . ' });' . PHP_EOL
- . '' . PHP_EOL
- . ' afterEach(function ()' . PHP_EOL
- . ' {' . PHP_EOL
- . ' });' . PHP_EOL
- . '}' . PHP_EOL
- );
- }
- }
-}
\ No newline at end of file
diff --git a/var.sh b/var.sh
deleted file mode 100644
index 533622d..0000000
--- a/var.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-# Defining paths & basics
-BASE_PATH="/var/www/html"
-ROOT_PATH="${BASE_PATH}/Orange-Management"
-BUILD_PATH="Build"
-RELEASE_PATH="Release"
-TEST_PATH="Tests"
-WEB_URL="http://orange-management.de"
-MAIL_ADDR=""
-DB_USER="root"
-DB_PASSWORD="123456"
-
-# Git variables
-GITHUB_URL[0]="https://github.com/Orange-Management/Orange-Management.git"
-GITHUB_URL[1]="https://github.com/Orange-Management/Build.git"
-GITHUB_URL[2]="https://github.com/Orange-Management/Console.git"
-GITHUB_URL[3]="https://github.com/Orange-Management/cssOMS.git"
-GITHUB_URL[4]="https://github.com/Orange-Management/Demo.git"
-GITHUB_URL[5]="https://github.com/Orange-Management/Docs.git"
-GITHUB_URL[6]="https://github.com/Orange-Management/Documentation.git"
-GITHUB_URL[7]="https://github.com/Orange-Management/Install.git"
-GITHUB_URL[8]="https://github.com/Orange-Management/jsOMS.git"
-GITHUB_URL[9]="https://github.com/Orange-Management/Model.git"
-GITHUB_URL[10]="https://github.com/Orange-Management/Modules.git"
-GITHUB_URL[11]="https://github.com/Orange-Management/phpOMS.git"
-GITHUB_URL[12]="https://github.com/Orange-Management/Release.git"
-GITHUB_URL[13]="https://github.com/Orange-Management/Resources.git"
-GITHUB_URL[14]="https://github.com/Orange-Management/Socket.git"
-GITHUB_URL[15]="https://github.com/Orange-Management/Tests.git"
-GITHUB_URL[16]="https://github.com/Orange-Management/Web.git"
-GITHUB_URL[17]="https://github.com/Orange-Management/Website.git"
-GITHUB_URL[18]="https://github.com/Orange-Management/GitDashboard.git"
-GITHUB_URL[19]="https://github.com/Orange-Management/Documentor.git"
-
-GIT_BRANCH="develop"
-
-DATE=$(date +%Y-%m-%d)
-VERSION_HASH=DATE
diff --git a/watcher.sh b/watcher.sh
deleted file mode 100644
index 7291e28..0000000
--- a/watcher.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-DIRECTORY_TO_OBSERVE="cssOMS jsOMS"
-function watcher {
- inotifywait -r -e modify,move,create,delete \
- --exclude ".*(\.css|\.php|\.json|\.md|\.sh|\.txt|\.log|\.min\.js)" \
- ${DIRECTORY_TO_OBSERVE}
-}
-
-BUILD_SCRIPT=build_frontend.sh
-function build {
- bash ${BUILD_SCRIPT}
-}
-
-build
-while watcher; do
- build
-done