add trailing / and updated diagnose command
parent
4d975c49aa
commit
dc2f201152
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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()
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue