Skip to content

Commit

Permalink
add debugkit
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuzee committed Jul 26, 2015
1 parent d98b606 commit 01ac731
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 80 deletions.
41 changes: 21 additions & 20 deletions app/Config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,18 @@
CakePlugin::load('Search');
CakePlugin::load('BoostCake');
CakePlugin::load('SQS');
CakePlugin::load('DebugKit');

if (isset($_SERVER["AWS_ACCESS_ID"]) && isset($_SERVER['AWS_SECRET_KEY'])) {
$connection = array(
'key' => $_SERVER["AWS_ACCESS_ID"],
'secret' => $_SERVER['AWS_SECRET_KEY'],
'region' => Configure::read('region'),
);
$connection = array(
'key' => $_SERVER["AWS_ACCESS_ID"],
'secret' => $_SERVER['AWS_SECRET_KEY'],
'region' => Configure::read('region'),
);
} else {
$connection = array(
'region' => Configure::read('region'),
);
$connection = array(
'region' => Configure::read('region'),
);
}

Configure::write('SQS', array(
Expand All @@ -116,31 +117,31 @@
* Feel free to remove or add filters as you see fit for your application. A few examples:
*
* Configure::write('Dispatcher.filters', array(
* 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app.
* 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
* array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
* array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
* 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app.
* 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
* array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
* array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
*
* ));
*/
Configure::write('Dispatcher.filters', array(
'AssetDispatcher',
'CacheDispatcher'
'AssetDispatcher',
'CacheDispatcher'
));

/**
* Configures default file logging options
*/
App::uses('CakeLog', 'Log');
CakeLog::config('debug', array(
'engine' => 'File',
'types' => array('notice', 'info', 'debug'),
'file' => 'debug',
'engine' => 'File',
'types' => array('notice', 'info', 'debug'),
'file' => 'debug',
));
CakeLog::config('error', array(
'engine' => 'File',
'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
'file' => 'error',
'engine' => 'File',
'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
'file' => 'error',
));


5 changes: 3 additions & 2 deletions app/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class AppController extends Controller
{
public $helpers = array(
'Session',
'Session',
'Html' => array('className' => 'BoostCake.BoostCakeHtml'),
'Form' => array('className' => 'BoostCake.BoostCakeForm'),
'Paginator' => array('className' => 'BoostCake.BoostCakePaginator'),
Expand All @@ -34,10 +34,11 @@ class AppController extends Controller
'Tags.TagCloud',
);
public $components = array(
'Auth',
'Auth',
'Paginator',
'Session' => array('className' => 'SessionEx'),
'S3',
'DebugKit.Toolbar',
'Search.Prg' => array(
'commonProcess' => array('paramType' => 'named'),
'presetForm' => array('paramType' => 'named'),
Expand Down
8 changes: 0 additions & 8 deletions app/View/Layouts/default.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,6 @@ $cakeDescription = __d('cake_dev', 'OpenSlideshare');
<!-- end contents -->
</div>

<?php if(Configure::read('debug') >= 2): ?>
<div class="container">
<div class="panel panel-default" style="padding:10px;">
<?php echo $this->element('sql_dump'); ?>
</div>
</div>
<?php endif; ?>

<div class="footer">
<div class="container">
<p class="text-muted">
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"cakedc/tags": "~1.6",
"cakedc/search": "*",
"slywalker/boost_cake": "*",
"lorenzo/cakephp-sqs": "dev-master"
"lorenzo/cakephp-sqs": "dev-master",
"cakephp/debug_kit": "2.2.5"
}
}

0 comments on commit 01ac731

Please sign in to comment.