1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Adds support for gitlab install in subfolder

Since gitlab can be hosted on any url also subdirectories should be
supported. (e.g https://mycompany.com/gitlab).
This supports only http and https protocols since the gitlab api url
is derived from the package repository url. And the ssh protocol doesn't
support folders this way.
This commit is contained in:
Jaapio 2015-11-23 21:53:35 +01:00
parent fbab2bfa17
commit b471440ea0
2 changed files with 11 additions and 1 deletions

View file

@ -217,4 +217,14 @@ JSON;
array('http://example.com/foo/bar', false),
);
}
public function testGitlabSubDirectory()
{
$url = 'https://mycompany.com/gitlab/mygroup/myproject';
$apiUrl = 'https://mycompany.com/gitlab/api/v3/projects/mygroup%2Fmyproject';
$driver = new GitLabDriver(array('url' => $url), $this->io->reveal(), $this->config, $this->process->reveal(), $this->remoteFilesystem->reveal());
$driver->initialize();
$this->assertEquals($apiUrl, $driver->getApiUrl(), 'API URL is derived from the repository URL');
}
}