-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from collective/remove-require-js
Remove require js, add upgrade step
- Loading branch information
Showing
8 changed files
with
91 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/Products/EasyNewsletter/tests/test_upgrade_step_4007.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# -*- coding: utf-8 -*- | ||
from plone.app.testing import setRoles | ||
from plone.app.testing import TEST_USER_ID | ||
# from Products.EasyNewsletter.testing import PRODUCTS_EASYNEWSLETTER_FUNCTIONAL_TESTING | ||
from Products.EasyNewsletter.testing import PRODUCTS_EASYNEWSLETTER_INTEGRATION_TESTING | ||
|
||
import unittest | ||
|
||
|
||
class UpgradeStepIntegrationTest(unittest.TestCase): | ||
|
||
layer = PRODUCTS_EASYNEWSLETTER_INTEGRATION_TESTING | ||
|
||
def setUp(self): | ||
self.portal = self.layer['portal'] | ||
setRoles(self.portal, TEST_USER_ID, ['Manager']) | ||
|
||
def test_upgrade_step(self): | ||
# dummy, add tests here | ||
self.assertTrue(True) | ||
|
||
|
||
# class UpgradeStepFunctionalTest(unittest.TestCase): | ||
# | ||
# layer = PRODUCTS_EASYNEWSLETTER_FUNCTIONAL_TESTING | ||
# | ||
# def setUp(self): | ||
# self.portal = self.layer['portal'] | ||
# setRoles(self.portal, TEST_USER_ID, ['Manager']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<configure xmlns="http://namespaces.zope.org/zope" | ||
xmlns:gs="http://namespaces.zope.org/genericsetup"> | ||
|
||
<gs:registerProfile name="4007" | ||
title="Update resource registry entries, remove resources, only bundles are needed now." | ||
directory="4007" | ||
description='Configuration for version 4007' | ||
for="Products.CMFPlone.interfaces.IMigratingPloneSiteRoot" | ||
provides="Products.GenericSetup.interfaces.EXTENSION" /> | ||
|
||
<gs:upgradeSteps source="4006" | ||
destination="4007" | ||
profile="Products.EasyNewsletter:default"> | ||
|
||
<gs:upgradeStep title="Update resource registry entries, remove resources, only bundles are needed now." | ||
description="" | ||
handler=".v4007.upgrade" /> | ||
|
||
<gs:upgradeDepends title="Update resource registry entries, remove resources, only bundles are needed now. (GS profile)" | ||
description="" | ||
import_profile="Products.EasyNewsletter.upgrades:4007" /> | ||
|
||
</gs:upgradeSteps> | ||
|
||
</configure> |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0"?> | ||
<registry> | ||
|
||
<records prefix="plone.resources/iframeResizer" | ||
interface='Products.CMFPlone.interfaces.IResourceRegistry' | ||
remove="true"> | ||
</records> | ||
|
||
<records interface='Products.CMFPlone.interfaces.IResourceRegistry' | ||
prefix="plone.resources/easynewsletter" | ||
remove="true"> | ||
</records> | ||
|
||
<records interface="Products.CMFPlone.interfaces.IBundleRegistry" | ||
prefix="plone.bundles/easynewsletter"> | ||
<value key="enabled">True</value> | ||
<value key="depends">plone</value> | ||
<value key="csscompilation">++plone++easynewsletter/easynewsletter.css</value> | ||
<value key="jscompilation">++resource++Products.EasyNewsletter.iframeResizer.min.js</value> | ||
</records> | ||
|
||
</registry> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from . import logger | ||
|
||
|
||
from .base import reload_gs_profile | ||
# from plone import api | ||
|
||
|
||
def upgrade(setup_tool=None): | ||
""" | ||
""" | ||
# logger.info("Running upgrade (Python): Update resource registry entries, remove resources, only bundles are needed now.") | ||
# reload_gs_profile(setup_tool) |