Fix github url escaping, raw.github.com doesnt like escaped slashes
parent
aa1c09380d
commit
432955e0ae
|
@ -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()) {
|
||||||
|
|
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue