automatic mapping setup for elasticsearch through setupcheck
[phorkie.git] / src / phorkie / SetupCheck.php
index 2c0dd801f0588c0a0deca5e2111c2013c67ba4ee..0bb632fce6ddc8b702443b02e93ef667251080e3 100644 (file)
@@ -4,9 +4,10 @@ namespace phorkie;
 class SetupCheck
 {
     protected $deps = array(
-        'pear.php.net/VersionControl_Git' => 'VersionControl_Git',
-        'pear.twig-project.org/Twig'      => 'Twig_Autoloader',
-        'pear.php.net/Date_HumanDiff'     => 'Date_HumanDiff',
+        'pear.php.net/VersionControl_Git'  => 'VersionControl_Git',
+        'pear.twig-project.org/Twig'       => 'Twig_Autoloader',
+        'pear.php.net/Date_HumanDiff'      => 'Date_HumanDiff',
+        'pear.php.net/Services_Libravatar' => 'Services_Libravatar',
     );
 
     protected $writableDirs;
@@ -27,6 +28,7 @@ class SetupCheck
         $sc->checkDeps();
         $sc->checkDirs();
         $sc->checkGit();
+        $sc->checkDatabase();
     }
 
     public function checkDeps()
@@ -66,6 +68,12 @@ class SetupCheck
         }
     }
 
+    public function checkDatabase()
+    {
+        $dbs = new Database_Setup_Elasticsearch();
+        $dbs->setup();
+    }
+
     public function fail($msg)
     {
         throw new Exception($msg);