Skip to content

Commit

Permalink
Merge pull request #108 from RedTurtle/sitesettings_dependency
Browse files Browse the repository at this point in the history
Add dependency with collective.volto.sitesettings
  • Loading branch information
cekk authored Jul 10, 2024
2 parents b7ac7e2 + 3950b2e commit c14c8a3
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ coverage.json
*.py?
*.swp
# dirs
__pycache__
bin/
buildout-cache/
develop-eggs/
eggs/
extras/
htmlcov/
include/
lib/
Expand Down
7 changes: 6 additions & 1 deletion base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ parts =
omelette
robot
plone-helper-scripts
develop = .

develop = .
sources-dir = extras
auto-checkout = *
always-checkout = force

[instance]
recipe = plone.recipe.zope2instance
Expand Down Expand Up @@ -117,3 +120,5 @@ scripts =
# Don't use a released version of redturtle.volto
redturtle.volto =
setuptools =

[sources]
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"plone.volto>=4.0.0",
"plone.restapi>=9.6.0",
"Products.PortalTransforms>=3.2.0",
"collective.volto.sitesettings",
"z3c.jbot",
],
extras_require={
Expand Down
3 changes: 2 additions & 1 deletion src/redturtle/volto/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<version>4305</version>
<version>4306</version>
<dependencies>
<dependency>profile-plone.volto:default</dependency>
<dependency>profile-plone.app.caching:with-caching-proxy</dependency>
<dependency>profile-collective.volto.gdprcookie:default</dependency>
<dependency>profile-kitconcept.seo:default</dependency>
<dependency>profile-collective.volto.sitesettings:default</dependency>
</dependencies>
</metadata>
3 changes: 3 additions & 0 deletions src/redturtle/volto/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from plone.testing import z2

import collective.volto.gdprcookie
import collective.volto.sitesettings
import kitconcept.seo
import plone.app.caching
import plone.restapi
Expand All @@ -24,6 +25,7 @@ def setUpZope(self, app, configurationContext):
# The z3c.autoinclude feature is disabled in the Plone fixture base
# layer.
self.loadZCML(package=collective.volto.gdprcookie)
self.loadZCML(package=collective.volto.sitesettings)
self.loadZCML(package=plone.restapi)
self.loadZCML(package=redturtle.volto)
self.loadZCML(package=plone.volto)
Expand Down Expand Up @@ -67,6 +69,7 @@ def setUpZope(self, app, configurationContext):
super(RedturtleVoltoRestApiLayer, self).setUpZope(app, configurationContext)

self.loadZCML(package=collective.volto.gdprcookie)
self.loadZCML(package=collective.volto.sitesettings)
self.loadZCML(package=plone.restapi)
self.loadZCML(package=plone.volto)
self.loadZCML(package=redturtle.volto)
Expand Down
7 changes: 7 additions & 0 deletions src/redturtle/volto/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,3 +508,10 @@ def to_4305(context):
installer.uninstall_product(product_id="collective.volto.cookieconsent")
if not installer.is_product_installed("collective.volto.gdprcookie"):
installer.install_product(product_id="collective.volto.gdprcookie")


def to_4306(context):
portal = api.portal.get()
installer = get_installer(portal, portal.REQUEST)
if not installer.is_product_installed("collective.volto.sitesettings"):
installer.install_product(product_id="collective.volto.sitesettings")
8 changes: 8 additions & 0 deletions src/redturtle/volto/upgrades.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,12 @@
destination="4305"
handler=".upgrades.to_4305"
/>
<genericsetup:upgradeStep
title="Install new dependency"
description=""
profile="redturtle.volto:default"
source="4305"
destination="4306"
handler=".upgrades.to_4306"
/>
</configure>
1 change: 1 addition & 0 deletions test_plone60.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extends =
base.cfg

[versions]
docutils =

# Added by buildout at 2023-03-10 11:55:21.122842
Products.AdvancedQuery = 4.2.1
Expand Down

0 comments on commit c14c8a3

Please sign in to comment.