diff --git a/build.xml b/build.xml index 114dec7..23469f3 100644 --- a/build.xml +++ b/build.xml @@ -1,6 +1,7 @@ - + + @@ -15,6 +16,12 @@ + + + + + + @@ -32,9 +39,7 @@ - - - + @@ -44,19 +49,17 @@ - + - + - - @@ -64,9 +67,7 @@ - - - + @@ -75,9 +76,12 @@ + + + + diff --git a/composer.json b/composer.json index 49508ff..b5a37ab 100644 --- a/composer.json +++ b/composer.json @@ -1,14 +1,17 @@ { "require": { - "silex/silex": "1.0.*", - "twig/twig": "1.9.*", - "symfony/twig-bridge": "2.1.*", - "symfony/filesystem": "2.1.*", - "klaussilveira/gitter": "dev-master" + "silex/silex": "1.0.*@dev", + "twig/twig": "1.12.*", + "symfony/twig-bridge": "2.2.*", + "symfony/filesystem": "2.2.*", + "klaussilveira/gitter": "0.1.3" }, "require-dev": { - "symfony/browser-kit": "2.1.*", - "symfony/css-selector": "2.1.*" + "symfony/browser-kit": "2.2.*", + "symfony/css-selector": "2.2.*", + "phpunit/phpunit": "3.7.*", + "phpmd/phpmd": "1.4.*", + "phploc/phploc": "1.7.*" }, "minimum-stability": "dev", "autoload": { diff --git a/composer.lock b/composer.lock index 77469ae..a057fed 100644 --- a/composer.lock +++ b/composer.lock @@ -1,35 +1,35 @@ { - "hash": "b1fc3d7e61707618f68e5cf940e97081", + "hash": "4d7bf1d32c612b74b8e7afdb6a9ada2d", "packages": [ { "name": "klaussilveira/gitter", - "version": "dev-master", + "version": "0.1.3", "source": { "type": "git", - "url": "https://github.com/klaussilveira/gitter", - "reference": "1c9b6e4dde81d21acffe99d9f4559ed3bc59f947" + "url": "https://github.com/klaussilveira/gitter.git", + "reference": "0.1.3" }, "dist": { "type": "zip", - "url": "https://github.com/klaussilveira/gitter/zipball/1c9b6e4dde81d21acffe99d9f4559ed3bc59f947", - "reference": "1c9b6e4dde81d21acffe99d9f4559ed3bc59f947", + "url": "https://api.github.com/repos/klaussilveira/gitter/zipball/0.1.3", + "reference": "0.1.3", "shasum": "" }, "require": { "php": ">=5.3.0", - "symfony/process": ">=2.1" + "symfony/process": ">=2.2" }, "require-dev": { - "symfony/filesystem": ">=2.1" + "phpunit/phpunit": ">=3.7.1", + "symfony/filesystem": ">=2.2" }, - "time": "1351643953", "type": "library", - "installation-source": "source", "autoload": { "psr-0": { "Gitter": "lib/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-2-Clause" ], @@ -46,20 +46,21 @@ "keywords": [ "git", "vcs" - ] + ], + "time": "2013-03-29 01:18:34" }, { "name": "pimple/pimple", "version": "dev-master", "source": { "type": "git", - "url": "git://github.com/fabpot/Pimple.git", - "reference": "b9f27b8dc18c08f00627dec02359b46a24791dc3" + "url": "https://github.com/fabpot/Pimple.git", + "reference": "v1.0.2" }, "dist": { "type": "zip", - "url": "https://github.com/fabpot/Pimple/zipball/b9f27b8dc18c08f00627dec02359b46a24791dc3", - "reference": "b9f27b8dc18c08f00627dec02359b46a24791dc3", + "url": "https://api.github.com/repos/fabpot/Pimple/zipball/v1.0.2", + "reference": "v1.0.2", "shasum": "" }, "require": { @@ -71,12 +72,12 @@ "dev-master": "1.0.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Pimple": "lib/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -89,23 +90,61 @@ "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", "homepage": "http://pimple.sensiolabs.org", "keywords": [ - "dependency injection", - "container" + "container", + "dependency injection" ], - "time": "1347278988" + "time": "2013-03-08 08:21:40" + }, + { + "name": "psr/log", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log", + "reference": "1.0.0" + }, + "dist": { + "type": "zip", + "url": "https://github.com/php-fig/log/archive/1.0.0.zip", + "reference": "1.0.0", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21 11:40:51" }, { "name": "silex/silex", "version": "dev-master", "source": { "type": "git", - "url": "git://github.com/fabpot/Silex.git", - "reference": "69d710011ee8f9fa286854fcf636a07ad76b570b" + "url": "https://github.com/fabpot/Silex.git", + "reference": "a5cb55ced63ece76550de1599ddcc60719373594" }, "dist": { "type": "zip", - "url": "https://github.com/fabpot/Silex/zipball/69d710011ee8f9fa286854fcf636a07ad76b570b", - "reference": "69d710011ee8f9fa286854fcf636a07ad76b570b", + "url": "https://api.github.com/repos/fabpot/Silex/zipball/a5cb55ced63ece76550de1599ddcc60719373594", + "reference": "a5cb55ced63ece76550de1599ddcc60719373594", "shasum": "" }, "require": { @@ -117,42 +156,43 @@ "symfony/routing": ">=2.1,<2.3-dev" }, "require-dev": { - "monolog/monolog": ">=1.0.0,<1.2-dev", - "twig/twig": ">=1.8.0,<2.0-dev", - "swiftmailer/swiftmailer": "4.2.*", "doctrine/dbal": ">=2.2.0,<2.4.0-dev", - "symfony/security": ">=2.1,<2.3-dev", - "symfony/config": ">=2.1,<2.3-dev", - "symfony/locale": ">=2.1,<2.3-dev", - "symfony/form": ">=2.1,<2.3-dev", + "swiftmailer/swiftmailer": "4.2.*", "symfony/browser-kit": ">=2.1,<2.3-dev", + "symfony/config": ">=2.1,<2.3-dev", "symfony/css-selector": ">=2.1,<2.3-dev", + "symfony/dom-crawler": ">=2.1,<2.3-dev", "symfony/finder": ">=2.1,<2.3-dev", + "symfony/form": ">=2.1.4,<2.3-dev", + "symfony/locale": ">=2.1,<2.3-dev", "symfony/monolog-bridge": ">=2.1,<2.3-dev", + "symfony/options-resolver": ">=2.1,<2.3-dev", "symfony/process": ">=2.1,<2.3-dev", + "symfony/security": ">=2.1,<2.3-dev", + "symfony/serializer": ">=2.1,<2.3-dev", "symfony/translation": ">=2.1,<2.3-dev", "symfony/twig-bridge": ">=2.1,<2.3-dev", "symfony/validator": ">=2.1,<2.3-dev", - "symfony/serializer": ">=2.1,<2.3-dev" + "twig/twig": ">=1.8.0,<2.0-dev" }, "suggest": { "symfony/browser-kit": ">=2.1,<2.3-dev", "symfony/css-selector": ">=2.1,<2.3-dev", - "symfony/dom-crawler": ">=2.1,<2.3-dev" + "symfony/dom-crawler": ">=2.1,<2.3-dev", + "symfony/form": "To make use of the FormServiceProvider, >= 2.1.4 is required" }, - "time": "1351540898", "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Silex": "src/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -171,46 +211,46 @@ "homepage": "http://silex.sensiolabs.org", "keywords": [ "microframework" - ] + ], + "time": "2013-03-27 09:31:32" }, { "name": "symfony/event-dispatcher", - "version": "dev-master", + "version": "2.2.x-dev", "target-dir": "Symfony/Component/EventDispatcher", "source": { "type": "git", - "url": "https://github.com/symfony/EventDispatcher", - "reference": "24a1039d52b6b9f533cb73dcb96c7748262db686" + "url": "https://github.com/symfony/EventDispatcher.git", + "reference": "v2.2.0-RC3" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/EventDispatcher/zipball/24a1039d52b6b9f533cb73dcb96c7748262db686", - "reference": "24a1039d52b6b9f533cb73dcb96c7748262db686", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.2.0-RC3", + "reference": "v2.2.0-RC3", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "symfony/dependency-injection": "2.2.*" + "symfony/dependency-injection": ">=2.0,<3.0" }, "suggest": { "symfony/dependency-injection": "2.2.*", "symfony/http-kernel": "2.2.*" }, - "time": "1349553479", "type": "library", "extra": { "branch-alias": { "dev-master": "2.2-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony\\Component\\EventDispatcher\\": "" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -225,21 +265,22 @@ } ], "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com" + "homepage": "http://symfony.com", + "time": "2013-02-11 11:26:43" }, { "name": "symfony/filesystem", - "version": "2.1.x-dev", + "version": "2.2.x-dev", "target-dir": "Symfony/Component/Filesystem", "source": { "type": "git", - "url": "https://github.com/symfony/Filesystem", - "reference": "v2.1.3" + "url": "https://github.com/symfony/Filesystem.git", + "reference": "v2.2.0-RC3" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Filesystem/zipball/v2.1.3", - "reference": "v2.1.3", + "url": "https://api.github.com/repos/symfony/Filesystem/zipball/v2.2.0-RC3", + "reference": "v2.2.0-RC3", "shasum": "" }, "require": { @@ -248,15 +289,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { - "Symfony\\Component\\Filesystem": "" + "Symfony\\Component\\Filesystem\\": "" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -272,34 +313,32 @@ ], "description": "Symfony Filesystem Component", "homepage": "http://symfony.com", - "time": "1350717030" + "time": "2013-01-17 15:25:59" }, { "name": "symfony/http-foundation", - "version": "dev-master", + "version": "2.2.x-dev", "target-dir": "Symfony/Component/HttpFoundation", "source": { "type": "git", - "url": "https://github.com/symfony/HttpFoundation", - "reference": "707e289629a10fde825bc4ba90aba743f79b173c" + "url": "https://github.com/symfony/HttpFoundation.git", + "reference": "6af424d4fee81987e76bc76aa4e811859ca70bac" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/HttpFoundation/zipball/707e289629a10fde825bc4ba90aba743f79b173c", - "reference": "707e289629a10fde825bc4ba90aba743f79b173c", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/6af424d4fee81987e76bc76aa4e811859ca70bac", + "reference": "6af424d4fee81987e76bc76aa4e811859ca70bac", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "1351508251", "type": "library", "extra": { "branch-alias": { "dev-master": "2.2-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony\\Component\\HttpFoundation\\": "" @@ -308,6 +347,7 @@ "Symfony/Component/HttpFoundation/Resources/stubs" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -322,37 +362,40 @@ } ], "description": "Symfony HttpFoundation Component", - "homepage": "http://symfony.com" + "homepage": "http://symfony.com", + "time": "2013-03-23 07:49:54" }, { "name": "symfony/http-kernel", - "version": "dev-master", + "version": "2.2.x-dev", "target-dir": "Symfony/Component/HttpKernel", "source": { "type": "git", - "url": "https://github.com/symfony/HttpKernel", - "reference": "4dcb0bf602788342fb80c28c6e28be818839d417" + "url": "https://github.com/symfony/HttpKernel.git", + "reference": "3bfc8fda577fb671b2d9395a59fbc87f449fa61f" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/HttpKernel/zipball/4dcb0bf602788342fb80c28c6e28be818839d417", - "reference": "4dcb0bf602788342fb80c28c6e28be818839d417", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/3bfc8fda577fb671b2d9395a59fbc87f449fa61f", + "reference": "3bfc8fda577fb671b2d9395a59fbc87f449fa61f", "shasum": "" }, "require": { "php": ">=5.3.3", - "symfony/event-dispatcher": "2.2.*", - "symfony/http-foundation": "2.2.*" + "psr/log": ">=1.0,<2.0", + "symfony/event-dispatcher": ">=2.1,<3.0", + "symfony/http-foundation": ">=2.2,<2.3-dev" }, "require-dev": { "symfony/browser-kit": "2.2.*", - "symfony/class-loader": "2.2.*", - "symfony/config": "2.2.*", + "symfony/class-loader": ">=2.1,<3.0", + "symfony/config": ">=2.0,<3.0", "symfony/console": "2.2.*", - "symfony/dependency-injection": "2.2.*", - "symfony/finder": "2.2.*", - "symfony/process": "2.2.*", - "symfony/routing": "2.2.*" + "symfony/dependency-injection": ">=2.0,<3.0", + "symfony/finder": ">=2.0,<3.0", + "symfony/process": ">=2.0,<3.0", + "symfony/routing": ">=2.2,<2.3-dev", + "symfony/stopwatch": ">=2.2,<2.3-dev" }, "suggest": { "symfony/browser-kit": "2.2.*", @@ -362,19 +405,18 @@ "symfony/dependency-injection": "2.2.*", "symfony/finder": "2.2.*" }, - "time": "1351530455", "type": "library", "extra": { "branch-alias": { "dev-master": "2.2-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony\\Component\\HttpKernel\\": "" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -389,7 +431,8 @@ } ], "description": "Symfony HttpKernel Component", - "homepage": "http://symfony.com" + "homepage": "http://symfony.com", + "time": "2013-03-23 10:43:44" }, { "name": "symfony/process", @@ -397,13 +440,13 @@ "target-dir": "Symfony/Component/Process", "source": { "type": "git", - "url": "https://github.com/symfony/Process", - "reference": "b35a2a4fae02286df3275d7094a3d3d575122db8" + "url": "https://github.com/symfony/Process.git", + "reference": "46b24c5905096914d467b769027e36433c7b5421" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Process/zipball/b35a2a4fae02286df3275d7094a3d3d575122db8", - "reference": "b35a2a4fae02286df3275d7094a3d3d575122db8", + "url": "https://api.github.com/repos/symfony/Process/zipball/46b24c5905096914d467b769027e36433c7b5421", + "reference": "46b24c5905096914d467b769027e36433c7b5421", "shasum": "" }, "require": { @@ -412,15 +455,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.3-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony\\Component\\Process\\": "" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -436,50 +479,49 @@ ], "description": "Symfony Process Component", "homepage": "http://symfony.com", - "time": "1351356874" + "time": "2013-03-23 08:06:49" }, { "name": "symfony/routing", - "version": "dev-master", + "version": "2.2.x-dev", "target-dir": "Symfony/Component/Routing", "source": { "type": "git", - "url": "https://github.com/symfony/Routing", - "reference": "29792d8ac4ed7308acdeed4933cb6d91b7f6510f" + "url": "https://github.com/symfony/Routing.git", + "reference": "a8599d5735c5f1f994cfbf91f59851add9c9f627" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Routing/zipball/29792d8ac4ed7308acdeed4933cb6d91b7f6510f", - "reference": "29792d8ac4ed7308acdeed4933cb6d91b7f6510f", + "url": "https://api.github.com/repos/symfony/Routing/zipball/a8599d5735c5f1f994cfbf91f59851add9c9f627", + "reference": "a8599d5735c5f1f994cfbf91f59851add9c9f627", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "doctrine/common": ">=2.2,<2.4-dev", - "symfony/config": "2.2.*", - "symfony/yaml": "2.2.*", - "symfony/http-kernel": "2.2.*" + "doctrine/common": ">=2.2,<3.0", + "psr/log": ">=1.0,<2.0", + "symfony/config": ">=2.2,<2.3-dev", + "symfony/yaml": ">=2.0,<3.0" }, "suggest": { - "doctrine/common": ">=2.2,<2.4-dev", + "doctrine/common": "~2.2", "symfony/config": "2.2.*", "symfony/yaml": "2.2.*" }, - "time": "1351466734", "type": "library", "extra": { "branch-alias": { "dev-master": "2.2-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony\\Component\\Routing\\": "" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -494,55 +536,58 @@ } ], "description": "Symfony Routing Component", - "homepage": "http://symfony.com" + "homepage": "http://symfony.com", + "time": "2013-03-14 09:39:13" }, { "name": "symfony/twig-bridge", - "version": "2.1.x-dev", + "version": "2.2.x-dev", "target-dir": "Symfony/Bridge/Twig", "source": { "type": "git", - "url": "https://github.com/symfony/TwigBridge", - "reference": "v2.1.3" + "url": "https://github.com/symfony/TwigBridge.git", + "reference": "50bbc4a10d34a71325b58940c4887726b8a30841" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/TwigBridge/zipball/v2.1.3", - "reference": "v2.1.3", + "url": "https://api.github.com/repos/symfony/TwigBridge/zipball/50bbc4a10d34a71325b58940c4887726b8a30841", + "reference": "50bbc4a10d34a71325b58940c4887726b8a30841", "shasum": "" }, "require": { "php": ">=5.3.3", - "twig/twig": ">=1.9.1,<2.0-dev" + "twig/twig": ">=1.11.0,<2.0" }, "require-dev": { - "symfony/form": "2.1.*", - "symfony/routing": "2.1.*", - "symfony/templating": "2.1.*", - "symfony/translation": "2.1.*", - "symfony/yaml": "2.1.*", - "symfony/security": "2.1.*" + "symfony/form": "2.2.*", + "symfony/http-kernel": ">=2.2,<2.3-dev", + "symfony/routing": ">=2.2,<2.3-dev", + "symfony/security": ">=2.0,<2.3-dev", + "symfony/templating": ">=2.1,<3.0", + "symfony/translation": ">=2.0,<2.3-dev", + "symfony/yaml": ">=2.0,<3.0" }, "suggest": { - "symfony/form": "2.1.*", - "symfony/routing": "2.1.*", - "symfony/templating": "2.1.*", - "symfony/translation": "2.1.*", - "symfony/yaml": "2.1.*", - "symfony/security": "2.1.*" + "symfony/form": "2.2.*", + "symfony/http-kernel": "2.2.*", + "symfony/routing": "2.2.*", + "symfony/security": "2.2.*", + "symfony/templating": "2.2.*", + "symfony/translation": "2.2.*", + "symfony/yaml": "2.2.*" }, "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { - "Symfony\\Bridge\\Twig": "" + "Symfony\\Bridge\\Twig\\": "" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -558,38 +603,37 @@ ], "description": "Symfony Twig Bridge", "homepage": "http://symfony.com", - "time": "1349363877" + "time": "2013-03-15 10:14:31" }, { "name": "twig/twig", - "version": "v1.9.2", + "version": "dev-master", "source": { "type": "git", - "url": "git://github.com/fabpot/Twig.git", - "reference": "v1.9.2" + "url": "https://github.com/fabpot/Twig.git", + "reference": "e8991cc2f9c84b2b5c782203904898717d46e56a" }, "dist": { "type": "zip", - "url": "https://github.com/fabpot/Twig/zipball/v1.9.2", - "reference": "v1.9.2", + "url": "https://api.github.com/repos/fabpot/Twig/zipball/e8991cc2f9c84b2b5c782203904898717d46e56a", + "reference": "e8991cc2f9c84b2b5c782203904898717d46e56a", "shasum": "" }, "require": { "php": ">=5.2.4" }, - "time": "2012-08-25 10:32:57", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.12-dev" } }, - "installation-source": "dist", "autoload": { "psr-0": { "Twig_": "lib/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3" ], @@ -607,15 +651,848 @@ "homepage": "http://twig.sensiolabs.org", "keywords": [ "templating" - ] + ], + "time": "2013-03-25 07:43:31" + } + ], + "packages-dev": [ + { + "name": "pdepend/pdepend", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/pdepend/pdepend.git", + "reference": "85b3d7f2d2c6105a76daea0f5a0aee7c7a140b25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/85b3d7f2d2c6105a76daea0f5a0aee7c7a140b25", + "reference": "85b3d7f2d2c6105a76daea0f5a0aee7c7a140b25", + "shasum": "" + }, + "require": { + "php": ">=5.2.3" + }, + "bin": [ + "src/bin/pdepend" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "description": "Official version of pdepend to be handled with Composer", + "time": "2013-01-25 15:09:33" + }, + { + "name": "phploc/phploc", + "version": "1.7.4", + "source": { + "type": "git", + "url": "git://github.com/sebastianbergmann/phploc.git", + "reference": "1.7.4" + }, + "dist": { + "type": "zip", + "url": "https://github.com/sebastianbergmann/phploc/archive/1.7.4.zip", + "reference": "1.7.4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/finder": "2.1.x-dev", + "zetacomponents/console-tools": "dev-master" + }, + "bin": [ + "composer/bin/phploc" + ], + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "A tool for quickly measuring the size of a PHP project.", + "homepage": "https://github.com/sebastianbergmann/phploc", + "time": "2012-11-10 12:45:44" + }, + { + "name": "phpmd/phpmd", + "version": "1.4.1", + "source": { + "type": "git", + "url": "git://github.com/phpmd/phpmd.git", + "reference": "1.4.1" + }, + "dist": { + "type": "zip", + "url": "https://github.com/phpmd/phpmd/archive/1.4.1.zip", + "reference": "1.4.1", + "shasum": "" + }, + "require": { + "pdepend/pdepend": "*", + "php": ">=5.3.0" + }, + "bin": [ + "src/bin/phpmd" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "../../pdepend/pdepend/src/main/php", + "src/main/php" + ], + "description": "Official version of PHPMD handled with Composer.", + "time": "2012-12-14 12:25:09" + }, + { + "name": "phpunit/php-code-coverage", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "1.2.9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.9", + "reference": "1.2.9", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": ">=1.3.0@stable", + "phpunit/php-text-template": ">=1.1.1@stable", + "phpunit/php-token-stream": ">=1.1.3@stable" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.0.5" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2013-02-26 18:55:56" + }, + { + "name": "phpunit/php-file-iterator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "2deb24c65ea78e126daa8d45b2089ddc29ec1d26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/2deb24c65ea78e126daa8d45b2089ddc29ec1d26", + "reference": "2deb24c65ea78e126daa8d45b2089ddc29ec1d26", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "File/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2013-01-07 10:47:05" + }, + { + "name": "phpunit/php-text-template", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "1eeef106193d2f8c539728e566bb4793071a9e18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/1eeef106193d2f8c539728e566bb4793071a9e18", + "reference": "1eeef106193d2f8c539728e566bb4793071a9e18", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "Text/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2013-01-07 10:56:17" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "ecf7920b27003a9412b07dad79dbb5ad1249e6c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/ecf7920b27003a9412b07dad79dbb5ad1249e6c3", + "reference": "ecf7920b27003a9412b07dad79dbb5ad1249e6c3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2013-01-30 06:08:51" + }, + { + "name": "phpunit/php-token-stream", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "c25dd88e1592e66dee2553c99ef244203d5a1b98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c25dd88e1592e66dee2553c99ef244203d5a1b98", + "reference": "c25dd88e1592e66dee2553c99ef244203d5a1b98", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2013-01-07 10:56:35" + }, + { + "name": "phpunit/phpunit", + "version": "3.7.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "3.7.19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.19", + "reference": "3.7.19", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpunit/php-code-coverage": ">=1.2.1,<1.3.0", + "phpunit/php-file-iterator": ">=1.3.1", + "phpunit/php-text-template": ">=1.1.1", + "phpunit/php-timer": ">=1.0.2,<1.1.0", + "phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0", + "symfony/yaml": ">=2.0.0,<2.3.0" + }, + "require-dev": { + "pear-pear/pear": "1.9.4" + }, + "suggest": { + "ext-json": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "phpunit/php-invoker": ">=1.1.0,<1.2.0" + }, + "bin": [ + "composer/bin/phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "", + "../../symfony/yaml/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2013-03-25 11:45:06" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "d49b5683200b5db9b1c64cb06f52f50d147891c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/d49b5683200b5db9b1c64cb06f52f50d147891c4", + "reference": "d49b5683200b5db9b1c64cb06f52f50d147891c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-text-template": ">=1.1.1@stable" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2013-02-05 07:46:41" + }, + { + "name": "symfony/browser-kit", + "version": "2.2.x-dev", + "target-dir": "Symfony/Component/BrowserKit", + "source": { + "type": "git", + "url": "https://github.com/symfony/BrowserKit.git", + "reference": "d55e7ffd7f10bead48adb03b208bc67bd53926bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/d55e7ffd7f10bead48adb03b208bc67bd53926bb", + "reference": "d55e7ffd7f10bead48adb03b208bc67bd53926bb", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/dom-crawler": ">=2.0,<3.0" + }, + "require-dev": { + "symfony/css-selector": ">=2.0,<3.0", + "symfony/process": ">=2.0,<3.0" + }, + "suggest": { + "symfony/process": "2.2.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\BrowserKit\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony BrowserKit Component", + "homepage": "http://symfony.com", + "time": "2013-03-15 10:14:31" + }, + { + "name": "symfony/css-selector", + "version": "2.2.x-dev", + "target-dir": "Symfony/Component/CssSelector", + "source": { + "type": "git", + "url": "https://github.com/symfony/CssSelector.git", + "reference": "v2.2.0-RC3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/CssSelector/zipball/v2.2.0-RC3", + "reference": "v2.2.0-RC3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\CssSelector\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "http://symfony.com", + "time": "2013-01-17 15:25:59" + }, + { + "name": "symfony/dom-crawler", + "version": "dev-master", + "target-dir": "Symfony/Component/DomCrawler", + "source": { + "type": "git", + "url": "https://github.com/symfony/DomCrawler.git", + "reference": "c9698b3b5b93d18250f627a9001c88fe5bc87908" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/c9698b3b5b93d18250f627a9001c88fe5bc87908", + "reference": "c9698b3b5b93d18250f627a9001c88fe5bc87908", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/css-selector": ">=2.0,<3.0" + }, + "suggest": { + "symfony/css-selector": "2.2.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\DomCrawler\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "http://symfony.com", + "time": "2013-03-23 07:35:36" + }, + { + "name": "symfony/finder", + "version": "2.1.x-dev", + "target-dir": "Symfony/Component/Finder", + "source": { + "type": "git", + "url": "https://github.com/symfony/Finder.git", + "reference": "v2.1.9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Finder/zipball/v2.1.9", + "reference": "v2.1.9", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "psr-0": { + "Symfony\\Component\\Finder": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "http://symfony.com", + "time": "2013-03-06 19:26:55" + }, + { + "name": "symfony/yaml", + "version": "2.2.x-dev", + "target-dir": "Symfony/Component/Yaml", + "source": { + "type": "git", + "url": "https://github.com/symfony/Yaml.git", + "reference": "3f6d4ab3fd8226ab4ba0be9fc8a238f4338b79ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/3f6d4ab3fd8226ab4ba0be9fc8a238f4338b79ab", + "reference": "3f6d4ab3fd8226ab4ba0be9fc8a238f4338b79ab", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Yaml\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "http://symfony.com", + "time": "2013-03-23 07:49:54" + }, + { + "name": "zetacomponents/base", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/zetacomponents/Base.git", + "reference": "642f63a8a72c32996f1aaf8a317fdf746bc32ce7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zetacomponents/Base/zipball/642f63a8a72c32996f1aaf8a317fdf746bc32ce7", + "reference": "642f63a8a72c32996f1aaf8a317fdf746bc32ce7", + "shasum": "" + }, + "require-dev": { + "zetacomponents/unit-test": "*" + }, + "type": "library", + "autoload": { + "classmap": [ + "src" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Sergey Alexeev" + }, + { + "name": "Sebastian Bergmann" + }, + { + "name": "Jan Borsodi" + }, + { + "name": "Raymond Bosman" + }, + { + "name": "Frederik Holljen" + }, + { + "name": "Kore Nordmann" + }, + { + "name": "Derick Rethans" + }, + { + "name": "Vadym Savchuk" + }, + { + "name": "Tobias Schlitt" + }, + { + "name": "Alexandru Stanoi" + } + ], + "description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.", + "homepage": "https://github.com/zetacomponents", + "time": "2012-05-21 11:21:36" + }, + { + "name": "zetacomponents/console-tools", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/zetacomponents/ConsoleTools.git", + "reference": "90156abef01e4215fda8b9740f77c322f126fb02" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zetacomponents/ConsoleTools/zipball/90156abef01e4215fda8b9740f77c322f126fb02", + "reference": "90156abef01e4215fda8b9740f77c322f126fb02", + "shasum": "" + }, + "require": { + "zetacomponents/base": "*" + }, + "require-dev": { + "zetacomponents/unit-test": "*" + }, + "type": "library", + "autoload": { + "classmap": [ + "src" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Sergey Alexeev" + }, + { + "name": "Sebastian Bergmann" + }, + { + "name": "Jan Borsodi" + }, + { + "name": "Raymond Bosman" + }, + { + "name": "Frederik Holljen" + }, + { + "name": "Kore Nordmann" + }, + { + "name": "Derick Rethans" + }, + { + "name": "Vadym Savchuk" + }, + { + "name": "Tobias Schlitt" + }, + { + "name": "Alexandru Stanoi" + } + ], + "description": "A set of classes to do different actions with the console (also called shell). It can render a progress bar, tables and a status bar and contains a class for parsing command line options.", + "homepage": "https://github.com/zetacomponents", + "time": "2012-05-21 09:55:34" } ], - "packages-dev": null, "aliases": [ ], "minimum-stability": "dev", "stability-flags": { - "klaussilveira/gitter": 20 - } -} \ No newline at end of file + "silex/silex": 20 + }, + "platform": [ + + ], + "platform-dev": [ + + ] +} diff --git a/config.ini-example b/config.ini-example index ea2c8da..c5f8fcb 100644 --- a/config.ini-example +++ b/config.ini-example @@ -1,6 +1,7 @@ [git] client = '/usr/bin/git' ; Your git executable path repositories = '/var/www/projects/' ; Path to your repositories +default_branch = 'master' ; Default branch when HEAD is detached ;Windows Users diff --git a/pkg_builder/Makefile b/pkg_builder/Makefile new file mode 100644 index 0000000..32ffce8 --- /dev/null +++ b/pkg_builder/Makefile @@ -0,0 +1,147 @@ +# Main Info +NAME = gitlist +DESCRIPTION = "An elegant and modern git repository viewer" +LICENSE = New BSD +GROUP = gitlist +VENDOR = gitlist.org +URL = "http://www.gitlist.org" + +#BUILD Info +PREFIX = /usr/share +PROJROOT = "$(shell pwd)" +SRCROOT = "$(shell pwd)/gitlist" +UPSTREAM_VERSION = $(shell cat tools/release.info | head -n1 | cut -d"=" -f2) +BUILD_STAMP = $(shell date +"%Y%m%d%H%M%S") + +#Packager Info +PACKAGER = $(shell git config user.name) +PACKAGER_MAIL = $(shell git config user.email) + +#Debian Package Info +PACKAGE-VERSION= 1 +DEBIAN_BUILD_ROOT = ${PROJROOT}/debian/ +PROJECT_DEBIAN_LIKE_NAME=$(shell cat tools/release.info | grep name | cut -d"=" -f2) +DEBIAN_NAME=$(PROJECT_DEBIAN_LIKE_NAME)$(shell echo "_")$(UPSTREAM_VERSION)-${PACKAGE-VERSION}$(shell echo "_all.deb") +DEBIAN_VERSION = +# Generating control file +define control +Package: $(PROJECT_DEBIAN_LIKE_NAME) +Version: $(UPSTREAM_VERSION)-${PACKAGE-VERSION} +Architecture: all +Section: web +Priority: optional +Maintainer: "${PACKAGER} <${PACKAGER_MAIL}>" +Description: ${DESCRIPTION} +endef +export control + +all: + @echo "... $(UPSTREAM_VERSION)" + @echo "... $(PACKAGER)" + @echo "... $(PACKAGER_MAIL)" + @echo "... $(DEBIAN_NAME)" + +help: + @echo "To use this make file just:" + @echo "Download the gitlist tarball and stract it into a folder called gitlist" + @echo "make [build_deb|build_rpm|build(apache|nginx|lighthttp)]" + +clean_deb: + @echo "Cleaning . . ." + @rm -rf ${DEBIAN_BUILD_ROOT}/*.deb + @rm -rf ${PROJROOT}/debian + +prepare_deb: clean_deb + @echo "############################### - Building DEB" + @mkdir ${DEBIAN_BUILD_ROOT} -pv + @mkdir ${DEBIAN_BUILD_ROOT}/DEBIAN -pv + @mkdir ${DEBIAN_BUILD_ROOT}${PREFIX}/${PROJECT_DEBIAN_LIKE_NAME} -pv + +copy_deb_files: prepare_deb + @echo "$$control" > ${DEBIAN_BUILD_ROOT}/DEBIAN/control + +copy_deb: copy_deb_files + @echo Sync files + @rsync -avz ${SRCROOT} ${DEBIAN_BUILD_ROOT}${PREFIX}/ + +md5sum_deb: copy_deb + @cd debian; find . -type f ! -regex '.*\.hg.*' ! -regex '.*?debian-binary.*' ! -regex '.*?DEBIAN.*' | xargs -d "\n" md5sum > DEBIAN/md5sums + +deb_uniq: md5sum_deb + @mkdir ${PROJROOT}/pkg -p + @dpkg -b debian $(DEBIAN_NAME); + @mv $(DEBIAN_NAME) ${PROJROOT}/pkg/ + @rm debian -rf + @echo '### Wrote $(DEBIAN_NAME) in ${PROJROOT}/pkg/ . . . . . Success' + + +build_deb: deb_uniq + +#### RPM STUFF + +RPM_NAME=$(PROJECT_DEBIAN_LIKE_NAME)$(shell echo "_")$(UPSTREAM_VERSION)-${PACKAGE-VERSION}$(shell echo "_all.rpm") + +DIST_DIR = dist +TAR_DIR = tar + +RPM_DIR = rpm +RPM_DIRS = SPECS RPMS SOURCES BUILD + +clean_rpm: + @echo Cleaning temporary dirs... + @rm -rf $(TAR_DIR) + @rm -rf $(RPM_DIR) + @rm -rf $(DIST_DIR) + +rpm_init: clean_rpm + @echo Creating directories... + @echo $(DIST_DIR) + @mkdir -p $(DIST_DIR) + @for dir in $(RPM_DIRS); do \ + echo $(RPM_DIR)/$$dir; \ + mkdir -p $(RPM_DIR)/$$dir; \ + done + +rpm_preptar: rpm_init + @echo Copying files to generate tar... + @echo creating directory: $(TAR_DIR)/ + @mkdir $(TAR_DIR)/ -p + @rsync -avz --exclude ".git" --exclude ".gitignore" --exclude "builder" gitlist $(TAR_DIR)/ + +rpm_tar: rpm_preptar + @echo Generating tarball... + @cd $(PROJROOT)/$(TAR_DIR); \ + tar cf $(PROJROOT)/$(RPM_DIR)/SOURCES/$(NAME).tar . + +rpm: rpm_tar + @echo Calling rpmbuild... + @echo Vesion: $(VERSION) + @cp tools/$(NAME).spec $(RPM_DIR)/SPECS/ + + @cd $(PROJROOT)/$(RPM_DIR)/SPECS ; \ + rpmbuild -bb \ + --buildroot="$(PROJROOT)/$(RPM_DIR)/BUILD/$(NAME)" \ + --define "_topdir $(PROJROOT)/$(RPM_DIR)" \ + --define "name $(NAME)" \ + --define "summary "$(DESCRIPTION)"" \ + --define "version $(UPSTREAM_VERSION)" \ + --define "release $(PACKAGE-VERSION)" \ + --define "url _$(URL)_" \ + --define "license $(LICENSE)" \ + --define "group $(GROUP)" \ + --define "vendor $(VENDOR)" \ + --define "packager $(PACKAGER)" \ + --define "prefix $(PREFIX)" \ + --define "source_dir $(PROJROOT)/$(RPM_DIR)/SOURCES" \ + $(NAME).spec + @echo Copying generated RPM to dist dir... + @mkdir ${PROJROOT}/pkg -p + @cp $(PROJROOT)/$(RPM_DIR)/RPMS/noarch/*.rpm $(PROJROOT)/pkg + @rm -rf $(TAR_DIR) + @rm -rf $(RPM_DIR) + @rm -rf $(DIST_DIR) + + + +build_rpm: rpm + diff --git a/pkg_builder/README.md b/pkg_builder/README.md new file mode 100644 index 0000000..ffb4b0c --- /dev/null +++ b/pkg_builder/README.md @@ -0,0 +1,46 @@ +# GitList Builder: Tools to build gitlist package + +## Status + +### Ready to build + +* Core Deb Packages: +``` +$ make build_deb +``` + +* Core Rpm Packages: +``` +$ make build_rpm +``` + +### Not Ready (Comming soon) + +Packages to install configuration files: + +* make apache_deb +* make apache_rpm +* make nginx_deb +* make nginx_rpm + +## Dependencies + +* To use this package builder you may need to install some development packages like: dpkg-dev or evem rpm; +* A tarball of a stable release; + +## Instructions + +To use this builder just download the lastest stable release into this directory and build using the make functions avaible in make help + +## How to build + +The packages can be generated by running Makefile functions like: + +``` +$ make build_deb +$ make build_rpm +``` + +## Structure + +Core package is a simple source package while a configuration package requires all the dependencies. diff --git a/pkg_builder/tools/gitlist.spec b/pkg_builder/tools/gitlist.spec new file mode 100644 index 0000000..d7d675c --- /dev/null +++ b/pkg_builder/tools/gitlist.spec @@ -0,0 +1,37 @@ +Name: %{name} +Summary: %{summary} +Version: %{version} +Release: %{release} +URL: %{url} +License: %{license} +Group: %{group} +Vendor: %{vendor} +Packager: %{user} +Prefix: %{prefix} +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +Source0: %{name}.tar + +%description +%{summary} + +%prep +%setup -c + +%build + +%install +%{__rm} -rf %{buildroot} +%{__mkdir} -p %{buildroot}%{prefix} +%{__cp} -Ra * %{buildroot}%{prefix} + +%clean +rm -rf %{buildroot} + +%files +%defattr(0755,root,root) +%{prefix}/* + +%changelog +* Thu Jan 21 2013 Bruno Gurgel +- Initial diff --git a/pkg_builder/tools/release.info b/pkg_builder/tools/release.info new file mode 100644 index 0000000..4eac5e4 --- /dev/null +++ b/pkg_builder/tools/release.info @@ -0,0 +1,2 @@ +release=0.3 +name=gitlist diff --git a/src/GitList/Application.php b/src/GitList/Application.php index 47c4917..ced3505 100644 --- a/src/GitList/Application.php +++ b/src/GitList/Application.php @@ -55,6 +55,7 @@ class Application extends SilexApplication 'ini.file' => "config.ini", 'git.hidden' => $config->get('git', 'hidden') ? $config->get('git', 'hidden') : array(), + 'git.default_branch' => $config->get('git', 'default_branch') ? $config->get('git', 'default_branch') : 'master', )); $cached_repos = $root . DIRECTORY_SEPARATOR . @@ -66,9 +67,8 @@ class Application extends SilexApplication $this->register(new UrlGeneratorServiceProvider()); $this->register(new RoutingUtilServiceProvider()); - $this['twig'] = $this->share($this->extend('twig', function($twig, $app) { - $twig->addFilter('htmlentities', - new \Twig_Filter_Function('htmlentities')); + $this['twig'] = $this->share($this->extend('twig', function ($twig, $app) { + $twig->addFilter('htmlentities', new \Twig_Filter_Function('htmlentities')); $twig->addFilter('md5', new \Twig_Filter_Function('md5')); return $twig; diff --git a/src/GitList/Config.php b/src/GitList/Config.php index 69a9701..711133b 100644 --- a/src/GitList/Config.php +++ b/src/GitList/Config.php @@ -6,11 +6,13 @@ class Config { protected $data; - public static function fromFile($file) { + public static function fromFile($file) + { if (!file_exists($file)) { die(sprintf('Please, create the %1$s file.', $file)); } $data = parse_ini_file($file, true); + return new static($data); } diff --git a/src/GitList/Controller/BlobController.php b/src/GitList/Controller/BlobController.php index 1f923ea..d006fe7 100644 --- a/src/GitList/Controller/BlobController.php +++ b/src/GitList/Controller/BlobController.php @@ -12,9 +12,12 @@ class BlobController implements ControllerProviderInterface { $route = $app['controllers_factory']; - $route->get('{repo}/blob/{branch}/{file}', function($repo, $branch, $file) use ($app) { + $route->get('{repo}/blob/{commitishPath}', function ($repo, $commitishPath) use ($app) { $repository = $app['git']->getRepository($app['git.repos'], $repo); + list($branch, $file) = $app['util.routing'] + ->parseCommitishPathParam($commitishPath, $repo); + list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file); $blob = $repository->getBlob("$branch:\"$file\""); @@ -39,15 +42,18 @@ class BlobController implements ControllerProviderInterface 'branches' => $repository->getBranches(), 'tags' => $repository->getTags(), )); - })->assert('file', '.+') - ->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('branch', '[\w-._\/]+') + })->assert('repo', $app['util.routing']->getRepositoryRegex()) + ->assert('commitishPath', '.+') ->bind('blob'); - $route->get('{repo}/raw/{branch}/{file}', function($repo, $branch, $file) use ($app) { + $route->get('{repo}/raw/{commitishPath}', function ($repo, $commitishPath) use ($app) { $repository = $app['git']->getRepository($app['git.repos'], $repo); + list($branch, $file) = $app['util.routing'] + ->parseCommitishPathParam($commitishPath, $repo); + list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file); + $blob = $repository->getBlob("$branch:\"$file\"")->output(); $headers = array(); @@ -60,9 +66,8 @@ class BlobController implements ControllerProviderInterface } return new Response($blob, 200, $headers); - })->assert('file', '.+') - ->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('branch', '[\w-._\/]+') + })->assert('repo', $app['util.routing']->getRepositoryRegex()) + ->assert('commitishPath', $app['util.routing']->getCommitishPathRegex()) ->bind('blob_raw'); return $route; diff --git a/src/GitList/Controller/CommitController.php b/src/GitList/Controller/CommitController.php index 0fdf9ae..e017160 100644 --- a/src/GitList/Controller/CommitController.php +++ b/src/GitList/Controller/CommitController.php @@ -12,13 +12,16 @@ class CommitController implements ControllerProviderInterface { $route = $app['controllers_factory']; - $route->get('{repo}/commits/{branch}/{file}', function($repo, $branch, $file) use ($app) { + $route->get('{repo}/commits/{commitishPath}', function ($repo, $commitishPath) use ($app) { $repository = $app['git']->getRepository($app['git.repos'], $repo); - if ($branch === null) { - $branch = $repository->getHead(); + if ($commitishPath === null) { + $commitishPath = $repository->getHead(); } + list($branch, $file) = $app['util.routing'] + ->parseCommitishPathParam($commitishPath, $repo); + list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file); $type = $file ? "$branch -- \"$file\"" : $branch; @@ -45,13 +48,11 @@ class CommitController implements ControllerProviderInterface 'file' => $file, )); })->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('branch', '[\w-._\/]+') - ->assert('file', '.+') - ->value('branch', null) - ->value('file', '') + ->assert('commitishPath', $app['util.routing']->getCommitishPathRegex()) + ->value('commitishPath', null) ->bind('commits'); - $route->post('{repo}/commits/{branch}/search', function(Request $request, $repo, $branch) use ($app) { + $route->post('{repo}/commits/{branch}/search', function (Request $request, $repo, $branch = '') use ($app) { $repository = $app['git']->getRepository($app['git.repos'], $repo); $query = $request->get('query'); @@ -74,12 +75,11 @@ class CommitController implements ControllerProviderInterface 'query' => $query )); })->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('branch', '[\w-._\/]+') + ->assert('branch', $app['util.routing']->getBranchRegex()) ->bind('searchcommits'); - $route->get('{repo}/commit/{commit}/', function($repo, $commit) use ($app) { + $route->get('{repo}/commit/{commit}', function ($repo, $commit) use ($app) { $repository = $app['git']->getRepository($app['git.repos'], $repo); - $commit = $repository->getCommit($commit); $branch = $repository->getHead(); @@ -92,10 +92,12 @@ class CommitController implements ControllerProviderInterface ->assert('commit', '[a-f0-9^]+') ->bind('commit'); - - $route->get('{repo}/blame/{branch}/{file}', function($repo, $branch, $file) use ($app) { + $route->get('{repo}/blame/{commitishPath}', function ($repo, $commitishPath) use ($app) { $repository = $app['git']->getRepository($app['git.repos'], $repo); + list($branch, $file) = $app['util.routing'] + ->parseCommitishPathParam($commitishPath, $repo); + list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file); $blames = $repository->getBlame("$branch -- \"$file\""); @@ -109,8 +111,7 @@ class CommitController implements ControllerProviderInterface 'blames' => $blames, )); })->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('file', '.+') - ->assert('branch', '[\w-._\/]+') + ->assert('commitishPath', $app['util.routing']->getCommitishPathRegex()) ->bind('blame'); return $route; diff --git a/src/GitList/Controller/MainController.php b/src/GitList/Controller/MainController.php index 1662cf7..58cd494 100644 --- a/src/GitList/Controller/MainController.php +++ b/src/GitList/Controller/MainController.php @@ -46,16 +46,20 @@ class MainController implements ControllerProviderInterface 'branches' => $repository->getBranches(), 'tags' => $repository->getTags(), 'stats' => $stats, - 'authors' => $authors, + 'authors' => $authors, )); })->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('branch', '[\w-._\/]+') + ->assert('branch', $app['util.routing']->getBranchRegex()) ->value('branch', null) ->bind('stats'); $route->get('{repo}/{branch}/rss/', function($repo, $branch) use ($app) { $repository = $app['git']->getRepository($app['git.repos'], $repo); + if ($branch === null) { + $branch = $repository->getHead(); + } + $commits = $repository->getPaginatedCommits($branch); $html = $app['twig']->render('rss.twig', array( @@ -66,7 +70,8 @@ class MainController implements ControllerProviderInterface return new Response($html, 200, array('Content-Type' => 'application/rss+xml')); })->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('branch', '[\w-._\/]+') + ->assert('branch', $app['util.routing']->getBranchRegex()) + ->value('branch', null) ->bind('rss'); return $route; diff --git a/src/GitList/Controller/TreeController.php b/src/GitList/Controller/TreeController.php index 778f1c8..3a24d0d 100644 --- a/src/GitList/Controller/TreeController.php +++ b/src/GitList/Controller/TreeController.php @@ -13,14 +13,14 @@ class TreeController implements ControllerProviderInterface { $route = $app['controllers_factory']; - $treeController = function($repo, $branch = '', $tree = '') use ($app) { - - $repository = $app['git']->getRepositoryCached($app['git.repos'], $repo); - - if (!$branch) { - $branch = $repository->getHead(); + $route->get('{repo}/tree/{commitishPath}/', $treeController = function ($repo, $commitishPath = '') use ($app) { + $repository = $app['git']->getRepository($app['git.repos'], $repo); + if (!$commitishPath) { + $commitishPath = $repository->getHead(); } + list($branch, $tree) = $app['util.routing']->parseCommitishPathParam($commitishPath, $repo); + list($branch, $tree) = $app['util.repository']->extractRef($repository, $branch, $tree); $files = $repository->getTree($tree ? "$branch:\"$tree\"/" : $branch); $breadcrumbs = $app['util.view']->getBreadcrumbs($tree); @@ -43,17 +43,11 @@ class TreeController implements ControllerProviderInterface 'tags' => $repository->getTags(), 'readme' => $app['util.repository']->getReadme($repository, $branch), )); - }; - - $route->get('{repo}/tree/{branch}/{tree}/', $treeController - )->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('branch', '[\w-._\/]+') - ->assert('tree', '.+') + })->assert('repo', $app['util.routing']->getRepositoryRegex()) + ->assert('commitishPath', $app['util.routing']->getCommitishPathRegex()) ->bind('tree'); - $route->post('{repo}/tree/{branch}/search', - function(Request $request, $repo, $branch = '', $tree = '') use ($app) { - + $route->post('{repo}/tree/{branch}/search', function (Request $request, $repo, $branch = '', $tree = '') use ($app) { $repository = $app['git']->getRepository($app['git.repos'], $repo); if (!$branch) { $branch = $repository->getHead(); @@ -73,7 +67,7 @@ class TreeController implements ControllerProviderInterface 'tags' => $repository->getTags(), )); })->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('branch', '[\w-._\/]+') + ->assert('branch', $app['util.routing']->getBranchRegex()) ->bind('search'); @@ -109,14 +103,14 @@ class TreeController implements ControllerProviderInterface )); })->assert('format', '(zip|tar)') ->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('branch', '[\w-._\/]+') + ->assert('branch', $app['util.routing']->getBranchRegex()) ->bind('archive'); $route->get('{repo}/{branch}/', function($repo, $branch) use ($app, $treeController) { return $treeController($repo, $branch); })->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('branch', '[\w-._\/]+') + ->assert('branch', $app['util.routing']->getBranchRegex()) ->bind('branch'); $route->get('{repo}/', function($repo) use ($app, $treeController) { diff --git a/src/GitList/Git/Client.php b/src/GitList/Git/Client.php index 4f1e030..4129a7b 100644 --- a/src/GitList/Git/Client.php +++ b/src/GitList/Git/Client.php @@ -6,6 +6,39 @@ use Gitter\Client as BaseClient; class Client extends BaseClient { + protected $default_branch; + + public function __construct($options = null) + { + parent::__construct($options); + + if (!isset($options['default_branch'])) { + $options['default_branch'] = 'master'; + } + + $this->setDefaultBranch($options['default_branch']); + } + + /** + * Set default branch as a string. + * + * @param string $branch Name of branch to use when repo's HEAD is detached. + */ + protected function setDefaultBranch($branch) + { + $this->default_branch = $branch; + + return $this; + } + + /** + * Return name of default branch as a string. + */ + public function getDefaultBranch() + { + return $this->default_branch; + } + /** * Creates a new repository on the specified path * diff --git a/src/GitList/Git/Repository.php b/src/GitList/Git/Repository.php index 1800298..65db976 100644 --- a/src/GitList/Git/Repository.php +++ b/src/GitList/Git/Repository.php @@ -10,6 +10,30 @@ use Symfony\Component\Filesystem\Filesystem; class Repository extends BaseRepository { + /** + * Return true if the repo contains this commit. + * + * @param $commitHash Hash of commit whose existence we want to check + * @return boolean Whether or not the commit exists in this repo + */ + public function hasCommit($commitHash) + { + $logs = $this->getClient()->run($this, "show $commitHash"); + $logs = explode("\n", $logs); + + return strpos($logs[0], 'commit') === 0; + } + + /** + * Get the current branch, returning a default value when HEAD is detached. + */ + public function getHead($default = null) + { + $client = $this->getClient(); + + return parent::getHead($client->getDefaultBranch()); + } + /** * Show the data from a specific commit * @@ -22,16 +46,21 @@ class Repository extends BaseRepository "show --pretty=format:\"%H" . "%h%T%P" . "%an%ae" - . "%at%cn" - . "%ce" + . "%at%cn%ce" . "%ct" - . "\" $commitHash"); - - $logs = explode("\n", $logs); + . "" + . "" + . "\" $commitHash" + ); + $xmlEnd = strpos($logs, '') + 7; + $commitInfo = substr($logs, 0, $xmlEnd); + $commitData = substr($logs, $xmlEnd); + $logs = explode("\n", $commitData); + array_shift($logs); // Read commit metadata $format = new PrettyFormat; - $data = $format->parse($logs[0]); + $data = $format->parse($commitInfo); $commit = new Commit; $commit->importData($data[0]); @@ -88,8 +117,8 @@ class Repository extends BaseRepository /** * Read diff logs and generate a collection of diffs * - * @param array $logs Array of log rows - * @return array Array of diffs + * @param array $logs Array of log rows + * @return array Array of diffs */ public function readDiffLogs(array $logs) { @@ -312,7 +341,11 @@ class Repository extends BaseRepository } if (($pos = strrpos($file[4], '.')) !== false) { - $data['extensions'][] = substr($file[4], $pos); + $extension = substr($file[4], $pos); + + if (($pos = strrpos($extension, '/')) === false) { + $data['extensions'][] = $extension; + } } } @@ -335,5 +368,25 @@ class Repository extends BaseRepository $fs->mkdir(dirname($output)); $this->getClient()->run($this, "archive --format=$format --output=$output $tree"); } + + /** + * Return true if $path exists in $branch; return false otherwise. + * + * @param string $commitish Commitish reference; branch, tag, SHA1, etc. + * @param string $path Path whose existence we want to verify. + * + * GRIPE Arguably belongs in Gitter, as it's generally useful functionality. + * Also, this really may not be the best way to do this. + */ + public function pathExists($commitish, $path) + { + $output = $this->getClient()->run($this, "ls-tree $commitish '$path'"); + + if (strlen($output) > 0) { + return true; + } + + return false; + } } diff --git a/src/GitList/Provider/GitServiceProvider.php b/src/GitList/Provider/GitServiceProvider.php index 09b6106..c4e0808 100644 --- a/src/GitList/Provider/GitServiceProvider.php +++ b/src/GitList/Provider/GitServiceProvider.php @@ -22,6 +22,7 @@ class GitServiceProvider implements ServiceProviderInterface $options['hidden'] = $app['git.hidden']; $options['ini.file'] = $app['ini.file']; $options['cache.repos'] = $app['cache.repos']; + $options['default_branch'] = $app['git.default_branch']; return new Client($options); }; diff --git a/src/GitList/Util/Repository.php b/src/GitList/Util/Repository.php index cbedd5b..5f6c80c 100644 --- a/src/GitList/Util/Repository.php +++ b/src/GitList/Util/Repository.php @@ -188,7 +188,7 @@ class Repository * @param string $tree * @return array */ - public function extractRef($repository, $branch='', $tree='') + public function extractRef($repository, $branch = '', $tree = '') { $branch = trim($branch, '/'); $tree = trim($tree, '/'); diff --git a/src/GitList/Util/Routing.php b/src/GitList/Util/Routing.php index 6f1f434..cb067b5 100644 --- a/src/GitList/Util/Routing.php +++ b/src/GitList/Util/Routing.php @@ -1,6 +1,6 @@ app = $app; } + /* @brief Return $commitish, $path parsed from $commitishPath, based on + * what's in $repo. Raise a 404 if $branchpath does not represent a + * valid branch and path. + * + * A helper for parsing routes that use commit-ish names and paths + * separated by /, since route regexes are not enough to get that right. + */ + public function parseCommitishPathParam($commitishPath, $repo) + { + $app = $this->app; + $repository = $app['git']->getRepository($app['git.repos'], $repo); + + $commitish = null; + $path = null; + + $slashPosition = strpos($commitishPath, '/'); + if (strlen($commitishPath) >= 40 && + ($slashPosition === false || + $slashPosition === 40)) { + // We may have a commit hash as our commitish. + $hash = substr($commitishPath, 0, 40); + if ($repository->hasCommit($hash)) { + $commitish = $hash; + } + } + + if ($commitish === null) { + // DEBUG Can you have a repo with no branches? How should we handle + // that? + $branches = $repository->getBranches(); + + $tags = $repository->getTags(); + if ($tags !== null && count($tags) > 0) { + $branches = array_merge($branches, $tags); + } + + $matchedBranch = null; + $matchedBranchLength = 0; + foreach ($branches as $branch) { + if (strpos($commitishPath, $branch) === 0 && + strlen($branch) > $matchedBranchLength) { + $matchedBranch = $branch; + $matchedBranchLength = strlen($matchedBranch); + } + } + + $commitish = $matchedBranch; + } + + if ($commitish === null) { + $app->abort(404, "'$branch_path' does not appear to contain a commit-ish for '$repo'."); + } + + $commitishLength = strlen($commitish); + $path = substr($commitishPath, $commitishLength); + if (strpos($path, '/') === 0) { + $path = substr($path, 1); + } + + $commitHasPath = $repository->pathExists($commitish, $path); + if ($commitHasPath !== true) { + $app->abort(404, "\"$path\" does not exist in \"$commitish\"."); + } + + return array($commitish, $path); + } + + public function getBranchRegex() + { + static $branchRegex = null; + + if ($branchRegex === null) { + $branchRegex = '(?!/|.*([/.]\.|//|@\{|\\\\))[^\040\177 ~^:?*\[]+(?app['git']->getRepositories($this->app['git.repos']) ); - usort($quotedPaths, function ($a, $b) { - return strlen($b) - strlen($a); - }); + + usort( + $quotedPaths, + function ($a, $b) { + return strlen($b) - strlen($a); + } + ); + $regex = implode('|', $quotedPaths); } @@ -54,13 +148,14 @@ class Routing /** * Strips the base path from a full repository path * - * @param string $repoPath Full path to the repository + * @param string $repoPath Full path to the repository * @return string Relative path to the repository from git.repositories */ public function getRelativePath($repoPath) { if (strpos($repoPath, $this->app['git.repos']) === 0) { $relativePath = substr($repoPath, strlen($this->app['git.repos'])); + return ltrim(strtr($relativePath, '\\', '/'), '/'); } else { throw new \InvalidArgumentException( diff --git a/tests/InterfaceTest.php b/tests/InterfaceTest.php index d7a12ea..74f751f 100644 --- a/tests/InterfaceTest.php +++ b/tests/InterfaceTest.php @@ -108,6 +108,17 @@ class InterfaceTest extends WebTestCase $repository->addAll(); $repository->commit("Initial commit"); + // Detached HEAD repository fixture + $git->createRepository(self::$tmpdir . 'detached-head'); + $repository = $git->getRepositoryCached(self::$tmpdir, 'detached-head'); +# $repository = $git->getRepository(self::$tmpdir . '/detached-head'); + $repository->setConfig('user.name', 'Luke Skywalker'); + $repository->setConfig('user.email', 'luke@rebel.org'); + file_put_contents(self::$tmpdir . 'detached-head/README.md', "## detached head\ndetached-head is a *test* repository!"); + $repository->addAll(); + $repository->commit("First commit"); + $repository->checkout('HEAD'); + $git->deleteCached(); } @@ -137,8 +148,8 @@ class InterfaceTest extends WebTestCase $this->assertEquals('/NestedRepo/master/rss/', $crawler->filter('.repository-header a')->eq(3)->attr('href')); $this->assertCount(1, $crawler->filter('div.repository-header:contains("foobar")')); $this->assertCount(1, $crawler->filter('div.repository-body:contains("This is a test repo!")')); - $this->assertEquals('/foobar/', $crawler->filter('.repository-header a')->eq(6)->attr('href')); - $this->assertEquals('/foobar/master/rss/', $crawler->filter('.repository-header a')->eq(7)->attr('href')); + $this->assertEquals('/foobar/', $crawler->filter('.repository-header a')->eq(8)->attr('href')); + $this->assertEquals('/foobar/master/rss/', $crawler->filter('.repository-header a')->eq(9)->attr('href')); } public function testRepositoryPage() @@ -149,13 +160,10 @@ class InterfaceTest extends WebTestCase $this->assertTrue($client->getResponse()->isOk()); $this->assertCount(1, $crawler->filter('.tree tr:contains("README.md")')); $this->assertCount(1, $crawler->filter('.tree tr:contains("test.php")')); - $this->assertCount(1, $crawler->filter('.readme-header:contains("README.md")')); - $this->assertEquals("## GitTest\nGitTest is a *test* repository!", - $crawler->filter('#readme-content')->eq(0)->text()); - $this->assertEquals('/GitTest/blob/master/README.md', - $crawler->filter('.tree tr td')->eq(0)->filter('a')->eq(0)->attr('href')); - $this->assertEquals('/GitTest/blob/master/test.php', - $crawler->filter('.tree tr td')->eq(3)->filter('a')->eq(0)->attr('href')); + $this->assertCount(1, $crawler->filter('.md-header:contains("README.md")')); + $this->assertEquals("## GitTest\nGitTest is a *test* repository!", $crawler->filter('#md-content')->eq(0)->text()); + $this->assertEquals('/GitTest/blob/master/README.md', $crawler->filter('.tree tr td')->eq(0)->filter('a')->eq(0)->attr('href')); + $this->assertEquals('/GitTest/blob/master/test.php', $crawler->filter('.tree tr td')->eq(3)->filter('a')->eq(0)->attr('href')); $this->assertEquals('branch/name/wiith/slashes', $crawler->filter('.dropdown-menu li')->eq(1)->text()); $this->assertEquals('issue12', $crawler->filter('.dropdown-menu li')->eq(2)->text()); @@ -167,13 +175,10 @@ class InterfaceTest extends WebTestCase $this->assertCount(1, $crawler->filter('.tree tr:contains("myfolder")')); $this->assertCount(1, $crawler->filter('.tree tr:contains("testfolder")')); $this->assertCount(1, $crawler->filter('.tree tr:contains("bar.json")')); - $this->assertEquals('/foobar/tree/master/myfolder/', - $crawler->filter('.tree tr td')->eq(0)->filter('a')->eq(0)->attr('href')); - $this->assertEquals('/foobar/tree/master/testfolder/', - $crawler->filter('.tree tr td')->eq(3)->filter('a')->eq(0)->attr('href')); - $this->assertEquals('/foobar/blob/master/bar.json', - $crawler->filter('.tree tr td')->eq(6)->filter('a')->eq(0)->attr('href')); - $this->assertCount(0, $crawler->filter('.readme-header')); + $this->assertEquals('/foobar/tree/master/myfolder/', $crawler->filter('.tree tr td')->eq(0)->filter('a')->eq(0)->attr('href')); + $this->assertEquals('/foobar/tree/master/testfolder/', $crawler->filter('.tree tr td')->eq(3)->filter('a')->eq(0)->attr('href')); + $this->assertEquals('/foobar/blob/master/bar.json', $crawler->filter('.tree tr td')->eq(6)->filter('a')->eq(0)->attr('href')); + $this->assertCount(0, $crawler->filter('.md-header')); $this->assertEquals('master', $crawler->filter('.dropdown-menu li')->eq(1)->text()); } diff --git a/views/breadcrumb.twig b/views/breadcrumb.twig index c7e954a..6dc3dce 100644 --- a/views/breadcrumb.twig +++ b/views/breadcrumb.twig @@ -2,7 +2,7 @@
  • {{ repo }}
  • {% for breadcrumb in breadcrumbs %} / - {% if not loop.last %}{{ breadcrumb.dir }}{% endif %}{% if loop.last %}{{ breadcrumb.dir }}{% endif %} + {% if not loop.last %}{{ breadcrumb.dir }}{% endif %}{% if loop.last %}{{ breadcrumb.dir }}{% endif %} {% endfor %} {% block extra %}{% endblock %} diff --git a/views/commit.twig b/views/commit.twig index 058d037..8cbd3ac 100644 --- a/views/commit.twig +++ b/views/commit.twig @@ -13,8 +13,11 @@

    {{ commit.message }}

    - - {{ commit.author.name }} authored in {{ commit.date | date('d/m/Y \\a\\t H:i:s') }}
    Showing {{ commit.changedFiles }} changed files
    + {% if commit.body is not empty %} +

    {{ commit.body | nl2br }}

    + {% endif %} + + {{ commit.author.name }} authored on {{ commit.date | date('d/m/Y \\a\\t H:i:s') }}
    Showing {{ commit.changedFiles }} changed files
    @@ -30,8 +33,8 @@ diff --git a/views/commits_list.twig b/views/commits_list.twig index dbc6eec..f47f675 100644 --- a/views/commits_list.twig +++ b/views/commits_list.twig @@ -9,11 +9,11 @@ {% for item in commit %} - + View {{ item.shortHash }}

    {{ item.message }}

    - {{ item.author.name }} authored in {{ item.date | date('d/m/Y \\a\\t H:i:s') }} + {{ item.author.name }} authored on {{ item.date | date('d/m/Y \\a\\t H:i:s') }} {% endfor %} @@ -37,4 +37,4 @@ {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/views/file.twig b/views/file.twig index 71adbec..7801e6e 100644 --- a/views/file.twig +++ b/views/file.twig @@ -12,16 +12,16 @@
    {% if fileType == 'image' %} -
    {{ file }}
    +
    {{ file }}
    {% elseif fileType == 'markdown' %} -
    {{ blob }}
    +
    {{ blob }}
    {% else %}
    {{ blob|htmlentities|raw }}
    diff --git a/views/layout.twig b/views/layout.twig index 9addf44..fd066e9 100644 --- a/views/layout.twig +++ b/views/layout.twig @@ -4,6 +4,7 @@ {% block title %}Welcome!{% endblock %} + diff --git a/views/menu.twig b/views/menu.twig index d35bd4e..074573e 100644 --- a/views/menu.twig +++ b/views/menu.twig @@ -1,5 +1,5 @@ diff --git a/views/rss.twig b/views/rss.twig index e14e783..0fdc823 100644 --- a/views/rss.twig +++ b/views/rss.twig @@ -3,13 +3,13 @@ Latest commits in {{ repo }}:{{ branch }} RSS provided by GitList - {{ path('homepage') }} + {{ url('homepage') }} {% for commit in commits %} {{ commit.message }} {{ commit.author.name }} authored {{ commit.shortHash }} in {{ commit.date | date('d/m/Y \\a\\t H:i:s') }} - {{ path('commit', {repo: repo, commit: commit.hash}) }} + {{ url('commit', {repo: repo, commit: commit.hash}) }} {{ commit.date | date('r') }} {% endfor %} diff --git a/views/search.twig b/views/search.twig index d7804d3..c01abb8 100644 --- a/views/search.twig +++ b/views/search.twig @@ -28,7 +28,7 @@ {% for result in results %} - {{ result.file }} + {{ result.file }} {{ result.match }} {% endfor %} diff --git a/views/tree.twig b/views/tree.twig index 10fcc4f..9dfa8a5 100644 --- a/views/tree.twig +++ b/views/tree.twig @@ -32,7 +32,7 @@ {% if not parent %} .. {% else %} - .. + .. {% endif %} @@ -43,9 +43,9 @@ {{ file.name }} {{ file.mode }} @@ -56,10 +56,10 @@ {% if readme is defined and readme is not empty %}
    -
    +
    {{ readme.filename }}
    -
    {{ readme.content }}
    +
    {{ readme.content }}
    {% endif %} diff --git a/web/css/style.css b/web/css/style.css index f2fe4b0..407424e 100644 --- a/web/css/style.css +++ b/web/css/style.css @@ -274,8 +274,10 @@ table .span24{float:none;width:1884px;margin-left:0;} .commit-list li:last-child{border-bottom:0;margin-bottom:25px;} .repository{margin-bottom:18px;border:1px solid #d7d7d7;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.repository .repository-header{border-bottom:1px solid #d7d7d7;text-shadow:1px 1px 1px #ffffff;padding:8px;font-weight:700;font-size:14px;} .repository .repository-body{padding:8px;background-color:#f7f7f7;}.repository .repository-body p{margin:0;} -.readme-view{width:100%;margin-bottom:18px;border:1px solid #cacaca;}.readme-view .readme-header{padding:8px;line-height:18px;text-align:left;vertical-align:bottom;background-color:#f4f4f4;background-image:-moz-linear-gradient(top, #fafafa, #eaeaea);background-image:-ms-linear-gradient(top, #fafafa, #eaeaea);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fafafa), to(#eaeaea));background-image:-webkit-linear-gradient(top, #fafafa, #eaeaea);background-image:-o-linear-gradient(top, #fafafa, #eaeaea);background-image:linear-gradient(top, #fafafa, #eaeaea);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#eaeaea', GradientType=0);border-bottom:1px solid #d7d7d7;font-weight:bold;color:#555555;text-shadow:1px 1px 1px #ffffff;height:28px;}.readme-view .readme-header .meta{float:left;padding:4px 0;font-size:14px;} -.readme-view #readme-content{padding:30px;color:#000000;} +.readme-view{border:1px solid #cacaca;} +.md-view{width:100%;margin-bottom:18px;} +.md-header{padding:8px;line-height:18px;text-align:left;vertical-align:bottom;background-color:#f4f4f4;background-image:-moz-linear-gradient(top, #fafafa, #eaeaea);background-image:-ms-linear-gradient(top, #fafafa, #eaeaea);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fafafa), to(#eaeaea));background-image:-webkit-linear-gradient(top, #fafafa, #eaeaea);background-image:-o-linear-gradient(top, #fafafa, #eaeaea);background-image:linear-gradient(top, #fafafa, #eaeaea);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#eaeaea', GradientType=0);border-bottom:1px solid #d7d7d7;font-weight:bold;color:#555555;text-shadow:1px 1px 1px #ffffff;height:28px;}.md-header .meta{float:left;padding:4px 0;font-size:14px;} +#md-content{padding:30px;color:#000000;} .rss{display:inline-block;width:16px;height:16px;*margin-right:.3em;line-height:16px;vertical-align:text-top;background-image:url("../img/feed.png");background-position:0 0;background-repeat:no-repeat;}.rss:last-child{*margin-left:0;} [class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;} .icon-white{background-image:url("../img/glyphicons-halflings-white.png");} @@ -760,13 +762,13 @@ a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;} .CodeMirror-gutter-text{color:#aaa;text-align:right;padding:.4em .2em .4em .4em;white-space:pre !important;} .CodeMirror-lines{padding:.4em;white-space:pre;cursor:text;margin-left:5px;} .CodeMirror-lines *{pointer-events:none;} -.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;border-radius:0;border-width:0;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;padding:0;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;} +.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;padding:0;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;} .CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal;} .CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden;} .CodeMirror textarea{outline:none !important;} .CodeMirror pre.CodeMirror-cursor{z-index:10;position:absolute;visibility:hidden;border-left:1px solid black;border-right:none;width:0;} .cm-keymap-fat-cursor pre.CodeMirror-cursor{width:auto;border:0;background:transparent;background:rgba(0, 200, 0, 0.4);} -.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id){filter:progid:dximagetransform.microsoft.gradient(enabled=false);} +.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id){filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);} .CodeMirror-focused pre.CodeMirror-cursor{visibility:visible;} div.CodeMirror-selected{background:#d9d9d9;} .CodeMirror-focused div.CodeMirror-selected{background:#d7d4f0;} diff --git a/web/img/favicon.png b/web/img/favicon.png new file mode 100644 index 0000000..8fe5ce5 Binary files /dev/null and b/web/img/favicon.png differ diff --git a/web/js/main.js b/web/js/main.js index ba9c827..e41f089 100755 --- a/web/js/main.js +++ b/web/js/main.js @@ -20,22 +20,23 @@ $(function () { }); } - if ($('#readme-content').length) { + if ($('#md-content').length) { var converter = new Showdown.converter(); - $('#readme-content').html(converter.makeHtml($('#readme-content').text())); + $('#md-content').html(converter.makeHtml($('#md-content').text())); } function paginate() { var $pager = $('.pager'); + $pager.find('.next a').one('click', function (e) { e.preventDefault(); - $(this).css('pointer-events', 'none'); $.get(this.href, function (html) { $pager.after(html); $pager.remove(); paginate(); }); }); + $pager.find('.previous').remove(); } paginate(); diff --git a/web/less/files.less b/web/less/files.less index 0047a79..1ae5c16 100644 --- a/web/less/files.less +++ b/web/less/files.less @@ -161,30 +161,33 @@ } .readme-view { + border: 1px solid @treeHeaderBorder; +} + +.md-view { width: 100%; margin-bottom: @baseLineHeight; - border: 1px solid @treeHeaderBorder; +} - .readme-header { - padding: 8px; - line-height: @baseLineHeight; - text-align: left; - vertical-align: bottom; - #gradient > .vertical(@treeHeaderHighlight, @treeHeader); - border-bottom: 1px solid lighten(@treeHeaderBorder, 5%); - font-weight: bold; - color: @gray; - text-shadow: 1px 1px 1px rgba(255,255,255,1); - height:28px; - .meta { - float: left; - padding: 4px 0; - font-size: 14px; - } - } - - #readme-content { - padding: 30px; - color: @black; +.md-header { + padding: 8px; + line-height: @baseLineHeight; + text-align: left; + vertical-align: bottom; + #gradient > .vertical(@treeHeaderHighlight, @treeHeader); + border-bottom: 1px solid lighten(@treeHeaderBorder, 5%); + font-weight: bold; + color: @gray; + text-shadow: 1px 1px 1px rgba(255,255,255,1); + height:28px; + .meta { + float: left; + padding: 4px 0; + font-size: 14px; } } + +#md-content { + padding: 30px; + color: @black; +} \ No newline at end of file