From 432955e0ae0b83a3c213be62d1a8cd21e2e89c07 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 9 Feb 2013 22:58:13 +0100 Subject: [PATCH] Fix github url escaping, raw.github.com doesnt like escaped slashes --- src/Composer/Repository/Vcs/GitHubDriver.php | 2 +- tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Repository/Vcs/GitHubDriver.php b/src/Composer/Repository/Vcs/GitHubDriver.php index 1a65bb702..0c418bc08 100755 --- a/src/Composer/Repository/Vcs/GitHubDriver.php +++ b/src/Composer/Repository/Vcs/GitHubDriver.php @@ -128,7 +128,7 @@ class GitHubDriver extends VcsDriver if (!isset($this->infoCache[$identifier])) { 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); } catch (TransportException $e) { if (404 !== $e->getCode()) { diff --git a/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php b/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php index c8122c7da..6adbebeb4 100644 --- a/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php @@ -197,7 +197,7 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase $remoteFilesystem->expects($this->at(1)) ->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.'" }}')); $remoteFilesystem->expects($this->at(2))