From 1209143de7c679d6cc4e438f6b6b10e355b29074 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Sat, 2 Mar 2013 17:40:01 +0100 Subject: [PATCH] Repository reorganization. --- .gitignore | 6 +- README.md | 4 +- composer.json | 6 +- composer.lock | 118 ++++++++++++++++++++++---- {src/config => config}/global.php | 0 {src/config => config}/local.php.dist | 0 {src/lib => lib}/Application.php | 6 +- {src/lib => lib}/Base.php | 0 {src/lib => lib}/BufferedWriter.php | 0 {src/lib => lib}/Client.php | 0 {src/lib => lib}/Config.php | 0 {src/lib => lib}/Connection.php | 0 {src/lib => lib}/DI.php | 0 {src/lib => lib}/ErrorLogger.php | 0 {src/lib => lib}/Loop.php | 0 {src/lib => lib}/XCP.php | 0 src/xo-server => xo-server | 2 +- 17 files changed, 113 insertions(+), 29 deletions(-) rename {src/config => config}/global.php (100%) rename {src/config => config}/local.php.dist (100%) rename {src/lib => lib}/Application.php (98%) rename {src/lib => lib}/Base.php (100%) rename {src/lib => lib}/BufferedWriter.php (100%) rename {src/lib => lib}/Client.php (100%) rename {src/lib => lib}/Config.php (100%) rename {src/lib => lib}/Connection.php (100%) rename {src/lib => lib}/DI.php (100%) rename {src/lib => lib}/ErrorLogger.php (100%) rename {src/lib => lib}/Loop.php (100%) rename {src/lib => lib}/XCP.php (100%) rename src/xo-server => xo-server (97%) diff --git a/.gitignore b/.gitignore index edd0741..f890669 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/src/config/local.php -/src/database.json -/src/log +/config/local.php +/database.json +/log /vendor/ diff --git a/README.md b/README.md index 6701caf..4e9189b 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ _There is currently no package available for XO-Server, you must therefore use t 1. Download the code, you may either use git `git clone git://github.com/vatesfr/xo-server` or download a [Zip archive](https://github.com/vatesfr/xo-server/archive/master.zip). 2. XO-Web uses [Composer](https://getcomposer.org) for its dependency management, so, once you have [installed it](https://getcomposer.org/download/), juste run `php composer.phar install`. -3. Copy `src/config/local.php.dist` to `src/config/local.php` and complete the configuration. -4. Finally, run `./src/xo-server`. +3. Copy `config/local.php.dist` to `config/local.php` and complete the configuration. +4. Finally, run `./xo-server`. The first time you start XO-Server an `admin` user with the `admin` password is created. diff --git a/composer.json b/composer.json index 4db6a9d..47cc836 100644 --- a/composer.json +++ b/composer.json @@ -11,10 +11,12 @@ "require": { "php": ">=5.3.0", "ext-xmlrpc": "*", + "ircmaxell/password-compat": "dev-master", "monolog/monolog": "~1.2", - "ircmaxell/password-compat": "dev-master" + "vates/eventus": "dev-master", + "vates/rekodi": "dev-master" }, "autoload": { - "psr-0": { "": "src/lib" } + "psr-0": { "": "lib" } } } diff --git a/composer.lock b/composer.lock index 2114f2e..9e04540 100644 --- a/composer.lock +++ b/composer.lock @@ -1,5 +1,5 @@ { - "hash": "d65aa7e3aad71264202dfcffcccb3cc1", + "hash": "34887398d705932ba85d75c55bc43ce1", "packages": [ { "name": "ircmaxell/password-compat", @@ -7,15 +7,14 @@ "source": { "type": "git", "url": "https://github.com/ircmaxell/password_compat.git", - "reference": "fc4ad2d46794ace07cbf04fe654a8bf546fc6764" + "reference": "733c06c599bfeb511f54253ddb127701bce0917d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/fc4ad2d46794ace07cbf04fe654a8bf546fc6764", - "reference": "fc4ad2d46794ace07cbf04fe654a8bf546fc6764", + "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/733c06c599bfeb511f54253ddb127701bce0917d", + "reference": "733c06c599bfeb511f54253ddb127701bce0917d", "shasum": "" }, - "time": "2013-02-04 16:45:02", "type": "library", "autoload": { "files": [ @@ -38,20 +37,21 @@ "keywords": [ "hashing", "password" - ] + ], + "time": "2013-02-13 16:58:34" }, { "name": "monolog/monolog", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog", - "reference": "1.3.1" + "reference": "1.4.0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1.3.1", - "reference": "1.3.1", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1.4.0", + "reference": "1.4.0", "shasum": "" }, "require": { @@ -70,11 +70,10 @@ "mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server", "raven/raven": "Allow sending log messages to a Sentry server" }, - "time": "2013-01-11 10:23:20", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { @@ -100,7 +99,8 @@ "log", "logging", "psr-3" - ] + ], + "time": "2013-02-13 18:06:51" }, { "name": "psr/log", @@ -116,7 +116,6 @@ "reference": "1.0.0", "shasum": "" }, - "time": "2012-12-21 11:40:51", "type": "library", "autoload": { "psr-0": { @@ -138,7 +137,92 @@ "log", "psr", "psr-3" - ] + ], + "time": "2012-12-21 11:40:51" + }, + { + "name": "vates/eventus", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/vatesfr/eventus.git", + "reference": "27efc85692f8f77531f0864da30a3724890a44b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vatesfr/eventus/zipball/27efc85692f8f77531f0864da30a3724890a44b7", + "reference": "27efc85692f8f77531f0864da30a3724890a44b7", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": ">=3.7,<3.8" + }, + "type": "library", + "autoload": { + "psr-0": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0" + ], + "authors": [ + { + "name": "Julien Fontanet", + "email": "julien.fontanet@vates.fr" + } + ], + "description": "Small event library.", + "keywords": [ + "event" + ], + "time": "2013-02-16 11:40:13" + }, + { + "name": "vates/rekodi", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/vatesfr/rekodi.git", + "reference": "608abef5d01a09c5122905a6b99c5197140745a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vatesfr/rekodi/zipball/608abef5d01a09c5122905a6b99c5197140745a0", + "reference": "608abef5d01a09c5122905a6b99c5197140745a0", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": ">=3.7,<3.8" + }, + "type": "library", + "autoload": { + "psr-0": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0" + ], + "authors": [ + { + "name": "Julien Fontanet", + "email": "julien.fontanet@vates.fr" + } + ], + "description": "Small data management library.", + "keywords": [ + "event" + ], + "time": "2013-02-17 16:58:01" } ], "packages-dev": null, @@ -147,6 +231,8 @@ ], "minimum-stability": "stable", "stability-flags": { - "ircmaxell/password-compat": 20 + "ircmaxell/password-compat": 20, + "vates/eventus": 20, + "vates/rekodi": 20 } } diff --git a/src/config/global.php b/config/global.php similarity index 100% rename from src/config/global.php rename to config/global.php diff --git a/src/config/local.php.dist b/config/local.php.dist similarity index 100% rename from src/config/local.php.dist rename to config/local.php.dist diff --git a/src/lib/Application.php b/lib/Application.php similarity index 98% rename from src/lib/Application.php rename to lib/Application.php index a57941a..11361d7 100644 --- a/src/lib/Application.php +++ b/lib/Application.php @@ -27,7 +27,6 @@ */ final class Application extends Base { - /** * */ @@ -178,10 +177,7 @@ final class Application extends Base { /* If available, we use OpenSSL to create more secure tokens. * - * @todo Maybe we should also use a time-resistant token comparison - * algorithm in authentication. - * - * @todo Move the if outside of this function and furthermore of + * @todo Move the “if” outside of this function and furthermore of * this loop for performance concerns. */ if (function_exists('openssl_random_pseudo_bytes')) diff --git a/src/lib/Base.php b/lib/Base.php similarity index 100% rename from src/lib/Base.php rename to lib/Base.php diff --git a/src/lib/BufferedWriter.php b/lib/BufferedWriter.php similarity index 100% rename from src/lib/BufferedWriter.php rename to lib/BufferedWriter.php diff --git a/src/lib/Client.php b/lib/Client.php similarity index 100% rename from src/lib/Client.php rename to lib/Client.php diff --git a/src/lib/Config.php b/lib/Config.php similarity index 100% rename from src/lib/Config.php rename to lib/Config.php diff --git a/src/lib/Connection.php b/lib/Connection.php similarity index 100% rename from src/lib/Connection.php rename to lib/Connection.php diff --git a/src/lib/DI.php b/lib/DI.php similarity index 100% rename from src/lib/DI.php rename to lib/DI.php diff --git a/src/lib/ErrorLogger.php b/lib/ErrorLogger.php similarity index 100% rename from src/lib/ErrorLogger.php rename to lib/ErrorLogger.php diff --git a/src/lib/Loop.php b/lib/Loop.php similarity index 100% rename from src/lib/Loop.php rename to lib/Loop.php diff --git a/src/lib/XCP.php b/lib/XCP.php similarity index 100% rename from src/lib/XCP.php rename to lib/XCP.php diff --git a/src/xo-server b/xo-server similarity index 97% rename from src/xo-server rename to xo-server index de2f341..a6ca94b 100755 --- a/src/xo-server +++ b/xo-server @@ -39,7 +39,7 @@ function _bootstrap() ; // Class autoloading is done by composer. - require($root_dir.'/../vendor/autoload.php'); + require($root_dir.'/vendor/autoload.php'); // Reads configuration. $config = new Config(array_merge_recursive(