Refactored structure

This commit is contained in:
Dmitry Khomutov 2016-04-17 12:34:12 +06:00
parent e5164ae1dd
commit 548a49a3de
19 changed files with 44 additions and 62 deletions

37
.gitignore vendored
View file

@ -1,17 +1,20 @@
.idea
vendor/
composer.phar
.DS_Store
.settings/
.project
.buildpath
app/config.yml
cache
/loggerconfig.php
/pluginconfig.php
src/PHPCI/Model/Migration.php
src/PHPCI/Model/Base/MigrationBase.php
src/PHPCI/Store/MigrationStore.php
src/PHPCI/Store/Base/MigrationStoreBase.php
local_vars.php
tests/PHPCI/config.yml
/.idea
/vendor/
/composer.phar
/.DS_Store
/.settings
/.project
/.buildpath
/app/config.yml
/runtime/builds
/runtime/daemon
/public/.htaccess
/cache
/app/loggerconfig.php
/app/pluginconfig.php
/src/PHPCI/Model/Migration.php
/src/PHPCI/Model/Base/MigrationBase.php
/src/PHPCI/Store/MigrationStore.php
/src/PHPCI/Store/Base/MigrationStoreBase.php
/local_vars.php
/tests/PHPCI/config.yml

View file

@ -34,5 +34,5 @@ test:
broken:
email:
committer: true
cc: ["php-ci@googlegroups.com"]
#committer: true
#cc: ["php-ci@googlegroups.com"]

View file

@ -1,21 +0,0 @@
FROM ubuntu:14.04
MAINTAINER Dan Cryer dan.cryer@block8.co.uk
RUN echo "deb http://ppa.launchpad.net/ondrej/php5/ubuntu trusty main" >> /etc/apt/sources.list
RUN echo "deb http://archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C E5267A6C 0xcbcb082a1bb943db
RUN apt-get update
# Install PHP:
RUN apt-get install -qy git-core php5-common php5-cli php5-curl php5-imap php5-mysqlnd
# Give Git some fake user details to prevent it asking when trying to test merges:
RUN git config --global user.name "PHPCI"
RUN git config --global user.email "hello@php.ci"
ADD ./ /phpci
RUN php -r "readfile('https://getcomposer.org/installer');" | php
RUN mv composer.phar /phpci/composer
CMD /phpci/daemonise phpci:daemonise

13
app/config.example.yml Normal file
View file

@ -0,0 +1,13 @@
b8:
database:
servers:
read: localhost
write: localhost
name: phpci
username: root
password: root
phpci:
url: 'http://phpci.local'
worker:
host: localhost
queue: phpci

View file

@ -18,7 +18,7 @@ return array(
/** Loggers for the RunCommand */
'RunCommand' => function() {
return array(
new \Monolog\Handler\RotatingFileHandler(__DIR__ . DIRECTORY_SEPARATOR . 'everything',3, \Monolog\Logger::DEBUG),
new \Monolog\Handler\RotatingFileHandler(__DIR__ . DIRECTORY_SEPARATOR . 'everything', 3, \Monolog\Logger::DEBUG),
);
},
);

View file

@ -8,7 +8,7 @@
* @link https://www.phptesting.org/
*/
require_once(dirname(__FILE__) . '/bootstrap.php');
require_once(dirname(__FILE__) . '../bootstrap.php');
$writeServers = $config->get('b8.database.servers.write');

View file

@ -1,4 +1,5 @@
<?php
return function (PHPCI\Plugin\Util\Factory $factory) {
$factory->registerResource(
// This function will be called when the resource is needed.

View file

@ -10,7 +10,7 @@
define('PHPCI_IS_CONSOLE', true);
require('bootstrap.php');
require('../bootstrap.php');
use PHPCI\Command\RunCommand;
use PHPCI\Command\RebuildCommand;

View file

@ -10,7 +10,7 @@
define('PHPCI_IS_CONSOLE', true);
require('bootstrap.php');
require('../bootstrap.php');
use PHPCI\Command\DaemoniseCommand;
use Symfony\Component\Console\Application;

View file

@ -47,7 +47,7 @@ require_once(dirname(__FILE__) . '/vendor/autoload.php');
\PHPCI\ErrorHandler::register();
if (defined('PHPCI_IS_CONSOLE') && PHPCI_IS_CONSOLE) {
$loggerConfig = LoggerConfig::newFromFile(__DIR__ . "/loggerconfig.php");
$loggerConfig = LoggerConfig::newFromFile(__DIR__ . "/app/loggerconfig.php");
}
// Load configuration if present:

View file

@ -1,10 +0,0 @@
# PHPCI Changelog
## v.Next
### New Features:
- SSH-based Mercurial clones (Commit: [e98647bd](https://github.com/Block8/PHPCI/commit/e98647bd97d49741242d252514b8703504a62869), PR: [#812](https://github.com/Block8/PHPCI/pull/812))
- Ability to archive projects (Commit: [1466ad06](https://github.com/Block8/PHPCI/commit/1466ad06ef708cbab2b53112fc59e8c1d70c2e33), PR: [#771](https://github.com/Block8/PHPCI/pull/771))
### Bug Fixes and Tweaks:

2
daemon/.gitignore vendored
View file

@ -1,2 +0,0 @@
*
!.gitignore

0
runtime/daemon/.gitkeep Normal file
View file

View file

@ -110,7 +110,7 @@ class Builder implements LoggerAwareInterface
$this->buildLogger = new BuildLogger($logger, $build);
$pluginFactory = $this->buildPluginFactory($build);
$pluginFactory->addConfigFromFile(PHPCI_DIR . "/pluginconfig.php");
$pluginFactory->addConfigFromFile(PHPCI_DIR . "/app/pluginconfig.php");
$this->pluginExecutor = new Plugin\Util\Executor($pluginFactory, $this->buildLogger);
$executorClass = 'PHPCI\Helper\UnixCommandExecutor';

View file

@ -364,7 +364,7 @@ class InstallCommand extends Command
$output->write(Lang::get('setting_up_db'));
$phinxBinary = escapeshellarg(PHPCI_DIR . 'vendor/bin/phinx');
$phinxScript = escapeshellarg(PHPCI_DIR . 'phinx.php');
$phinxScript = escapeshellarg(PHPCI_DIR . 'app/phinx.php');
shell_exec($phinxBinary . ' migrate -c ' . $phinxScript);
$output->writeln('<info>'.Lang::get('ok').'</info>');

View file

@ -53,7 +53,7 @@ class UpdateCommand extends Command
$output->write(Lang::get('updating_phpci'));
shell_exec(PHPCI_DIR . 'vendor/bin/phinx migrate -c "' . PHPCI_DIR . 'phinx.php"');
shell_exec(PHPCI_DIR . 'vendor/bin/phinx migrate -c "' . PHPCI_DIR . 'app/phinx.php"');
$output->writeln('<info>'.Lang::get('ok').'</info>');
}

View file

@ -1,2 +0,0 @@
*
!.gitignore

0
tests/temp/.gitkeep Normal file
View file