2015-05-05 22:04:04 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use GitWrapper\GitWrapper;
|
2015-05-06 14:11:00 +02:00
|
|
|
use Gist\Service\GistService;
|
|
|
|
|
|
|
|
$app['gist_path'] = $app['root_path'].'/data/git';
|
2015-05-05 22:04:04 +02:00
|
|
|
|
2015-05-06 22:24:42 +02:00
|
|
|
$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']);
|
2015-05-06 14:11:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
$app['gist'] = function ($app) {
|
2015-05-06 22:24:42 +02:00
|
|
|
return new GistService($app['gist_path'], $app['git_wrapper'], $app['git_working_copy'], $app['geshi']);
|
2015-05-05 22:04:04 +02:00
|
|
|
};
|