Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-07-26 17:47:32 +0300
committerGitHub <noreply@github.com>2017-07-26 17:47:32 +0300
commitc929e3ad2604a691d5fc6d6df09916ed0ad09c49 (patch)
tree40926acccab8951c81f69688f6bad94764a75c04
parent2902677ccf6932fad27624b73525f336199f3f5e (diff)
parent7568b0470521f95f7d3326bf0462a20829d45711 (diff)
Merge pull request #5875 from nextcloud/stable12-edu-edition
[stable12] Add new bundle
-rw-r--r--lib/composer/composer/autoload_classmap.php1
-rw-r--r--lib/composer/composer/autoload_static.php1
-rw-r--r--lib/private/App/AppStore/Bundles/BundleFetcher.php1
-rw-r--r--lib/private/App/AppStore/Bundles/EducationBundle.php50
-rw-r--r--tests/lib/App/AppStore/Bundles/BundleFetcherTest.php2
-rw-r--r--tests/lib/App/AppStore/Bundles/EducationBundleTest.php44
6 files changed, 99 insertions, 0 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index c85cde55df8..f5a250f0132 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -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',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index 3483911451a..87524b6fba0 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -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',
diff --git a/lib/private/App/AppStore/Bundles/BundleFetcher.php b/lib/private/App/AppStore/Bundles/BundleFetcher.php
index 01cd4d6a518..3fbdf65cd4f 100644
--- a/lib/private/App/AppStore/Bundles/BundleFetcher.php
+++ b/lib/private/App/AppStore/Bundles/BundleFetcher.php
@@ -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
index 00000000000..c3885f5e250
--- /dev/null
+++ b/lib/private/App/AppStore/Bundles/EducationBundle.php
@@ -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',
+ ];
+ }
+
+}
diff --git a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php
index 71f9820fc72..350f6654e08 100644
--- a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php
+++ b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php
@@ -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
index 00000000000..589f35db215
--- /dev/null
+++ b/tests/lib/App/AppStore/Bundles/EducationBundleTest.php
@@ -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',
+ ];
+ }
+}