Permalink
Browse files

Update & clean-up code to follow latest `knplabs/github-api` client c…

…hanges
  • Loading branch information...
1 parent 503fb11 commit 9fce5a62ca6765b32a3495fd245e32df0534d19d @stloyd stloyd committed Oct 22, 2012
View
@@ -21,7 +21,7 @@
"knplabs/knp-disqus-bundle": "dev-master",
"knplabs/knp-time-bundle": "dev-master",
"knplabs/knp-zend-cache-bundle": "dev-master",
- "knplabs/github-api": "1.0.*",
+ "knplabs/github-api": "1.1.*",
"avalanche123/imagine-bundle": "dev-master",
"kriswallsmith/buzz": "0.7",
"nelmio/solarium-bundle": "dev-master",
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -35,20 +35,11 @@ public function load(array $configs, ContainerBuilder $container)
$container->setAlias('knp_bundles.imagine', new Alias('knp_bundles.imagine.'.$driver, false));
- // setup GitHub API client settings
- $githubHttpClient = $container->getDefinition('knp_bundles.github_http_client');
- $githubHttpClient->addMethodCall('setOption', array('limit', $config['github_client']['limit']));
-
- $githubClient = $container->getDefinition('knp_bundles.github_client');
- $githubClient->addMethodCall('setHttpClient', array($githubHttpClient));
- $githubClient->addMethodCall(
- 'authenticate',
- array(
- $container->getParameter('knp_bundles.github.client_id'),
- $container->getParameter('knp_bundles.github.client_secret'),
- Client::AUTH_URL_CLIENT_ID
- )
- );
+ if (5000 != $config['github_client']['limit']) {
+ // setup GitHub API client settings
+ $githubClient = $container->getDefinition('knp_bundles.github_client');
+ $githubClient->addMethodCall('setOption', array('api_limit', $config['github_client']['limit']));
+ }
}
private function getConfigTree()
Oops, something went wrong.

0 comments on commit 9fce5a6

Please sign in to comment.