diff --git a/composer.json b/composer.json index 49508ff..e9177b3 100644 --- a/composer.json +++ b/composer.json @@ -4,16 +4,23 @@ "twig/twig": "1.9.*", "symfony/twig-bridge": "2.1.*", "symfony/filesystem": "2.1.*", - "klaussilveira/gitter": "dev-master" + "klaussilveira/gitter": "dev-fix-get-branches" }, "require-dev": { "symfony/browser-kit": "2.1.*", - "symfony/css-selector": "2.1.*" + "symfony/css-selector": "2.1.*", + "phpunit/phpunit": "3.7.*" }, "minimum-stability": "dev", "autoload": { "psr-0": { "GitList": "src/" } - } + }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/NateEag/gitter.git" + } + ] } diff --git a/composer.lock b/composer.lock index 77469ae..f78ff25 100644 --- a/composer.lock +++ b/composer.lock @@ -1,18 +1,18 @@ { - "hash": "b1fc3d7e61707618f68e5cf940e97081", + "hash": "ed5320fb27429d26c0b32ae24d25bcfc", "packages": [ { "name": "klaussilveira/gitter", - "version": "dev-master", + "version": "dev-fix-get-branches", "source": { "type": "git", - "url": "https://github.com/klaussilveira/gitter", - "reference": "1c9b6e4dde81d21acffe99d9f4559ed3bc59f947" + "url": "https://github.com/NateEag/gitter.git", + "reference": "85f7841fdce478efae78cca090abe3488aa2d2e5" }, "dist": { "type": "zip", - "url": "https://github.com/klaussilveira/gitter/zipball/1c9b6e4dde81d21acffe99d9f4559ed3bc59f947", - "reference": "1c9b6e4dde81d21acffe99d9f4559ed3bc59f947", + "url": "https://api.github.com/repos/NateEag/gitter/zipball/85f7841fdce478efae78cca090abe3488aa2d2e5", + "reference": "85f7841fdce478efae78cca090abe3488aa2d2e5", "shasum": "" }, "require": { @@ -20,11 +20,11 @@ "symfony/process": ">=2.1" }, "require-dev": { + "phpunit/phpunit": ">=3.7.1", "symfony/filesystem": ">=2.1" }, - "time": "1351643953", + "time": "2013-02-15 01:30:05", "type": "library", - "installation-source": "source", "autoload": { "psr-0": { "Gitter": "lib/" @@ -46,7 +46,10 @@ "keywords": [ "git", "vcs" - ] + ], + "support": { + "source": "https://github.com/nateeag/gitter/tree/fix-get-branches" + } }, { "name": "pimple/pimple", @@ -54,29 +57,30 @@ "source": { "type": "git", "url": "git://github.com/fabpot/Pimple.git", - "reference": "b9f27b8dc18c08f00627dec02359b46a24791dc3" + "reference": "5a8936d9d31eb613f1a33753e5f22bffebe0bbc3" }, "dist": { "type": "zip", - "url": "https://github.com/fabpot/Pimple/zipball/b9f27b8dc18c08f00627dec02359b46a24791dc3", - "reference": "b9f27b8dc18c08f00627dec02359b46a24791dc3", + "url": "https://api.github.com/repos/fabpot/Pimple/zipball/5a8936d9d31eb613f1a33753e5f22bffebe0bbc3", + "reference": "5a8936d9d31eb613f1a33753e5f22bffebe0bbc3", "shasum": "" }, "require": { "php": ">=5.3.0" }, + "time": "2013-02-09 15:33:26", "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Pimple": "lib/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -89,10 +93,47 @@ "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", "homepage": "http://pimple.sensiolabs.org", "keywords": [ - "dependency injection", - "container" + "container", + "dependency injection" + ] + }, + { + "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": "" + }, + "time": "2012-12-21 11:40:51", + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "time": "1347278988" + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ] }, { "name": "silex/silex", @@ -100,12 +141,12 @@ "source": { "type": "git", "url": "git://github.com/fabpot/Silex.git", - "reference": "69d710011ee8f9fa286854fcf636a07ad76b570b" + "reference": "c421eab3c4ca9d106cc5b68266d58adece8636cd" }, "dist": { "type": "zip", - "url": "https://github.com/fabpot/Silex/zipball/69d710011ee8f9fa286854fcf636a07ad76b570b", - "reference": "69d710011ee8f9fa286854fcf636a07ad76b570b", + "url": "https://api.github.com/repos/fabpot/Silex/zipball/c421eab3c4ca9d106cc5b68266d58adece8636cd", + "reference": "c421eab3c4ca9d106cc5b68266d58adece8636cd", "shasum": "" }, "require": { @@ -117,42 +158,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,<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" }, - "time": "1351540898", + "time": "2013-02-13 11:44:19", "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" ], @@ -175,42 +217,42 @@ }, { "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" + "reference": "v2.2.0-RC2" }, "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-RC2", + "reference": "v2.2.0-RC2", "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", + "time": "2013-02-11 11:26:43", "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" ], @@ -234,29 +276,25 @@ "source": { "type": "git", "url": "https://github.com/symfony/Filesystem", - "reference": "v2.1.3" + "reference": "v2.1.7" }, "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.1.7", + "reference": "v2.1.7", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "time": "2013-01-09 08:51:07", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony\\Component\\Filesystem": "" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -271,35 +309,33 @@ } ], "description": "Symfony Filesystem Component", - "homepage": "http://symfony.com", - "time": "1350717030" + "homepage": "http://symfony.com" }, { "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" + "reference": "v2.2.0-RC2" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/HttpFoundation/zipball/707e289629a10fde825bc4ba90aba743f79b173c", - "reference": "707e289629a10fde825bc4ba90aba743f79b173c", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.2.0-RC2", + "reference": "v2.2.0-RC2", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "1351508251", + "time": "2013-02-11 12:46:49", "type": "library", "extra": { "branch-alias": { "dev-master": "2.2-dev" } }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony\\Component\\HttpFoundation\\": "" @@ -308,6 +344,7 @@ "Symfony/Component/HttpFoundation/Resources/stubs" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -326,33 +363,35 @@ }, { "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" + "reference": "cec254f40ea9baaa2b90de7ca6de236de76823eb" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/HttpKernel/zipball/4dcb0bf602788342fb80c28c6e28be818839d417", - "reference": "4dcb0bf602788342fb80c28c6e28be818839d417", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/cec254f40ea9baaa2b90de7ca6de236de76823eb", + "reference": "cec254f40ea9baaa2b90de7ca6de236de76823eb", "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 +401,19 @@ "symfony/dependency-injection": "2.2.*", "symfony/finder": "2.2.*" }, - "time": "1351530455", + "time": "2013-02-13 01:35:51", "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" ], @@ -398,29 +437,30 @@ "source": { "type": "git", "url": "https://github.com/symfony/Process", - "reference": "b35a2a4fae02286df3275d7094a3d3d575122db8" + "reference": "c99475d555934461f079521d024d88a0d4e861eb" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Process/zipball/b35a2a4fae02286df3275d7094a3d3d575122db8", - "reference": "b35a2a4fae02286df3275d7094a3d3d575122db8", + "url": "https://api.github.com/repos/symfony/Process/zipball/c99475d555934461f079521d024d88a0d4e861eb", + "reference": "c99475d555934461f079521d024d88a0d4e861eb", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "time": "2013-01-31 21:39:01", "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" ], @@ -435,51 +475,50 @@ } ], "description": "Symfony Process Component", - "homepage": "http://symfony.com", - "time": "1351356874" + "homepage": "http://symfony.com" }, { "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" + "reference": "v2.2.0-RC2" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Routing/zipball/29792d8ac4ed7308acdeed4933cb6d91b7f6510f", - "reference": "29792d8ac4ed7308acdeed4933cb6d91b7f6510f", + "url": "https://api.github.com/repos/symfony/Routing/zipball/v2.2.0-RC2", + "reference": "v2.2.0-RC2", "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", + "time": "2013-02-11 11:24:47", "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" ], @@ -503,12 +542,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/TwigBridge", - "reference": "v2.1.3" + "reference": "v2.1.7" }, "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/v2.1.7", + "reference": "v2.1.7", "shasum": "" }, "require": { @@ -518,31 +557,27 @@ "require-dev": { "symfony/form": "2.1.*", "symfony/routing": "2.1.*", + "symfony/security": "2.1.*", "symfony/templating": "2.1.*", "symfony/translation": "2.1.*", - "symfony/yaml": "2.1.*", - "symfony/security": "2.1.*" + "symfony/yaml": "2.1.*" }, "suggest": { "symfony/form": "2.1.*", "symfony/routing": "2.1.*", + "symfony/security": "2.1.*", "symfony/templating": "2.1.*", "symfony/translation": "2.1.*", - "symfony/yaml": "2.1.*", - "symfony/security": "2.1.*" + "symfony/yaml": "2.1.*" }, + "time": "2013-01-17 15:20:05", "type": "symfony-bridge", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "installation-source": "source", "autoload": { "psr-0": { "Symfony\\Bridge\\Twig": "" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -557,8 +592,7 @@ } ], "description": "Symfony Twig Bridge", - "homepage": "http://symfony.com", - "time": "1349363877" + "homepage": "http://symfony.com" }, { "name": "twig/twig", @@ -584,7 +618,6 @@ "dev-master": "1.9-dev" } }, - "installation-source": "dist", "autoload": { "psr-0": { "Twig_": "lib/" @@ -610,7 +643,541 @@ ] } ], - "packages-dev": null, + "packages-dev": [ + { + "name": "phpunit/php-code-coverage", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "git://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "25232ac64f081abd7478ae2d63fdb757f45e92b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/25232ac64f081abd7478ae2d63fdb757f45e92b9", + "reference": "25232ac64f081abd7478ae2d63fdb757f45e92b9", + "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" + }, + "time": "2013-02-14 10:33:04", + "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" + ] + }, + { + "name": "phpunit/php-file-iterator", + "version": "dev-master", + "source": { + "type": "git", + "url": "git://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" + }, + "time": "2013-01-07 10:47:05", + "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" + ] + }, + { + "name": "phpunit/php-text-template", + "version": "dev-master", + "source": { + "type": "git", + "url": "git://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" + }, + "time": "2013-01-07 10:56:17", + "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" + ] + }, + { + "name": "phpunit/php-timer", + "version": "1.0.x-dev", + "source": { + "type": "git", + "url": "git://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" + }, + "time": "2013-01-30 06:08:51", + "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" + ] + }, + { + "name": "phpunit/php-token-stream", + "version": "dev-master", + "source": { + "type": "git", + "url": "git://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" + }, + "time": "2013-01-07 10:56:35", + "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" + ] + }, + { + "name": "phpunit/phpunit", + "version": "3.7.x-dev", + "source": { + "type": "git", + "url": "git://github.com/sebastianbergmann/phpunit.git", + "reference": "3.7.14" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.14", + "reference": "3.7.14", + "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.1.0,<2.2.0" + }, + "suggest": { + "ext-json": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "phpunit/php-invoker": ">=1.1.0,<1.2.0" + }, + "time": "2013-02-14 08:07:17", + "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" + ] + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "git://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": "*" + }, + "time": "2013-02-05 07:46:41", + "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" + ] + }, + { + "name": "symfony/browser-kit", + "version": "2.1.x-dev", + "target-dir": "Symfony/Component/BrowserKit", + "source": { + "type": "git", + "url": "https://github.com/symfony/BrowserKit", + "reference": "v2.1.7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/v2.1.7", + "reference": "v2.1.7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/dom-crawler": "2.1.*" + }, + "require-dev": { + "symfony/css-selector": "2.1.*", + "symfony/process": "2.1.*" + }, + "suggest": { + "symfony/process": "2.1.*" + }, + "time": "2013-01-09 08:51:07", + "type": "library", + "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" + }, + { + "name": "symfony/css-selector", + "version": "2.1.x-dev", + "target-dir": "Symfony/Component/CssSelector", + "source": { + "type": "git", + "url": "https://github.com/symfony/CssSelector", + "reference": "v2.1.7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/CssSelector/zipball/v2.1.7", + "reference": "v2.1.7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2013-01-09 08:51:07", + "type": "library", + "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" + }, + { + "name": "symfony/dom-crawler", + "version": "2.1.x-dev", + "target-dir": "Symfony/Component/DomCrawler", + "source": { + "type": "git", + "url": "https://github.com/symfony/DomCrawler", + "reference": "v2.1.7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/v2.1.7", + "reference": "v2.1.7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/css-selector": "2.1.*" + }, + "suggest": { + "symfony/css-selector": "2.1.*" + }, + "time": "2013-01-09 08:51:07", + "type": "library", + "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" + }, + { + "name": "symfony/yaml", + "version": "2.1.x-dev", + "target-dir": "Symfony/Component/Yaml", + "source": { + "type": "git", + "url": "https://github.com/symfony/Yaml", + "reference": "882b70fb7072e3f1fa95d249fd527a4e3998dc1a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/882b70fb7072e3f1fa95d249fd527a4e3998dc1a", + "reference": "882b70fb7072e3f1fa95d249fd527a4e3998dc1a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2013-01-27 16:12:43", + "type": "library", + "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" + } + ], "aliases": [ ], @@ -618,4 +1185,4 @@ "stability-flags": { "klaussilveira/gitter": 20 } -} \ No newline at end of file +} diff --git a/config.ini-example b/config.ini-example index 70815f7..2604f89 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 ; You can hide repositories from GitList, just copy this for each repository you want to hide ; hidden[] = '/var/www/projects/BetaTest' diff --git a/src/GitList/Application.php b/src/GitList/Application.php index 99e97f8..bfec00a 100644 --- a/src/GitList/Application.php +++ b/src/GitList/Application.php @@ -38,9 +38,10 @@ class Application extends SilexApplication 'twig.options' => array('cache' => $root . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'views'), )); $this->register(new GitServiceProvider(), array( - 'git.client' => $config->get('git', 'client'), - 'git.repos' => $config->get('git', 'repositories'), - 'git.hidden' => $config->get('git', 'hidden') ? $config->get('git', 'hidden') : array(), + 'git.client' => $config->get('git', 'client'), + 'git.repos' => $config->get('git', 'repositories'), + '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', )); $this->register(new ViewUtilServiceProvider()); $this->register(new RepositoryUtilServiceProvider()); diff --git a/src/GitList/Controller/MainController.php b/src/GitList/Controller/MainController.php index 8e76ba4..8352754 100644 --- a/src/GitList/Controller/MainController.php +++ b/src/GitList/Controller/MainController.php @@ -52,6 +52,11 @@ class MainController implements ControllerProviderInterface $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( @@ -63,6 +68,7 @@ class MainController implements ControllerProviderInterface return new Response($html, 200, array('Content-Type' => 'application/rss+xml')); })->assert('repo', $app['util.routing']->getRepositoryRegex()) ->assert('branch', $app['util.routing']->getBranchRegex()) + ->value('branch', null) ->bind('rss'); return $route; diff --git a/src/GitList/Git/Client.php b/src/GitList/Git/Client.php index 94d476a..0034f8f 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 3541b6f..ab5840b 100644 --- a/src/GitList/Git/Repository.php +++ b/src/GitList/Git/Repository.php @@ -24,6 +24,16 @@ class Repository extends BaseRepository return strpos($logs[0], 'commit') === 0; } + /** + * Get the current branch, returning a default value when HEAD is detached. + */ + public function getHead() + { + $client = $this->getClient(); + + return parent::getHead($client->getDefaultBranch()); + } + /** * Show the data from a specific commit * diff --git a/src/GitList/Provider/GitServiceProvider.php b/src/GitList/Provider/GitServiceProvider.php index 5427560..825b1f8 100644 --- a/src/GitList/Provider/GitServiceProvider.php +++ b/src/GitList/Provider/GitServiceProvider.php @@ -19,6 +19,7 @@ class GitServiceProvider implements ServiceProviderInterface $app['git'] = function () use ($app) { $options['path'] = $app['git.client']; $options['hidden'] = $app['git.hidden']; + $options['default_branch'] = $app['git.default_branch']; return new Client($options); }; diff --git a/tests/InterfaceTest.php b/tests/InterfaceTest.php index 6d8c85e..e4c403e 100644 --- a/tests/InterfaceTest.php +++ b/tests/InterfaceTest.php @@ -95,6 +95,16 @@ class InterfaceTest extends WebTestCase $repository->setConfig('user.email', 'luke@rebel.org'); $repository->addAll(); $repository->commit("Initial commit"); + + // Detached HEAD repository fixture + $git->createRepository(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'); } public function createApplication() @@ -126,8 +136,8 @@ class InterfaceTest extends WebTestCase $this->assertEquals('/nested/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()