Merge remote-tracking branch 'upstream/master'

Conflicts:
	web/css/style.css
This commit is contained in:
Lukas Domnick
2013-03-30 21:51:05 +01:00
22 changed files with 1093 additions and 243 deletions

View File

@@ -1,14 +1,14 @@
{ {
"require": { "require": {
"silex/silex": "1.0.*", "silex/silex": "1.0.*@dev",
"twig/twig": "1.9.*", "twig/twig": "1.12.*",
"symfony/twig-bridge": "2.1.*", "symfony/twig-bridge": "2.2.*",
"symfony/filesystem": "2.1.*", "symfony/filesystem": "2.2.*",
"klaussilveira/gitter": "dev-master" "klaussilveira/gitter": "0.1.3"
}, },
"require-dev": { "require-dev": {
"symfony/browser-kit": "2.1.*", "symfony/browser-kit": "2.2.*",
"symfony/css-selector": "2.1.*", "symfony/css-selector": "2.2.*",
"phpunit/phpunit": "3.7.*", "phpunit/phpunit": "3.7.*",
"phpmd/phpmd": "1.4.*", "phpmd/phpmd": "1.4.*",
"phploc/phploc": "1.7.*" "phploc/phploc": "1.7.*"

225
composer.lock generated
View File

@@ -1,27 +1,27 @@
{ {
"hash": "23b42eb82a97fc586f9c703879c08ac9", "hash": "4d7bf1d32c612b74b8e7afdb6a9ada2d",
"packages": [ "packages": [
{ {
"name": "klaussilveira/gitter", "name": "klaussilveira/gitter",
"version": "dev-master", "version": "0.1.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/klaussilveira/gitter.git", "url": "https://github.com/klaussilveira/gitter.git",
"reference": "9e30a927d1edf28c3ee844b7d0657c4a9535cd12" "reference": "0.1.3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/klaussilveira/gitter/zipball/9e30a927d1edf28c3ee844b7d0657c4a9535cd12", "url": "https://api.github.com/repos/klaussilveira/gitter/zipball/0.1.3",
"reference": "9e30a927d1edf28c3ee844b7d0657c4a9535cd12", "reference": "0.1.3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.0", "php": ">=5.3.0",
"symfony/process": ">=2.1" "symfony/process": ">=2.2"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": ">=3.7.1", "phpunit/phpunit": ">=3.7.1",
"symfony/filesystem": ">=2.1" "symfony/filesystem": ">=2.2"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -47,7 +47,7 @@
"git", "git",
"vcs" "vcs"
], ],
"time": "2013-02-19 13:59:07" "time": "2013-03-29 01:18:34"
}, },
{ {
"name": "pimple/pimple", "name": "pimple/pimple",
@@ -139,12 +139,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fabpot/Silex.git", "url": "https://github.com/fabpot/Silex.git",
"reference": "59e7dbd338b5caba9879ae11524da4a5905f80c1" "reference": "a5cb55ced63ece76550de1599ddcc60719373594"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fabpot/Silex/zipball/59e7dbd338b5caba9879ae11524da4a5905f80c1", "url": "https://api.github.com/repos/fabpot/Silex/zipball/a5cb55ced63ece76550de1599ddcc60719373594",
"reference": "59e7dbd338b5caba9879ae11524da4a5905f80c1", "reference": "a5cb55ced63ece76550de1599ddcc60719373594",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -212,7 +212,7 @@
"keywords": [ "keywords": [
"microframework" "microframework"
], ],
"time": "2013-03-08 16:56:52" "time": "2013-03-27 09:31:32"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
@@ -270,26 +270,31 @@
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "2.1.x-dev", "version": "2.2.x-dev",
"target-dir": "Symfony/Component/Filesystem", "target-dir": "Symfony/Component/Filesystem",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Filesystem.git", "url": "https://github.com/symfony/Filesystem.git",
"reference": "v2.1.8" "reference": "v2.2.0-RC3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/v2.1.8", "url": "https://api.github.com/repos/symfony/Filesystem/zipball/v2.2.0-RC3",
"reference": "v2.1.8", "reference": "v2.2.0-RC3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": { "autoload": {
"psr-0": { "psr-0": {
"Symfony\\Component\\Filesystem": "" "Symfony\\Component\\Filesystem\\": ""
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -308,7 +313,7 @@
], ],
"description": "Symfony Filesystem Component", "description": "Symfony Filesystem Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-01-09 08:51:07" "time": "2013-01-17 15:25:59"
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
@@ -317,12 +322,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/HttpFoundation.git", "url": "https://github.com/symfony/HttpFoundation.git",
"reference": "d154b0d9a6b5dac26413a314df1846abe197aaef" "reference": "6af424d4fee81987e76bc76aa4e811859ca70bac"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/d154b0d9a6b5dac26413a314df1846abe197aaef", "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/6af424d4fee81987e76bc76aa4e811859ca70bac",
"reference": "d154b0d9a6b5dac26413a314df1846abe197aaef", "reference": "6af424d4fee81987e76bc76aa4e811859ca70bac",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -358,7 +363,7 @@
], ],
"description": "Symfony HttpFoundation Component", "description": "Symfony HttpFoundation Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-03-01 10:42:10" "time": "2013-03-23 07:49:54"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
@@ -367,12 +372,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/HttpKernel.git", "url": "https://github.com/symfony/HttpKernel.git",
"reference": "2a354f11ea59f58024b087c371dd1d4f9246dc86" "reference": "3bfc8fda577fb671b2d9395a59fbc87f449fa61f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/2a354f11ea59f58024b087c371dd1d4f9246dc86", "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/3bfc8fda577fb671b2d9395a59fbc87f449fa61f",
"reference": "2a354f11ea59f58024b087c371dd1d4f9246dc86", "reference": "3bfc8fda577fb671b2d9395a59fbc87f449fa61f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -427,7 +432,7 @@
], ],
"description": "Symfony HttpKernel Component", "description": "Symfony HttpKernel Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-03-11 17:23:12" "time": "2013-03-23 10:43:44"
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
@@ -436,12 +441,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Process.git", "url": "https://github.com/symfony/Process.git",
"reference": "6ebe4ba544cfc0dd25bfe49402da4d5267ee1b43" "reference": "46b24c5905096914d467b769027e36433c7b5421"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Process/zipball/6ebe4ba544cfc0dd25bfe49402da4d5267ee1b43", "url": "https://api.github.com/repos/symfony/Process/zipball/46b24c5905096914d467b769027e36433c7b5421",
"reference": "6ebe4ba544cfc0dd25bfe49402da4d5267ee1b43", "reference": "46b24c5905096914d467b769027e36433c7b5421",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -474,7 +479,7 @@
], ],
"description": "Symfony Process Component", "description": "Symfony Process Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-02-18 21:28:20" "time": "2013-03-23 08:06:49"
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
@@ -483,12 +488,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Routing.git", "url": "https://github.com/symfony/Routing.git",
"reference": "3a97436e581bae44d0eec454a74bbb4f93593e78" "reference": "a8599d5735c5f1f994cfbf91f59851add9c9f627"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Routing/zipball/3a97436e581bae44d0eec454a74bbb4f93593e78", "url": "https://api.github.com/repos/symfony/Routing/zipball/a8599d5735c5f1f994cfbf91f59851add9c9f627",
"reference": "3a97436e581bae44d0eec454a74bbb4f93593e78", "reference": "a8599d5735c5f1f994cfbf91f59851add9c9f627",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -532,47 +537,54 @@
], ],
"description": "Symfony Routing Component", "description": "Symfony Routing Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-03-06 19:31:19" "time": "2013-03-14 09:39:13"
}, },
{ {
"name": "symfony/twig-bridge", "name": "symfony/twig-bridge",
"version": "2.1.x-dev", "version": "2.2.x-dev",
"target-dir": "Symfony/Bridge/Twig", "target-dir": "Symfony/Bridge/Twig",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/TwigBridge.git", "url": "https://github.com/symfony/TwigBridge.git",
"reference": "083b7b93d43315f6d23b049f76527da2d64d92c6" "reference": "50bbc4a10d34a71325b58940c4887726b8a30841"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/TwigBridge/zipball/083b7b93d43315f6d23b049f76527da2d64d92c6", "url": "https://api.github.com/repos/symfony/TwigBridge/zipball/50bbc4a10d34a71325b58940c4887726b8a30841",
"reference": "083b7b93d43315f6d23b049f76527da2d64d92c6", "reference": "50bbc4a10d34a71325b58940c4887726b8a30841",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.3",
"twig/twig": ">=1.9.1,<2.0-dev" "twig/twig": ">=1.11.0,<2.0"
}, },
"require-dev": { "require-dev": {
"symfony/form": "2.1.*", "symfony/form": "2.2.*",
"symfony/routing": "2.1.*", "symfony/http-kernel": ">=2.2,<2.3-dev",
"symfony/security": "2.1.*", "symfony/routing": ">=2.2,<2.3-dev",
"symfony/templating": "2.1.*", "symfony/security": ">=2.0,<2.3-dev",
"symfony/translation": "2.1.*", "symfony/templating": ">=2.1,<3.0",
"symfony/yaml": "2.1.*" "symfony/translation": ">=2.0,<2.3-dev",
"symfony/yaml": ">=2.0,<3.0"
}, },
"suggest": { "suggest": {
"symfony/form": "2.1.*", "symfony/form": "2.2.*",
"symfony/routing": "2.1.*", "symfony/http-kernel": "2.2.*",
"symfony/security": "2.1.*", "symfony/routing": "2.2.*",
"symfony/templating": "2.1.*", "symfony/security": "2.2.*",
"symfony/translation": "2.1.*", "symfony/templating": "2.2.*",
"symfony/yaml": "2.1.*" "symfony/translation": "2.2.*",
"symfony/yaml": "2.2.*"
}, },
"type": "symfony-bridge", "type": "symfony-bridge",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": { "autoload": {
"psr-0": { "psr-0": {
"Symfony\\Bridge\\Twig": "" "Symfony\\Bridge\\Twig\\": ""
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -591,20 +603,20 @@
], ],
"description": "Symfony Twig Bridge", "description": "Symfony Twig Bridge",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-03-12 10:55:49" "time": "2013-03-15 10:14:31"
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v1.9.2", "version": "dev-master",
"source": { "source": {
"type": "git", "type": "git",
"url": "git://github.com/fabpot/Twig.git", "url": "https://github.com/fabpot/Twig.git",
"reference": "v1.9.2" "reference": "e8991cc2f9c84b2b5c782203904898717d46e56a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/fabpot/Twig/zipball/v1.9.2", "url": "https://api.github.com/repos/fabpot/Twig/zipball/e8991cc2f9c84b2b5c782203904898717d46e56a",
"reference": "v1.9.2", "reference": "e8991cc2f9c84b2b5c782203904898717d46e56a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -613,7 +625,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.9-dev" "dev-master": "1.12-dev"
} }
}, },
"autoload": { "autoload": {
@@ -640,7 +652,7 @@
"keywords": [ "keywords": [
"templating" "templating"
], ],
"time": "2012-08-25 10:32:57" "time": "2013-03-25 07:43:31"
} }
], ],
"packages-dev": [ "packages-dev": [
@@ -979,12 +991,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "2c67e52445416bb7c14046b432acd7eb79e4e612" "reference": "3.7.19"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2c67e52445416bb7c14046b432acd7eb79e4e612", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.19",
"reference": "2c67e52445416bb7c14046b432acd7eb79e4e612", "reference": "3.7.19",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -998,7 +1010,7 @@
"phpunit/php-text-template": ">=1.1.1", "phpunit/php-text-template": ">=1.1.1",
"phpunit/php-timer": ">=1.0.2,<1.1.0", "phpunit/php-timer": ">=1.0.2,<1.1.0",
"phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0", "phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0",
"symfony/yaml": ">=2.2.0" "symfony/yaml": ">=2.0.0,<2.3.0"
}, },
"require-dev": { "require-dev": {
"pear-pear/pear": "1.9.4" "pear-pear/pear": "1.9.4"
@@ -1045,7 +1057,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2013-03-11 07:06:05" "time": "2013-03-25 11:45:06"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
@@ -1098,34 +1110,39 @@
}, },
{ {
"name": "symfony/browser-kit", "name": "symfony/browser-kit",
"version": "2.1.x-dev", "version": "2.2.x-dev",
"target-dir": "Symfony/Component/BrowserKit", "target-dir": "Symfony/Component/BrowserKit",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/BrowserKit.git", "url": "https://github.com/symfony/BrowserKit.git",
"reference": "v2.1.8" "reference": "d55e7ffd7f10bead48adb03b208bc67bd53926bb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/v2.1.8", "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/d55e7ffd7f10bead48adb03b208bc67bd53926bb",
"reference": "v2.1.8", "reference": "d55e7ffd7f10bead48adb03b208bc67bd53926bb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.3",
"symfony/dom-crawler": "2.1.*" "symfony/dom-crawler": ">=2.0,<3.0"
}, },
"require-dev": { "require-dev": {
"symfony/css-selector": "2.1.*", "symfony/css-selector": ">=2.0,<3.0",
"symfony/process": "2.1.*" "symfony/process": ">=2.0,<3.0"
}, },
"suggest": { "suggest": {
"symfony/process": "2.1.*" "symfony/process": "2.2.*"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": { "autoload": {
"psr-0": { "psr-0": {
"Symfony\\Component\\BrowserKit": "" "Symfony\\Component\\BrowserKit\\": ""
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -1144,30 +1161,35 @@
], ],
"description": "Symfony BrowserKit Component", "description": "Symfony BrowserKit Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-02-22 06:39:07" "time": "2013-03-15 10:14:31"
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
"version": "2.1.x-dev", "version": "2.2.x-dev",
"target-dir": "Symfony/Component/CssSelector", "target-dir": "Symfony/Component/CssSelector",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/CssSelector.git", "url": "https://github.com/symfony/CssSelector.git",
"reference": "v2.1.8" "reference": "v2.2.0-RC3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/v2.1.8", "url": "https://api.github.com/repos/symfony/CssSelector/zipball/v2.2.0-RC3",
"reference": "v2.1.8", "reference": "v2.2.0-RC3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
}
},
"autoload": { "autoload": {
"psr-0": { "psr-0": {
"Symfony\\Component\\CssSelector": "" "Symfony\\Component\\CssSelector\\": ""
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -1186,36 +1208,41 @@
], ],
"description": "Symfony CssSelector Component", "description": "Symfony CssSelector Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-01-09 08:51:07" "time": "2013-01-17 15:25:59"
}, },
{ {
"name": "symfony/dom-crawler", "name": "symfony/dom-crawler",
"version": "2.1.x-dev", "version": "dev-master",
"target-dir": "Symfony/Component/DomCrawler", "target-dir": "Symfony/Component/DomCrawler",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/DomCrawler.git", "url": "https://github.com/symfony/DomCrawler.git",
"reference": "227204697da76258a3f7f8d91d72568f4c55e31c" "reference": "c9698b3b5b93d18250f627a9001c88fe5bc87908"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/227204697da76258a3f7f8d91d72568f4c55e31c", "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/c9698b3b5b93d18250f627a9001c88fe5bc87908",
"reference": "227204697da76258a3f7f8d91d72568f4c55e31c", "reference": "c9698b3b5b93d18250f627a9001c88fe5bc87908",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"require-dev": { "require-dev": {
"symfony/css-selector": "2.1.*" "symfony/css-selector": ">=2.0,<3.0"
}, },
"suggest": { "suggest": {
"symfony/css-selector": "2.1.*" "symfony/css-selector": "2.2.*"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": { "autoload": {
"psr-0": { "psr-0": {
"Symfony\\Component\\DomCrawler": "" "Symfony\\Component\\DomCrawler\\": ""
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -1234,7 +1261,7 @@
], ],
"description": "Symfony DomCrawler Component", "description": "Symfony DomCrawler Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-03-02 15:23:18" "time": "2013-03-23 07:35:36"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
@@ -1243,12 +1270,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Finder.git", "url": "https://github.com/symfony/Finder.git",
"reference": "69858f868c0caabe3d859c448f98d249541c0489" "reference": "v2.1.9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Finder/zipball/69858f868c0caabe3d859c448f98d249541c0489", "url": "https://api.github.com/repos/symfony/Finder/zipball/v2.1.9",
"reference": "69858f868c0caabe3d859c448f98d249541c0489", "reference": "v2.1.9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1280,17 +1307,17 @@
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "dev-master", "version": "2.2.x-dev",
"target-dir": "Symfony/Component/Yaml", "target-dir": "Symfony/Component/Yaml",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Yaml.git", "url": "https://github.com/symfony/Yaml.git",
"reference": "f198ac28048eeceae852419c076123aaee59cd1c" "reference": "3f6d4ab3fd8226ab4ba0be9fc8a238f4338b79ab"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Yaml/zipball/f198ac28048eeceae852419c076123aaee59cd1c", "url": "https://api.github.com/repos/symfony/Yaml/zipball/3f6d4ab3fd8226ab4ba0be9fc8a238f4338b79ab",
"reference": "f198ac28048eeceae852419c076123aaee59cd1c", "reference": "3f6d4ab3fd8226ab4ba0be9fc8a238f4338b79ab",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1299,7 +1326,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.3-dev" "dev-master": "2.2-dev"
} }
}, },
"autoload": { "autoload": {
@@ -1323,7 +1350,7 @@
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2013-01-31 21:39:01" "time": "2013-03-23 07:49:54"
}, },
{ {
"name": "zetacomponents/base", "name": "zetacomponents/base",
@@ -1460,7 +1487,7 @@
], ],
"minimum-stability": "dev", "minimum-stability": "dev",
"stability-flags": { "stability-flags": {
"klaussilveira/gitter": 20 "silex/silex": 20
}, },
"platform": [ "platform": [

View File

@@ -48,7 +48,7 @@ class Application extends SilexApplication
$this->register(new UrlGeneratorServiceProvider()); $this->register(new UrlGeneratorServiceProvider());
$this->register(new RoutingUtilServiceProvider()); $this->register(new RoutingUtilServiceProvider());
$this['twig'] = $this->share($this->extend('twig', function($twig, $app) { $this['twig'] = $this->share($this->extend('twig', function ($twig, $app) {
$twig->addFilter('htmlentities', new \Twig_Filter_Function('htmlentities')); $twig->addFilter('htmlentities', new \Twig_Filter_Function('htmlentities'));
$twig->addFilter('md5', new \Twig_Filter_Function('md5')); $twig->addFilter('md5', new \Twig_Filter_Function('md5'));

View File

@@ -6,11 +6,13 @@ class Config
{ {
protected $data; protected $data;
public static function fromFile($file) { public static function fromFile($file)
{
if (!file_exists($file)) { if (!file_exists($file)) {
die(sprintf('Please, create the %1$s file.', $file)); die(sprintf('Please, create the %1$s file.', $file));
} }
$data = parse_ini_file($file, true); $data = parse_ini_file($file, true);
return new static($data); return new static($data);
} }

View File

@@ -12,11 +12,11 @@ class BlobController implements ControllerProviderInterface
{ {
$route = $app['controllers_factory']; $route = $app['controllers_factory'];
$route->get('{repo}/blob/{commitish_path}', function($repo, $commitish_path) use ($app) { $route->get('{repo}/blob/{commitishPath}', function ($repo, $commitishPath) use ($app) {
$repository = $app['git']->getRepository($app['git.repos'] . $repo); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
list($branch, $file) = $app['util.routing'] list($branch, $file) = $app['util.routing']
->parseCommitishPathParam($commitish_path, $repo); ->parseCommitishPathParam($commitishPath, $repo);
list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file); list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file);
@@ -43,14 +43,14 @@ class BlobController implements ControllerProviderInterface
'tags' => $repository->getTags(), 'tags' => $repository->getTags(),
)); ));
})->assert('repo', $app['util.routing']->getRepositoryRegex()) })->assert('repo', $app['util.routing']->getRepositoryRegex())
->assert('commitish_path', '.+') ->assert('commitishPath', '.+')
->bind('blob'); ->bind('blob');
$route->get('{repo}/raw/{commitish_path}', function($repo, $commitish_path) use ($app) { $route->get('{repo}/raw/{commitishPath}', function ($repo, $commitishPath) use ($app) {
$repository = $app['git']->getRepository($app['git.repos'] . $repo); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
list($branch, $file) = $app['util.routing'] list($branch, $file) = $app['util.routing']
->parseCommitishPathParam($commitish_path, $repo); ->parseCommitishPathParam($commitishPath, $repo);
list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file); list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file);
@@ -67,7 +67,7 @@ class BlobController implements ControllerProviderInterface
return new Response($blob, 200, $headers); return new Response($blob, 200, $headers);
})->assert('repo', $app['util.routing']->getRepositoryRegex()) })->assert('repo', $app['util.routing']->getRepositoryRegex())
->assert('commitish_path', $app['util.routing']->getCommitishPathRegex()) ->assert('commitishPath', $app['util.routing']->getCommitishPathRegex())
->bind('blob_raw'); ->bind('blob_raw');
return $route; return $route;

View File

@@ -12,15 +12,15 @@ class CommitController implements ControllerProviderInterface
{ {
$route = $app['controllers_factory']; $route = $app['controllers_factory'];
$route->get('{repo}/commits/{commitish_path}', function($repo, $commitish_path) use ($app) { $route->get('{repo}/commits/{commitishPath}', function ($repo, $commitishPath) use ($app) {
$repository = $app['git']->getRepository($app['git.repos'] . $repo); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
if ($commitish_path === null) { if ($commitishPath === null) {
$commitish_path = $repository->getHead(); $commitishPath = $repository->getHead();
} }
list($branch, $file) = $app['util.routing'] list($branch, $file) = $app['util.routing']
->parseCommitishPathParam($commitish_path, $repo); ->parseCommitishPathParam($commitishPath, $repo);
list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file); list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file);
@@ -48,11 +48,11 @@ class CommitController implements ControllerProviderInterface
'file' => $file, 'file' => $file,
)); ));
})->assert('repo', $app['util.routing']->getRepositoryRegex()) })->assert('repo', $app['util.routing']->getRepositoryRegex())
->assert('commitish_path', $app['util.routing']->getCommitishPathRegex()) ->assert('commitishPath', $app['util.routing']->getCommitishPathRegex())
->value('commitish_path', null) ->value('commitishPath', null)
->bind('commits'); ->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); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
$query = $request->get('query'); $query = $request->get('query');
$commits = $repository->searchCommitLog($query); $commits = $repository->searchCommitLog($query);
@@ -77,7 +77,7 @@ class CommitController implements ControllerProviderInterface
->assert('branch', $app['util.routing']->getBranchRegex()) ->assert('branch', $app['util.routing']->getBranchRegex())
->bind('searchcommits'); ->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); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
$commit = $repository->getCommit($commit); $commit = $repository->getCommit($commit);
$branch = $repository->getHead(); $branch = $repository->getHead();
@@ -91,11 +91,11 @@ class CommitController implements ControllerProviderInterface
->assert('commit', '[a-f0-9^]+') ->assert('commit', '[a-f0-9^]+')
->bind('commit'); ->bind('commit');
$route->get('{repo}/blame/{commitish_path}', function($repo, $commitish_path) use ($app) { $route->get('{repo}/blame/{commitishPath}', function ($repo, $commitishPath) use ($app) {
$repository = $app['git']->getRepository($app['git.repos'] . $repo); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
list($branch, $file) = $app['util.routing'] list($branch, $file) = $app['util.routing']
->parseCommitishPathParam($commitish_path, $repo); ->parseCommitishPathParam($commitishPath, $repo);
list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file); list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file);
@@ -110,7 +110,7 @@ class CommitController implements ControllerProviderInterface
'blames' => $blames, 'blames' => $blames,
)); ));
})->assert('repo', $app['util.routing']->getRepositoryRegex()) })->assert('repo', $app['util.routing']->getRepositoryRegex())
->assert('commitish_path', $app['util.routing']->getCommitishPathRegex()) ->assert('commitishPath', $app['util.routing']->getCommitishPathRegex())
->bind('blame'); ->bind('blame');
return $route; return $route;

