1
0
Fork 0

Fix github url escaping, raw.github.com doesnt like escaped slashes

pull/1546/merge
Jordi Boggiano 2013-02-09 22:58:13 +01:00
parent aa1c09380d
commit 432955e0ae
2 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ class GitHubDriver extends VcsDriver
if (!isset($this->infoCache[$identifier])) { if (!isset($this->infoCache[$identifier])) {
try { try {
$resource = 'https://raw.github.com/'.$this->owner.'/'.$this->repository.'/'.urlencode($identifier).'/composer.json'; $resource = 'https://raw.github.com/'.$this->owner.'/'.$this->repository.'/'.$identifier.'/composer.json';
$composer = $this->getContents($resource); $composer = $this->getContents($resource);
} catch (TransportException $e) { } catch (TransportException $e) {
if (404 !== $e->getCode()) { if (404 !== $e->getCode()) {

View File

@ -197,7 +197,7 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
$remoteFilesystem->expects($this->at(1)) $remoteFilesystem->expects($this->at(1))
->method('getContents') ->method('getContents')
->with($this->equalTo('github.com'), $this->equalTo('https://raw.github.com/composer/packagist/feature%2F3.2-foo/composer.json'), $this->equalTo(false)) ->with($this->equalTo('github.com'), $this->equalTo('https://raw.github.com/composer/packagist/feature/3.2-foo/composer.json'), $this->equalTo(false))
->will($this->returnValue('{"support": {"source": "'.$repoUrl.'" }}')); ->will($this->returnValue('{"support": {"source": "'.$repoUrl.'" }}'));
$remoteFilesystem->expects($this->at(2)) $remoteFilesystem->expects($this->at(2))