/**
  * Obtain a refernece to the active upgrade handler
  */
 public static function instance()
 {
     if (!self::$instance) {
         // FIXME auto-generate
         self::$instance = new CRM_Civirules_Upgrader('org.civicoop.civirules', realpath(__DIR__ . '/../../../'));
     }
     return self::$instance;
 }
/**
 * @return CRM_Civirules_Upgrader
 */
function _civirules_civix_upgrader()
{
    if (!file_exists(__DIR__ . '/CRM/Civirules/Upgrader.php')) {
        return NULL;
    } else {
        return CRM_Civirules_Upgrader_Base::instance();
    }
}