Skip to content

Commit

Permalink
Manage profiles differently
Browse files Browse the repository at this point in the history
  • Loading branch information
sgeulette committed Jun 13, 2017
1 parent 367ef86 commit b8b0e49
Show file tree
Hide file tree
Showing 18 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Changelog

- Tests on Plone5 and Plone4.
[bsuttor]

- Manage profiles differently
[sgeulette]

0.12 (2017-05-30)
-----------------
Expand Down Expand Up @@ -69,7 +70,7 @@ Changelog
----------------

- Do not pass a default 'context' in utils._ to avoid strange ConnectionStateError.
[gbastien]
[gbastien]
- Give context to translate method.
[sgeulette]
- Corrected and added icon type images.
Expand Down
11 changes: 7 additions & 4 deletions src/collective/messagesviewlet/profiles.zcml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:zcml="http://namespaces.zope.org/zcml"
xmlns:five="http://namespaces.zope.org/five"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:i18n="http://namespaces.zope.org/i18n"
i18n_domain="collective.messagesviewlet">

<genericsetup:registerProfile
name="default"
name="install-base"
title="collective.messagesviewlet installation"
directory="profiles/default"
directory="profiles/base"
description="Installs the collective.messagesviewlet add-on."
provides="Products.GenericSetup.interfaces.EXTENSION"
/>
Expand All @@ -22,15 +23,17 @@
/>

<genericsetup:registerProfile
name="plone5"
zcml:condition="have plone-5"
name="default"
title="collective.messagesviewlet plone5 installation"
directory="profiles/plone5"
description="Installs the collective.messagesviewlet add-on on Plone 5."
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<genericsetup:registerProfile
name="plone4"
zcml:condition="not-have plone-5"
name="default"
title="collective.messagesviewlet plone4 installation"
directory="profiles/plone4"
description="Installs the collective.messagesviewlet add-on on Plone 4."
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<metadata>
<version>1000</version>
<dependencies>
<dependency>profile-collective.messagesviewlet:default</dependency>
<dependency>profile-collective.messagesviewlet:install-base</dependency>
</dependencies>
</metadata>
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<metadata>
<version>1000</version>
<dependencies>
<dependency>profile-collective.messagesviewlet:default</dependency>
<dependency>profile-collective.messagesviewlet:install-base</dependency>
</dependencies>
</metadata>
5 changes: 1 addition & 4 deletions src/collective/messagesviewlet/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ def setUpZope(self, app, configurationContext):
self.loadZCML(package=collective.messagesviewlet)

def setUpPloneSite(self, portal):
if IS_PLONE_5:
applyProfile(portal, 'collective.messagesviewlet:plone5')
else:
applyProfile(portal, 'collective.messagesviewlet:plone4')
applyProfile(portal, 'collective.messagesviewlet:default')
api.user.create(email='test@imio.be', username='test')
api.user.grant_roles(username='test', roles=['Site Administrator'])

Expand Down

0 comments on commit b8b0e49

Please sign in to comment.