/**
  * Get repository data
  *
  * @param str $name
  * @return Response
  */
 public function show($name)
 {
     $this->factory->toArray(true);
     $repository = $this->factory->fromName($name);
     return Response::json(array('name' => $repository->getName(), 'branch' => $repository->getCurrentBranch(), 'data' => $repository->statistics()));
 }
 public function testGetFullPath()
 {
     $factory = new RepositoryFactory($this->finder, '/var/www/dev');
     $paths = array('/base-path' => '/base-path', 'relative-path' => '/var/www/dev/relative-path', './relative-repo' => '/var/www/dev/./relative-repo');
     foreach ($paths as $path => $expected) {
         $this->assertEquals($expected, $factory->getFullPath($path));
     }
 }