View File

@@ -12,7 +12,7 @@ class MainController implements ControllerProviderInterface
{ {
$route = $app['controllers_factory']; $route = $app['controllers_factory'];
$route->get('/', function() use ($app) { $route->get('/', function () use ($app) {
$repositories = array_map( $repositories = array_map(
function ($repo) use ($app) { function ($repo) use ($app) {
$repo['relativePath'] = $app['util.routing']->getRelativePath($repo['path']); $repo['relativePath'] = $app['util.routing']->getRelativePath($repo['path']);
@@ -29,7 +29,7 @@ class MainController implements ControllerProviderInterface
)); ));
})->bind('homepage'); })->bind('homepage');
$route->get('{repo}/stats/{branch}', function($repo, $branch) use ($app) { $route->get('{repo}/stats/{branch}', function ($repo, $branch) use ($app) {
$repository = $app['git']->getRepository($app['git.repos'] . $repo); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
if ($branch === null) { if ($branch === null) {
$branch = $repository->getHead(); $branch = $repository->getHead();
@@ -50,7 +50,7 @@ class MainController implements ControllerProviderInterface
->value('branch', null) ->value('branch', null)
->bind('stats'); ->bind('stats');
$route->get('{repo}/{branch}/rss/', function($repo, $branch) use ($app) { $route->get('{repo}/{branch}/rss/', function ($repo, $branch) use ($app) {
$repository = $app['git']->getRepository($app['git.repos'] . $repo); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
if ($branch === null) { if ($branch === null) {

View File

@@ -13,13 +13,13 @@ class TreeController implements ControllerProviderInterface
{ {
$route = $app['controllers_factory']; $route = $app['controllers_factory'];
$route->get('{repo}/tree/{commitish_path}/', $treeController = function($repo, $commitish_path = '') use ($app) { $route->get('{repo}/tree/{commitishPath}/', $treeController = function ($repo, $commitishPath = '') use ($app) {
$repository = $app['git']->getRepository($app['git.repos'] . $repo); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
if (!$commitish_path) { if (!$commitishPath) {
$commitish_path = $repository->getHead(); $commitishPath = $repository->getHead();
} }
list($branch, $tree) = $app['util.routing']->parseCommitishPathParam($commitish_path, $repo); list($branch, $tree) = $app['util.routing']->parseCommitishPathParam($commitishPath, $repo);
list($branch, $tree) = $app['util.repository']->extractRef($repository, $branch, $tree); list($branch, $tree) = $app['util.repository']->extractRef($repository, $branch, $tree);
$files = $repository->getTree($tree ? "$branch:\"$tree\"/" : $branch); $files = $repository->getTree($tree ? "$branch:\"$tree\"/" : $branch);
@@ -44,10 +44,10 @@ class TreeController implements ControllerProviderInterface
'readme' => $app['util.repository']->getReadme($repo, $branch), 'readme' => $app['util.repository']->getReadme($repo, $branch),
)); ));
})->assert('repo', $app['util.routing']->getRepositoryRegex()) })->assert('repo', $app['util.routing']->getRepositoryRegex())
->assert('commitish_path', $app['util.routing']->getCommitishPathRegex()) ->assert('commitishPath', $app['util.routing']->getCommitishPathRegex())
->bind('tree'); ->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); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
if (!$branch) { if (!$branch) {
@@ -68,21 +68,21 @@ class TreeController implements ControllerProviderInterface
'tags' => $repository->getTags(), 'tags' => $repository->getTags(),
)); ));
})->assert('repo', $app['util.routing']->getRepositoryRegex()) })->assert('repo', $app['util.routing']->getRepositoryRegex())
->assert('branch', '[\w-._\/]+') ->assert('branch', $app['util.routing']->getBranchRegex())
->bind('search'); ->bind('search');
$route->get('{repo}/{branch}/', function($repo, $branch) use ($app, $treeController) { $route->get('{repo}/{branch}/', function ($repo, $branch) use ($app, $treeController) {
return $treeController($repo, $branch); return $treeController($repo, $branch);
})->assert('repo', $app['util.routing']->getRepositoryRegex()) })->assert('repo', $app['util.routing']->getRepositoryRegex())
->assert('branch', '[\w-._\/]+') ->assert('branch', $app['util.routing']->getBranchRegex())
->bind('branch'); ->bind('branch');
$route->get('{repo}/', function($repo) use ($app, $treeController) { $route->get('{repo}/', function ($repo) use ($app, $treeController) {
return $treeController($repo); return $treeController($repo);
})->assert('repo', $app['util.routing']->getRepositoryRegex()) })->assert('repo', $app['util.routing']->getRepositoryRegex())
->bind('repository'); ->bind('repository');
$route->get('{repo}/{format}ball/{branch}', function($repo, $format, $branch) use ($app) { $route->get('{repo}/{format}ball/{branch}', function ($repo, $format, $branch) use ($app) {
$repository = $app['git']->getRepository($app['git.repos'] . $repo); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
$tree = $repository->getBranchTree($branch); $tree = $repository->getBranchTree($branch);
@@ -111,7 +111,7 @@ class TreeController implements ControllerProviderInterface
)); ));
})->assert('format', '(zip|tar)') })->assert('format', '(zip|tar)')
->assert('repo', $app['util.routing']->getRepositoryRegex()) ->assert('repo', $app['util.routing']->getRepositoryRegex())
->assert('branch', '[\w-._\/]+') ->assert('branch', $app['util.routing']->getBranchRegex())
->bind('archive'); ->bind('archive');
return $route; return $route;

View File

@@ -11,7 +11,7 @@ use Symfony\Component\Filesystem\Filesystem;
class Repository extends BaseRepository class Repository extends BaseRepository
{ {
/** /**
* Return TRUE if the repo contains this commit. * Return true if the repo contains this commit.
* *
* @param $commitHash Hash of commit whose existence we want to check * @param $commitHash Hash of commit whose existence we want to check
* @return boolean Whether or not the commit exists in this repo * @return boolean Whether or not the commit exists in this repo
@@ -27,7 +27,7 @@ class Repository extends BaseRepository
/** /**
* Get the current branch, returning a default value when HEAD is detached. * Get the current branch, returning a default value when HEAD is detached.
*/ */
public function getHead() public function getHead($default = null)
{ {
$client = $this->getClient(); $client = $this->getClient();
@@ -42,12 +42,16 @@ class Repository extends BaseRepository
*/ */
public function getCommit($commitHash) public function getCommit($commitHash)
{ {
$logs = $this->getClient()->run($this, "show --pretty=format:\"<item><hash>%H</hash><short_hash>%h</short_hash><tree>%T</tree><parents>%P</parents><author>%an</author><author_email>%ae</author_email><date>%at</date><commiter>%cn</commiter><commiter_email>%ce</commiter_email><commiter_date>%ct</commiter_date><message><![CDATA[%s]]></message></item>\" $commitHash"); $logs = $this->getClient()->run($this, "show --pretty=format:\"<item><hash>%H</hash><short_hash>%h</short_hash><tree>%T</tree><parents>%P</parents><author>%an</author><author_email>%ae</author_email><date>%at</date><commiter>%cn</commiter><commiter_email>%ce</commiter_email><commiter_date>%ct</commiter_date><message><![CDATA[%s]]></message><body><![CDATA[%b]]></body></item>\" $commitHash");
$logs = explode("\n", $logs); $xmlEnd = strpos($logs, '</item>') + 7;
$commitInfo = substr($logs, 0, $xmlEnd);
$commitData = substr($logs, $xmlEnd);
$logs = explode("\n", $commitData);
array_shift($logs);
// Read commit metadata // Read commit metadata
$format = new PrettyFormat; $format = new PrettyFormat;
$data = $format->parse($logs[0]); $data = $format->parse($commitInfo);
$commit = new Commit; $commit = new Commit;
$commit->importData($data[0]); $commit->importData($data[0]);
@@ -313,8 +317,12 @@ class Repository extends BaseRepository
$data['size'] += $file[3]; $data['size'] += $file[3];
} }
if (($pos = strrpos($file[4], '.')) !== FALSE) { 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;
}
} }
} }
@@ -339,7 +347,7 @@ class Repository extends BaseRepository
} }
/** /**
* Return TRUE if $path exists in $branch; return FALSE otherwise. * Return true if $path exists in $branch; return false otherwise.
* *
* @param string $commitish Commitish reference; branch, tag, SHA1, etc. * @param string $commitish Commitish reference; branch, tag, SHA1, etc.
* @param string $path Path whose existence we want to verify. * @param string $path Path whose existence we want to verify.
@@ -347,13 +355,14 @@ class Repository extends BaseRepository
* GRIPE Arguably belongs in Gitter, as it's generally useful functionality. * GRIPE Arguably belongs in Gitter, as it's generally useful functionality.
* Also, this really may not be the best way to do this. * Also, this really may not be the best way to do this.
*/ */
public function pathExists($commitish, $path) { public function pathExists($commitish, $path)
$output = $this->getClient()->run($this, "ls-tree $commitish $path"); {
$output = $this->getClient()->run($this, "ls-tree $commitish '$path'");
if (strlen($output) > 0) { if (strlen($output) > 0) {
return TRUE; return true;
} }
return FALSE; return false;
} }
} }

