function raven_libraries_info in Raven: Sentry Integration 7
Same name and namespace in other branches
- 7.2 raven.module \raven_libraries_info()
- 7.3 raven.module \raven_libraries_info()
Implements hook_libraries_info().
File
- ./
raven.module, line 43 - Allows to track errors to Sentry server.
Code
function raven_libraries_info() {
if (module_exists('xautoload')) {
$libraries['log'] = array(
'name' => 'PSR Log',
'vendor url' => 'https://github.com/php-fig/log',
'download url' => 'https://github.com/php-fig/log/releases',
'xautoload' => function ($adapter) {
$adapter
->composerJson('composer.json');
},
'version' => '1.0.0',
);
$libraries['monolog'] = array(
'name' => 'Monolog',
'vendor url' => 'https://github.com/Seldaek/monolog',
'download url' => 'https://github.com/Seldaek/monolog/releases',
'version arguments' => array(
'file' => 'CHANGELOG.mdown',
'pattern' => '/### ([0-9a-zA-Z._-]+) /',
'lines' => 1,
),
'xautoload' => function ($adapter) {
$adapter
->composerJson('composer.json');
},
'dependencies' => array(
'log',
),
);
$libraries['sentry-php'] = array(
'name' => 'Sentry PHP',
'vendor url' => 'https://github.com/getsentry/sentry-php',
'download url' => 'https://github.com/getsentry/sentry-php/releases',
'version arguments' => array(
'file' => 'lib/Raven/Client.php',
'pattern' => '#const\\s+VERSION\\s*=\\s*\'([0-9a-z._-]+)\';#',
'lines' => 25,
),
'xautoload' => function ($adapter) {
$adapter
->composerJson('composer.json');
},
'dependencies' => array(
'monolog',
),
'path' => 'lib/Raven',
'files' => array(
'php' => array(
'Client.php',
),
),
);
}
else {
drupal_set_message(t('XAutoload module is required.'), 'warning');
}
$libraries['raven-js'] = array(
'name' => 'Raven.js',
'vendor url' => 'https://github.com/getsentry/raven-js',
'download url' => 'https://github.com/getsentry/raven-js/releases',
'version arguments' => array(
'file' => 'dist/raven.min.js',
'pattern' => '#Raven.js\\s*([0-9a-z._-]+)#',
'lines' => 25,
),
'path' => 'dist',
'files' => array(
'js' => array(
'raven.min.js' => array(
'group' => JS_LIBRARY,
'every_page' => TRUE,
),
),
),
);
return $libraries;
}