Skip to content

Commit

Permalink
Merge branch 'master' into locales
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTango authored Dec 22, 2023
2 parents e561fbb + fa29056 commit 6ca5826
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 33 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Products/EasyNewsletter/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
<version>4006</version>
<version>4007</version>
<dependencies>
<dependency>profile-plone.app.dexterity:default</dependency>
</dependencies>
Expand Down
23 changes: 2 additions & 21 deletions src/Products/EasyNewsletter/profiles/default/registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,15 @@
</value>
</record>

<records prefix="plone.resources/easynewsletter"
interface='Products.CMFPlone.interfaces.IResourceRegistry'>
<value key="css">
<element>++plone++easynewsletter/easynewsletter.less</element>
</value>
</records>

<records
interface="Products.CMFPlone.interfaces.IBundleRegistry"
prefix="plone.bundles/easynewsletter">
<value key="resources">
<element>easynewsletter</element>
</value>
<value key="enabled">True</value>
<value key="csscompilation">++plone++easynewsletter/easynewsletter.css</value>
<value key="last_compilation">2018-05-15 00:00:00</value>
<value key="compile">True</value>
<value key="depends">plone</value>
<value key="merge_with">default</value>
</records>

<records prefix="plone.resources/iframeResizer"
interface='Products.CMFPlone.interfaces.IResourceRegistry'>
<value key="js">++resource++Products.EasyNewsletter.iframeResizer.min.js</value>
<value key="deps">jquery</value>
<value key="csscompilation">++plone++easynewsletter/easynewsletter.css</value>
<value key="jscompilation">++resource++Products.EasyNewsletter.iframeResizer.min.js</value>
</records>


<record name="plone.displayed_types" interface="Products.CMFPlone.interfaces.controlpanel.INavigationSchema" field="displayed_types">
<value purge="false">
<element>Newsletter</element>
Expand Down
24 changes: 24 additions & 0 deletions src/Products/EasyNewsletter/profiles/uninstall/registry.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<registry>

<records prefix="plone.resources/iframeResizer"
interface='Products.CMFPlone.interfaces.IResourceRegistry'
remove="true">
</records>

<records interface="Products.CMFPlone.interfaces.IBundleRegistry"
prefix="plone.bundles/easynewsletter"
remove="true">
</records>

<records interface='Products.CMFPlone.interfaces.IResourceRegistry'
prefix="plone.resources/easynewsletter"
remove="true">
</records>

<record name="Products.EasyNewsletter.allowed_content_aggregation_types"
interface="Products.EasyNewsletter.browser.controlpanel.IENLSettings"
field="allowed_content_aggregation_types"
remove="true">
</record>
</registry>
29 changes: 29 additions & 0 deletions src/Products/EasyNewsletter/tests/test_upgrade_step_4007.py
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'])
25 changes: 25 additions & 0 deletions src/Products/EasyNewsletter/upgrades/4007.zcml
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.
22 changes: 22 additions & 0 deletions src/Products/EasyNewsletter/upgrades/4007/registry.xml
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>
14 changes: 14 additions & 0 deletions src/Products/EasyNewsletter/upgrades/v4007.py
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)

0 comments on commit 6ca5826

Please sign in to comment.