]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add new bundle 5875/head
authorLukas Reschke <lukas@statuscode.ch>
Tue, 25 Jul 2017 13:46:21 +0000 (15:46 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Wed, 26 Jul 2017 09:47:15 +0000 (11:47 +0200)
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
lib/composer/composer/autoload_classmap.php
lib/composer/composer/autoload_static.php
lib/private/App/AppStore/Bundles/BundleFetcher.php
lib/private/App/AppStore/Bundles/EducationBundle.php [new file with mode: 0644]
tests/lib/App/AppStore/Bundles/BundleFetcherTest.php
tests/lib/App/AppStore/Bundles/EducationBundleTest.php [new file with mode: 0644]

index c85cde55df8040dc4781ece1ef8a14aa260ede8a..f5a250f0132432fc4158dbe48146a135da7d4608 100644 (file)
@@ -323,6 +323,7 @@ return array(
     'OC\\App\\AppStore\\Bundles\\Bundle' => $baseDir . '/lib/private/App/AppStore/Bundles/Bundle.php',
     'OC\\App\\AppStore\\Bundles\\BundleFetcher' => $baseDir . '/lib/private/App/AppStore/Bundles/BundleFetcher.php',
     'OC\\App\\AppStore\\Bundles\\CoreBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/CoreBundle.php',
+    'OC\\App\\AppStore\\Bundles\\EducationBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/EducationBundle.php',
     'OC\\App\\AppStore\\Bundles\\EnterpriseBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/EnterpriseBundle.php',
     'OC\\App\\AppStore\\Bundles\\GroupwareBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/GroupwareBundle.php',
     'OC\\App\\AppStore\\Bundles\\SocialSharingBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/SocialSharingBundle.php',
index 3483911451ab110ab918a56dd3461714aa27a267..87524b6fba02665fab942be360ac9584df1bb7b4 100644 (file)
@@ -353,6 +353,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
         'OC\\App\\AppStore\\Bundles\\Bundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/Bundle.php',
         'OC\\App\\AppStore\\Bundles\\BundleFetcher' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/BundleFetcher.php',
         'OC\\App\\AppStore\\Bundles\\CoreBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/CoreBundle.php',
+        'OC\\App\\AppStore\\Bundles\\EducationBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/EducationBundle.php',
         'OC\\App\\AppStore\\Bundles\\EnterpriseBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/EnterpriseBundle.php',
         'OC\\App\\AppStore\\Bundles\\GroupwareBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/GroupwareBundle.php',
         'OC\\App\\AppStore\\Bundles\\SocialSharingBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/SocialSharingBundle.php',
index 01cd4d6a5182cdb1b89a6500977b75b83010663f..3fbdf65cd4fc4a2058feda7a0d4b8921bbdc915f 100644 (file)
@@ -42,6 +42,7 @@ class BundleFetcher {
                        new EnterpriseBundle($this->l10n),
                        new GroupwareBundle($this->l10n),
                        new SocialSharingBundle($this->l10n),
+                       new EducationBundle($this->l10n),
                ];
        }
 
diff --git a/lib/private/App/AppStore/Bundles/EducationBundle.php b/lib/private/App/AppStore/Bundles/EducationBundle.php
new file mode 100644 (file)
index 0000000..c3885f5
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OC\App\AppStore\Bundles;
+
+class EducationBundle extends Bundle {
+
+       /**
+        * {@inheritDoc}
+        */
+       public function getName() {
+               return (string)$this->l10n->t('Education Edition');
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       public function getAppIdentifiers() {
+               return [
+                       'zenodo',
+                       'dashboard',
+                       'circles',
+                       'groupfolders',
+                       'announcementcenter',
+                       'admin_notifications',
+                       'quota_warning',
+                       'orcid',
+                       'user_saml',
+               ];
+       }
+
+}
index 71f9820fc72826e5eb716c7c918de67fae9e2dd9..350f6654e083861f70c9878a3571bc4338897760 100644 (file)
@@ -23,6 +23,7 @@ namespace Test\App\AppStore\Bundles;
 
 use OC\App\AppStore\Bundles\BundleFetcher;
 use OC\App\AppStore\Bundles\CoreBundle;
+use OC\App\AppStore\Bundles\EducationBundle;
 use OC\App\AppStore\Bundles\EnterpriseBundle;
 use OC\App\AppStore\Bundles\GroupwareBundle;
 use OC\App\AppStore\Bundles\SocialSharingBundle;
@@ -50,6 +51,7 @@ class BundleFetcherTest extends TestCase {
                        new EnterpriseBundle($this->l10n),
                        new GroupwareBundle($this->l10n),
                        new SocialSharingBundle($this->l10n),
+                       new EducationBundle($this->l10n),
                ];
                $this->assertEquals($expected, $this->bundleFetcher->getBundles());
        }
diff --git a/tests/lib/App/AppStore/Bundles/EducationBundleTest.php b/tests/lib/App/AppStore/Bundles/EducationBundleTest.php
new file mode 100644 (file)
index 0000000..589f35d
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+/**
+ * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace Test\App\AppStore\Bundles;
+
+use OC\App\AppStore\Bundles\EducationBundle;
+
+class EducationBundleTest extends BundleBase {
+       public function setUp() {
+               parent::setUp();
+               $this->bundle = new EducationBundle($this->l10n);
+               $this->bundleIdentifier = 'EducationBundle';
+               $this->bundleName = 'Education Edition';
+               $this->bundleAppIds = [
+                       'zenodo',
+                       'dashboard',
+                       'circles',
+                       'groupfolders',
+                       'announcementcenter',
+                       'admin_notifications',
+                       'quota_warning',
+                       'orcid',
+                       'user_saml',
+               ];
+       }
+}