From 4a4e48e0390d266f7840424398fbe7040c4f9a73 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Mon, 29 Aug 2016 14:32:28 -0400 Subject: [PATCH] Another ugly progress commit, moved base src dir to src/, and base test dir to tests/ --- .gitlab-ci.yml | 17 ++++++----- RoboFile.php | 29 ++++++++++++++++--- build/phpcs.xml | 1 + build/phpunit.xml | 6 ++-- composer.json | 4 +-- phpdoc.dist.xml | 6 ++-- phpunit.xml | 4 +-- src/{Ion => }/ArrayWrapper.php | 0 src/{Ion => }/Cache/CacheInterface.php | 0 src/{Ion => }/Cache/CacheManager.php | 0 .../Cache/Driver/DriverInterface.php | 0 src/{Ion => }/Cache/Driver/DriverTrait.php | 0 src/{Ion => }/Cache/Driver/NullDriver.php | 0 src/{Ion => }/Cache/Driver/RedisDriver.php | 0 src/{Ion => }/Cache/Driver/SQLDriver.php | 0 src/{Ion => }/Config.php | 0 src/{Ion => }/ConfigInterface.php | 0 src/{Ion => }/Di/Container.php | 6 ++-- src/{Ion => }/Di/ContainerAware.php | 0 src/{Ion => }/Di/ContainerAwareInterface.php | 0 src/{Ion => }/Di/ContainerInterface.php | 2 +- .../Di/Exception/ContainerException.php | 0 .../Di/Exception/NotFoundException.php | 0 src/{Ion => }/Enum.php | 0 src/{Ion => }/Exception/ConfigException.php | 0 .../Exception/DoubleRenderException.php | 0 src/{Ion => }/Friend.php | 0 src/{Ion => }/Json.php | 0 src/{Ion => }/JsonException.php | 0 src/{Ion => }/Model.php | 0 src/{Ion => }/Model/DB.php | 0 src/{Ion => }/StaticInstance.php | 0 src/{Ion => }/StringWrapper.php | 0 .../Transformer/AbstractTransformer.php | 0 .../Transformer/TransformerInterface.php | 0 src/{Ion => }/Type/ArrayType.php | 0 src/{Ion => }/Type/StringType.php | 0 src/{Ion => }/View.php | 0 src/{Ion => }/View/HtmlView.php | 0 src/{Ion => }/View/HttpView.php | 0 src/{Ion => }/View/JsonView.php | 0 src/{Ion => }/ViewInterface.php | 0 tests/{Ion => }/BaseModelTest.php | 0 tests/{Ion => }/Cache/CacheManagerTest.php | 0 .../Cache/Driver/CacheDriverBase.php | 0 .../{Ion => }/Cache/Driver/NullDriverTest.php | 0 .../Cache/Driver/RedisDriver2Test.php | 0 .../Cache/Driver/RedisDriverTest.php | 0 .../{Ion => }/Cache/Driver/SQLDriverTest.php | 0 tests/{Ion => }/ConfigTest.php | 0 tests/{Ion => }/Di/ContainerAwareTest.php | 0 tests/{Ion => }/Di/ContainerTest.php | 0 tests/{Ion => }/EnumTest.php | 0 .../Exception/DoubleRenderExceptionTest.php | 0 tests/{Ion => }/FriendTest.php | 0 tests/{Ion => }/JsonTest.php | 0 tests/{Ion => }/Model/BaseDBModelTest.php | 0 .../Transformer/AbstractTransformerTest.php | 0 tests/{Ion => }/Type/ArrayTypeTest.php | 0 tests/{Ion => }/View/HtmlViewTest.php | 0 tests/{Ion => }/View/HttpViewTest.php | 0 tests/{Ion => }/View/JsonViewTest.php | 0 62 files changed, 50 insertions(+), 25 deletions(-) rename src/{Ion => }/ArrayWrapper.php (100%) rename src/{Ion => }/Cache/CacheInterface.php (100%) rename src/{Ion => }/Cache/CacheManager.php (100%) rename src/{Ion => }/Cache/Driver/DriverInterface.php (100%) rename src/{Ion => }/Cache/Driver/DriverTrait.php (100%) rename src/{Ion => }/Cache/Driver/NullDriver.php (100%) rename src/{Ion => }/Cache/Driver/RedisDriver.php (100%) rename src/{Ion => }/Cache/Driver/SQLDriver.php (100%) rename src/{Ion => }/Config.php (100%) rename src/{Ion => }/ConfigInterface.php (100%) rename src/{Ion => }/Di/Container.php (96%) rename src/{Ion => }/Di/ContainerAware.php (100%) rename src/{Ion => }/Di/ContainerAwareInterface.php (100%) rename src/{Ion => }/Di/ContainerInterface.php (96%) rename src/{Ion => }/Di/Exception/ContainerException.php (100%) rename src/{Ion => }/Di/Exception/NotFoundException.php (100%) rename src/{Ion => }/Enum.php (100%) rename src/{Ion => }/Exception/ConfigException.php (100%) rename src/{Ion => }/Exception/DoubleRenderException.php (100%) rename src/{Ion => }/Friend.php (100%) rename src/{Ion => }/Json.php (100%) rename src/{Ion => }/JsonException.php (100%) rename src/{Ion => }/Model.php (100%) rename src/{Ion => }/Model/DB.php (100%) rename src/{Ion => }/StaticInstance.php (100%) rename src/{Ion => }/StringWrapper.php (100%) rename src/{Ion => }/Transformer/AbstractTransformer.php (100%) rename src/{Ion => }/Transformer/TransformerInterface.php (100%) rename src/{Ion => }/Type/ArrayType.php (100%) rename src/{Ion => }/Type/StringType.php (100%) rename src/{Ion => }/View.php (100%) rename src/{Ion => }/View/HtmlView.php (100%) rename src/{Ion => }/View/HttpView.php (100%) rename src/{Ion => }/View/JsonView.php (100%) rename src/{Ion => }/ViewInterface.php (100%) rename tests/{Ion => }/BaseModelTest.php (100%) rename tests/{Ion => }/Cache/CacheManagerTest.php (100%) rename tests/{Ion => }/Cache/Driver/CacheDriverBase.php (100%) rename tests/{Ion => }/Cache/Driver/NullDriverTest.php (100%) rename tests/{Ion => }/Cache/Driver/RedisDriver2Test.php (100%) rename tests/{Ion => }/Cache/Driver/RedisDriverTest.php (100%) rename tests/{Ion => }/Cache/Driver/SQLDriverTest.php (100%) rename tests/{Ion => }/ConfigTest.php (100%) rename tests/{Ion => }/Di/ContainerAwareTest.php (100%) rename tests/{Ion => }/Di/ContainerTest.php (100%) rename tests/{Ion => }/EnumTest.php (100%) rename tests/{Ion => }/Exception/DoubleRenderExceptionTest.php (100%) rename tests/{Ion => }/FriendTest.php (100%) rename tests/{Ion => }/JsonTest.php (100%) rename tests/{Ion => }/Model/BaseDBModelTest.php (100%) rename tests/{Ion => }/Transformer/AbstractTransformerTest.php (100%) rename tests/{Ion => }/Type/ArrayTypeTest.php (100%) rename tests/{Ion => }/View/HtmlViewTest.php (100%) rename tests/{Ion => }/View/HttpViewTest.php (100%) rename tests/{Ion => }/View/JsonViewTest.php (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 265afb8..2f51368 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,26 +12,27 @@ test:5.6: before_script: - bash build/docker_install.sh > /dev/null - curl -sS https://getcomposer.org/installer | php - - php composer.phar install --no-dev + - php composer.phar update + - php composer.phar install image: php:5.6 script: - - phpunit -c build + - vendor/bin/phpunit --coverage-text --colors=never test:7: before_script: - bash build/docker_install.sh > /dev/null - curl -sS https://getcomposer.org/installer | php - - php composer.phar install --no-dev + - php composer.phar update + - php composer.phar install image: php:7 script: - - phpunit -c build + - vendor/bin/phpunit --coverage-text --colors=never test:hhvm: before_script: - /usr/local/bin/composer self-update - - curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar - - chmod +x /usr/local/bin/phpunit - - composer install --no-dev + - composer update + - composer install image: 51systems/docker-gitlab-ci-runner-hhvm script: - - phpunit -c build \ No newline at end of file + - vendor/bin/phpunit --coverage-text --colors=never \ No newline at end of file diff --git a/RoboFile.php b/RoboFile.php index 2af1ee8..47ba7d7 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -28,13 +28,25 @@ class RoboFile extends \Robo\Tasks { * @var array */ protected $taskDirs = [ - 'build/api', - 'build/coverage', 'build/logs', 'build/pdepend', 'build/phpdox', ]; + /** + * Directories to remove with the clean task + * + * @var array + */ + protected $cleanDirs = [ + 'coverage', + 'docs', + 'phpdoc', + 'build/logs', + 'build/phpdox', + 'build/pdepend' + ]; + /** * Do static analysis tasks @@ -72,8 +84,17 @@ class RoboFile extends \Robo\Tasks { @unlink($file); }, $cleanFiles); - $this->_cleanDir($this->taskDirs); - $this->_deleteDir($this->taskDirs); + // So the task doesn't complain, + // make any 'missing' dirs to cleanup + array_map(function ($dir) { + if ( ! is_dir($dir)) + { + `mkdir -p {$dir}`; + } + }, $this->cleanDirs); + + $this->_cleanDir($this->cleanDirs); + $this->_deleteDir($this->cleanDirs); } /** diff --git a/build/phpcs.xml b/build/phpcs.xml index 2432930..58d9c54 100644 --- a/build/phpcs.xml +++ b/build/phpcs.xml @@ -36,6 +36,7 @@ + diff --git a/build/phpunit.xml b/build/phpunit.xml index 9677773..8b7823a 100644 --- a/build/phpunit.xml +++ b/build/phpunit.xml @@ -8,16 +8,16 @@ > - ../src/Ion + ../src - ../tests/Ion + ../tests - + diff --git a/composer.json b/composer.json index 362d959..3285a6c 100644 --- a/composer.json +++ b/composer.json @@ -4,12 +4,12 @@ "license":"MIT", "autoload": { "psr-4": { - "Aviat\\": "src/" + "Aviat\\Ion\\": "src/" } }, "autoload-dev": { "psr-4": { - "Aviat\\Ion\\Tests\\": "tests/Ion/", + "Aviat\\Ion\\Tests\\": "tests/", "CodeIgniter\\": "build/CodeIgniter/" } }, diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml index 2fa15d4..a774037 100644 --- a/phpdoc.dist.xml +++ b/phpdoc.dist.xml @@ -8,9 +8,11 @@ phpdoc -