View File

@@ -189,7 +189,7 @@ class Repository
* @param string $tree * @param string $tree
* @return array * @return array
*/ */
public function extractRef($repository, $branch='', $tree='') public function extractRef($repository, $branch = '', $tree = '')
{ {
$branch = trim($branch, '/'); $branch = trim($branch, '/');
$tree = trim($tree, '/'); $tree = trim($tree, '/');
@@ -219,5 +219,4 @@ class Repository
return array($branch, $tree); return array($branch, $tree);
} }
} }

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace Gitlist\Util; namespace GitList\Util;
use Silex\Application; use Silex\Application;
@@ -13,26 +13,27 @@ class Routing
$this->app = $app; $this->app = $app;
} }
/* @brief Return $commitish, $path parsed from $commitish_path, based on /* @brief Return $commitish, $path parsed from $commitishPath, based on
* what's in $repo. Raise a 404 if $branchpath does not represent a * what's in $repo. Raise a 404 if $branchpath does not represent a
* valid branch and path. * valid branch and path.
* *
* A helper for parsing routes that use commit-ish names and paths * A helper for parsing routes that use commit-ish names and paths
* separated by /, since route regexes are not enough to get that right. * separated by /, since route regexes are not enough to get that right.
*/ */
public function parseCommitishPathParam($commitish_path, $repo) { public function parseCommitishPathParam($commitishPath, $repo)
{
$app = $this->app; $app = $this->app;
$repository = $app['git']->getRepository($app['git.repos'] . $repo); $repository = $app['git']->getRepository($app['git.repos'] . $repo);
$commitish = null; $commitish = null;
$path = null; $path = null;
$slash_pos = strpos($commitish_path, '/'); $slashPosition = strpos($commitishPath, '/');
if (strlen($commitish_path) >= 40 && if (strlen($commitishPath) >= 40 &&
($slash_pos === FALSE || ($slashPosition === false ||
$slash_pos === 40)) { $slashPosition === 40)) {
// We may have a commit hash as our commitish. // We may have a commit hash as our commitish.
$hash = substr($commitish_path, 0, 40); $hash = substr($commitishPath, 0, 40);
if ($repository->hasCommit($hash)) { if ($repository->hasCommit($hash)) {
$commitish = $hash; $commitish = $hash;
} }
@@ -48,56 +49,57 @@ class Routing
$branches = array_merge($branches, $tags); $branches = array_merge($branches, $tags);
} }
$matched_branch = null; $matchedBranch = null;
$matched_branch_name_len = 0; $matchedBranchLength = 0;
foreach ($branches as $branch) { foreach ($branches as $branch) {
if (strpos($commitish_path, $branch) === 0 && if (strpos($commitishPath, $branch) === 0 &&
strlen($branch) > $matched_branch_name_len) { strlen($branch) > $matchedBranchLength) {
$matched_branch = $branch; $matchedBranch = $branch;
$matched_branch_name_len = strlen($matched_branch); $matchedBranchLength = strlen($matchedBranch);
} }
} }
$commitish = $matched_branch; $commitish = $matchedBranch;
} }
if ($commitish === null) { if ($commitish === null) {
$app->abort(404, "'$branch_path' does not appear to contain a " . $app->abort(404, "'$branch_path' does not appear to contain a commit-ish for '$repo'.");
"commit-ish for '$repo.'");
} }
$commitish_len = strlen($commitish); $commitishLength = strlen($commitish);
$path = substr($commitish_path, $commitish_len); $path = substr($commitishPath, $commitishLength);
if (strpos($path, '/') === 0) { if (strpos($path, '/') === 0) {
$path = substr($path, 1); $path = substr($path, 1);
} }
$commit_has_path = $repository->pathExists($commitish, $path); $commitHasPath = $repository->pathExists($commitish, $path);
if ($commit_has_path !== TRUE) { if ($commitHasPath !== true) {
$app->abort(404, "\"$path\" does not exist in \"$commitish\"."); $app->abort(404, "\"$path\" does not exist in \"$commitish\".");
} }
return array($commitish, $path); return array($commitish, $path);
} }
public function getBranchRegex() { public function getBranchRegex()
static $branch_regex = null; {
static $branchRegex = null;
if ($branch_regex === null) { if ($branchRegex === null) {
$branch_regex = '[\w-._\/]+'; $branchRegex = '(?!/|.*([/.]\.|//|@\{|\\\\))[^\040\177 ~^:?*\[]+(?<!\.lock|[/.])';
} }
return $branch_regex; return $branchRegex;
} }
public function getCommitishPathRegex() { public function getCommitishPathRegex()
static $commitish_path_regex = null; {
static $commitishPathRegex = null;
if ($commitish_path_regex === null) { if ($commitishPathRegex === null) {
$commitish_path_regex = '.+'; $commitishPathRegex = '.+';
} }
return $commitish_path_regex; return $commitishPathRegex;
} }
public function getRepositoryRegex() public function getRepositoryRegex()
@@ -112,7 +114,14 @@ class Routing
}, },
$this->app['git']->getRepositories($this->app['git.repos']) $this->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); $regex = implode('|', $quotedPaths);
} }
@@ -129,6 +138,7 @@ class Routing
{ {
if (strpos($repoPath, $this->app['git.repos']) === 0) { if (strpos($repoPath, $this->app['git.repos']) === 0) {
$relativePath = substr($repoPath, strlen($this->app['git.repos'])); $relativePath = substr($repoPath, strlen($this->app['git.repos']));
return ltrim(strtr($relativePath, '\\', '/'), '/'); return ltrim(strtr($relativePath, '\\', '/'), '/');
} else { } else {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(

View File

@@ -148,8 +148,8 @@ class InterfaceTest extends WebTestCase
$this->assertTrue($client->getResponse()->isOk()); $this->assertTrue($client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('.tree tr:contains("README.md")')); $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('.tree tr:contains("test.php")'));
$this->assertCount(1, $crawler->filter('.readme-header:contains("README.md")')); $this->assertCount(1, $crawler->filter('.md-header:contains("README.md")'));
$this->assertEquals("## GitTest\nGitTest is a *test* repository!", $crawler->filter('#readme-content')->eq(0)->text()); $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/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('/GitTest/blob/master/test.php', $crawler->filter('.tree tr td')->eq(3)->filter('a')->eq(0)->attr('href'));
@@ -166,7 +166,7 @@ class InterfaceTest extends WebTestCase
$this->assertEquals('/foobar/tree/master/myfolder/', $crawler->filter('.tree tr td')->eq(0)->filter('a')->eq(0)->attr('href')); $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/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->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->assertCount(0, $crawler->filter('.md-header'));
$this->assertEquals('master', $crawler->filter('.dropdown-menu li')->eq(1)->text()); $this->assertEquals('master', $crawler->filter('.dropdown-menu li')->eq(1)->text());
} }

View File

@@ -2,7 +2,7 @@
<li><a href="{{ path('repository', {repo: repo}) }}">{{ repo }}</a></li> <li><a href="{{ path('repository', {repo: repo}) }}">{{ repo }}</a></li>
{% for breadcrumb in breadcrumbs %} {% for breadcrumb in breadcrumbs %}
<span class="divider">/</span> <span class="divider">/</span>
<li{% if loop.last %} class="active"{% endif %}>{% if not loop.last %}<a href="{{ path('tree', {repo: repo, commitish_path: branch ~ '/' ~ breadcrumb.path}) }}">{{ breadcrumb.dir }}</a>{% endif %}{% if loop.last %}{{ breadcrumb.dir }}{% endif %}</li> <li{% if loop.last %} class="active"{% endif %}>{% if not loop.last %}<a href="{{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ breadcrumb.path}) }}">{{ breadcrumb.dir }}</a>{% endif %}{% if loop.last %}{{ breadcrumb.dir }}{% endif %}</li>
{% endfor %} {% endfor %}
{% block extra %}{% endblock %} {% block extra %}{% endblock %}

View File

@@ -13,6 +13,9 @@
<h4>{{ commit.message }}</h4> <h4>{{ commit.message }}</h4>
</div> </div>
<div class="commit-body"> <div class="commit-body">
{% if commit.body is not empty %}
<p>{{ commit.body | nl2br }}</p>
{% endif %}
<img src="https://gravatar.com/avatar/{{ commit.author.email | lower | md5 }}?s=32" class="pull-left space-right" /> <img src="https://gravatar.com/avatar/{{ commit.author.email | lower | md5 }}?s=32" class="pull-left space-right" />
<span><a href="mailto:{{ commit.author.email }}">{{ commit.author.name }}</a> authored on {{ commit.date | date('d/m/Y \\a\\t H:i:s') }}<br />Showing {{ commit.changedFiles }} changed files</span> <span><a href="mailto:{{ commit.author.email }}">{{ commit.author.name }}</a> authored on {{ commit.date | date('d/m/Y \\a\\t H:i:s') }}<br />Showing {{ commit.changedFiles }} changed files</span>
</div> </div>
@@ -30,8 +33,8 @@
<div class="meta"><a name="{{ loop.index }}">{{ diff.file }}</div> <div class="meta"><a name="{{ loop.index }}">{{ diff.file }}</div>
<div class="btn-group pull-right"> <div class="btn-group pull-right">
<a href="{{ path('commits', {repo: repo, commitish_path: commit.hash ~ '/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a> <a href="{{ path('commits', {repo: repo, commitishPath: commit.hash ~ '/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a>
<a href="{{ path('blob', {repo: repo, commitish_path: commit.hash ~'/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-file"></i> View file @ {{ commit.shortHash }}</a> <a href="{{ path('blob', {repo: repo, commitishPath: commit.hash ~'/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-file"></i> View file @ {{ commit.shortHash }}</a>
</div> </div>
</div> </div>

View File

@@ -12,16 +12,16 @@
<div class="meta"></div> <div class="meta"></div>
<div class="btn-group pull-right"> <div class="btn-group pull-right">
<a href="{{ path('blob_raw', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-file"></i> Raw</a> <a href="{{ path('blob_raw', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-file"></i> Raw</a>
<a href="{{ path('blame', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-bullhorn"></i> Blame</a> <a href="{{ path('blame', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-bullhorn"></i> Blame</a>
<a href="{{ path('commits', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a> <a href="{{ path('commits', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a>
</div> </div>
</div> </div>
{% if fileType == 'image' %} {% if fileType == 'image' %}
<center><img src="{{ path('blob_raw', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" alt="{{ file }}" class="image-blob" /></center> <center><img src="{{ path('blob_raw', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" alt="{{ file }}" class="image-blob" /></center>
{% elseif fileType == 'markdown' %} {% elseif fileType == 'markdown' %}
<div class="readme-view"><div id="readme-content">{{ blob }}</div></div> <div class="md-view"><div id="md-content">{{ blob }}</div></div>
{% else %} {% else %}
<pre id="sourcecode" language="{{ fileType }}">{{ blob|htmlentities|raw }}</pre> <pre id="sourcecode" language="{{ fileType }}">{{ blob|htmlentities|raw }}</pre>

View File

@@ -4,6 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>{% block title %}Welcome!{% endblock %}</title> <title>{% block title %}Welcome!{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{{ app.request.basepath }}/web/css/style.css"> <link rel="stylesheet" type="text/css" href="{{ app.request.basepath }}/web/css/style.css">
<link rel="shortcut icon" type="image/png" href="{{ app.request.basepath }}/web/img/favicon.png" />
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="{{ app.request.basepath }}/web/js/html5.js"></script> <script src="{{ app.request.basepath }}/web/js/html5.js"></script>
<![endif]--> <![endif]-->

View File

@@ -1,6 +1,6 @@
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li{% if page == 'files' %} class="active"{% endif %}><a href="{{ path('branch', {repo: repo, branch: branch}) }}">Files</a></li> <li{% if page == 'files' %} class="active"{% endif %}><a href="{{ path('branch', {repo: repo, branch: branch}) }}">Files</a></li>
<li{% if page in ['commits', 'searchcommits'] %} class="active"{% endif %}><a href="{{ path('commits', {repo: repo, commitish_path: branch}) }}">Commits</a></li> <li{% if page in ['commits', 'searchcommits'] %} class="active"{% endif %}><a href="{{ path('commits', {repo: repo, commitishPath: branch}) }}">Commits</a></li>
<li{% if page == 'stats' %} class="active"{% endif %}><a href="{{ path('stats', {repo: repo, branch: branch}) }}">Stats</a></li> <li{% if page == 'stats' %} class="active"{% endif %}><a href="{{ path('stats', {repo: repo, branch: branch}) }}">Stats</a></li>
<li{% if page == 'network' %} class="active"{% endif %}><a href="{{ path('network', {repo: repo, branch: branch}) }}">Network</a></li> <li{% if page == 'network' %} class="active"{% endif %}><a href="{{ path('network', {repo: repo, branch: branch}) }}">Network</a></li>
</ul> </ul>

View File

@@ -32,7 +32,7 @@
{% if not parent %} {% if not parent %}
<a href="{{ path('branch', {repo: repo, branch: branch}) }}">..</a> <a href="{{ path('branch', {repo: repo, branch: branch}) }}">..</a>
{% else %} {% else %}
<a href="{{ path('tree', {repo: repo, commitish_path: branch ~ '/' ~ parent}) }}">..</a> <a href="{{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ parent}) }}">..</a>
{% endif %} {% endif %}
</td> </td>
<td></td> <td></td>
@@ -43,9 +43,9 @@
<tr> <tr>
<td><i class="{{ file.type == "folder" or file.type == "symlink" ? "icon-folder-open" : "icon-file" }} icon-spaced"></i> <a href=" <td><i class="{{ file.type == "folder" or file.type == "symlink" ? "icon-folder-open" : "icon-file" }} icon-spaced"></i> <a href="
{%- if file.type == "folder" or file.type == "symlink" -%} {%- if file.type == "folder" or file.type == "symlink" -%}
{{ path('tree', {repo: repo, commitish_path: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }} {{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }}
{%- else -%} {%- else -%}
{{ path('blob', {repo: repo, commitish_path: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }} {{ path('blob', {repo: repo, commitishPath: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }}
{%- endif -%} {%- endif -%}
">{{ file.name }}</a></td> ">{{ file.name }}</a></td>
<td>{{ file.mode }}</td> <td>{{ file.mode }}</td>
@@ -56,10 +56,10 @@
</table> </table>
{% if readme is defined and readme is not empty %} {% if readme is defined and readme is not empty %}
<div class="readme-view"> <div class="readme-view">
<div class="readme-header"> <div class="md-header">
<div class="meta">{{ readme.filename }}</div> <div class="meta">{{ readme.filename }}</div>
</div> </div>
<div id="readme-content">{{ readme.content }}</div> <div id="md-content">{{ readme.content }}</div>
</div> </div>
{% endif %} {% endif %}

File diff suppressed because one or more lines are too long

BIN
web/img/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

View File

@@ -20,22 +20,23 @@ $(function () {
}); });
} }
if ($('#readme-content').length) { if ($('#md-content').length) {
var converter = new Showdown.converter(); var converter = new Showdown.converter();
$('#readme-content').html(converter.makeHtml($('#readme-content').text())); $('#md-content').html(converter.makeHtml($('#md-content').text()));
} }
function paginate() { function paginate() {
var $pager = $('.pager'); var $pager = $('.pager');
$pager.find('.next a').one('click', function (e) { $pager.find('.next a').one('click', function (e) {
e.preventDefault(); e.preventDefault();
$(this).css('pointer-events', 'none');
$.get(this.href, function (html) { $.get(this.href, function (html) {
$pager.after(html); $pager.after(html);
$pager.remove(); $pager.remove();
paginate(); paginate();
}); });
}); });
$pager.find('.previous').remove(); $pager.find('.previous').remove();
} }
paginate(); paginate();

View File

@@ -161,11 +161,15 @@
} }
.readme-view { .readme-view {
border: 1px solid @treeHeaderBorder;
}
.md-view {
width: 100%; width: 100%;
margin-bottom: @baseLineHeight; margin-bottom: @baseLineHeight;
border: 1px solid @treeHeaderBorder; }
.readme-header { .md-header {
padding: 8px; padding: 8px;
line-height: @baseLineHeight; line-height: @baseLineHeight;
text-align: left; text-align: left;
@@ -181,10 +185,9 @@
padding: 4px 0; padding: 4px 0;
font-size: 14px; font-size: 14px;
} }
} }
#readme-content { #md-content {
padding: 30px; padding: 30px;
color: @black; color: @black;
}
} }