This commit is contained in:
Simon Vieille 2015-05-06 22:24:42 +02:00
commit 809aa35989
9 changed files with 146 additions and 48 deletions

View file

@ -5,11 +5,14 @@ use Gist\Service\GistService;
$app['gist_path'] = $app['root_path'].'/data/git';
$app['git'] = function ($app) {
$wrapper = new GitWrapper('/usr/bin/git');
return $wrapper->init($app['gist_path']);
$app['git_wrapper'] = function ($app) {
return new GitWrapper('/usr/bin/git');
};
$app['git_working_copy'] = function ($app) {
return $app['git_wrapper']->init($app['gist_path']);
};
$app['gist'] = function ($app) {
return new GistService($app['gist_path'], $app['git']);
return new GistService($app['gist_path'], $app['git_wrapper'], $app['git_working_copy'], $app['geshi']);
};