1
0
Fork 0

add trailing / and updated diagnose command

pull/4958/head
Rob Bast 2016-02-24 20:54:01 +01:00
parent 4d975c49aa
commit dc2f201152
4 changed files with 4 additions and 4 deletions

View File

@ -286,7 +286,7 @@ EOT
{
$this->getIO()->setAuthentication($domain, $token, 'x-oauth-basic');
try {
$url = $domain === 'github.com' ? 'https://api.'.$domain.'/user/repos' : 'https://'.$domain.'/api/v3/user/repos';
$url = $domain === 'github.com' ? 'https://api.'.$domain.'/' : 'https://'.$domain.'/api/v3/';
return $this->rfs->getContents($domain, $url, false, array(
'retry-auth-failure' => false,

View File

@ -102,7 +102,7 @@ class GitHub
$this->io->setAuthentication($originUrl, $token, 'x-oauth-basic');
try {
$apiUrl = ('github.com' === $originUrl) ? 'api.github.com' : $originUrl . '/api/v3';
$apiUrl = ('github.com' === $originUrl) ? 'api.github.com/' : $originUrl . '/api/v3/';
$this->remoteFilesystem->getContents($originUrl, 'https://'. $apiUrl, false, array(
'retry-auth-failure' => false,

View File

@ -78,7 +78,7 @@ class GitHubDriverTest extends TestCase
$remoteFilesystem->expects($this->at(1))
->method('getContents')
->with($this->equalTo('github.com'), $this->equalTo('https://api.github.com'), $this->equalTo(false))
->with($this->equalTo('github.com'), $this->equalTo('https://api.github.com/'), $this->equalTo(false))
->will($this->returnValue('{}'));
$remoteFilesystem->expects($this->at(2))

View File

@ -50,7 +50,7 @@ class GitHubTest extends \PHPUnit_Framework_TestCase
->method('getContents')
->with(
$this->equalTo($this->origin),
$this->equalTo(sprintf('https://api.%s', $this->origin)),
$this->equalTo(sprintf('https://api.%s/', $this->origin)),
$this->isFalse(),
$this->anything()
)