Skip to content

Commit

Permalink
rename to collective.shoppingbehavior
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesnyder committed Feb 13, 2012
1 parent d680f2a commit 3e5d9ff
Show file tree
Hide file tree
Showing 23 changed files with 44 additions and 44 deletions.
4 changes: 2 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
experimental.shoppingbehavior
collective.shoppingbehavior
=============================

This document contains design notes for the ``experimental.shoppingbehavior``
This document contains design notes for the ``collective.shoppingbehavior``
package.

Introduction
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Define a message factory for when this product is internationalised.
# This will be imported with the special name "_" in most modules. Strings
# like _(u"message") will then be extracted by i18n tools for translation.
_ = MessageFactory("experimental.shoppingbehavior")
_ = MessageFactory("collective.shoppingbehavior")
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from zope import schema
from plone.directives import form

from experimental.shoppingbehavior import _
from collective.shoppingbehavior import _


class IPotentiallyPriced(zif.Interface):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:plone="http://namespaces.plone.org/plone"
xmlns:grok="http://namespaces.zope.org/grok"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="experimental.shoppingbehavior">
i18n_domain="collective.shoppingbehavior">

<include package="plone.behavior" file="meta.zcml" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from groundwire.checkout.utils import get_cart
from groundwire.checkout.utils import redirect_to_checkout

from experimental.shoppingbehavior import behaviors
from collective.shoppingbehavior import behaviors


class ICallbackLineItem(IPayableLineItem):
Expand Down
3 changes: 3 additions & 0 deletions collective/shoppingbehavior/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Globals and constants

PRICE_BEHAVIOR_KEY = 'collective.shoppingbehavior.pricebehavior'
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:grok="http://namespaces.zope.org/grok"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
i18n_domain="experimental.shoppingbehavior">
i18n_domain="collective.shoppingbehavior">

<!-- Include dependencies' configuration -->
<includeDependencies package="." />
Expand All @@ -16,9 +16,9 @@

<genericsetup:registerProfile
name="default"
title="experimental.shoppingbehavior"
title="collective.shoppingbehavior"
directory="profiles/default"
description="Installs the experimental.shoppingbehavior package"
description="Installs the collective.shoppingbehavior package"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<include package="plone.app.portlets" />

<plone:portlet
name="experimental.shoppingbehavior"
name="collective.shoppingbehavior"
interface=".shopping.IShoppingPortlet"
assignment=".shopping.Assignment"
renderer=".shopping.Renderer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from plone.app.portlets.portlets import base

from experimental.shoppingbehavior import _
from experimental.shoppingbehavior import behaviors
from collective.shoppingbehavior import _
from collective.shoppingbehavior import behaviors


class IShoppingPortlet(IPortletDataProvider):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<portlets>
<portlet
addview="experimental.shoppingbehavior"
addview="collective.shoppingbehavior"
title="Shopping Cart"
description="A portlet for adding things to the shopping cart." />
</portlets>
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class ExpShopping(PloneSandboxLayer):

def setUpZope(self, app, configurationContext):
# Load ZCML
import experimental.shoppingbehavior
xmlconfig.file('configure.zcml', experimental.shoppingbehavior,
import collective.shoppingbehavior
xmlconfig.file('configure.zcml', collective.shoppingbehavior,
context=configurationContext)

def setUpPloneSite(self, portal):
applyProfile(portal, 'experimental.shoppingbehavior:default')
applyProfile(portal, 'collective.shoppingbehavior:default')

EXP_SHOPPING_FIXTURE = ExpShopping()
EXP_SHOPPING_INTEGRATION_TESTING = IntegrationTesting(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import unittest2 as unittest
import fudge
from zope.publisher.browser import TestRequest
from experimental.shoppingbehavior import cart
from collective.shoppingbehavior import cart


class TestCart(unittest.TestCase):

@fudge.patch('experimental.shoppingbehavior.cart.get_cart')
@fudge.patch('experimental.shoppingbehavior.cart.queryMultiAdapter')
@fudge.patch('collective.shoppingbehavior.cart.get_cart')
@fudge.patch('collective.shoppingbehavior.cart.queryMultiAdapter')
def testAdd(self, fake_get_cart, queryMultiAdapter):
# set up a fake cart
(fake_get_cart.expects_call()
Expand Down Expand Up @@ -35,7 +35,7 @@ class TestCartView(unittest.TestCase):
isolation.
"""

@fudge.patch('experimental.shoppingbehavior.cart.Cart')
@fudge.patch('collective.shoppingbehavior.cart.Cart')
def testCartViewCallsWithZeroQtyByDefault(self, Cart):
context = object()
fakeCartInstance = (fudge.Fake()
Expand All @@ -47,7 +47,7 @@ def testCartViewCallsWithZeroQtyByDefault(self, Cart):
view = cart.CartView(context, TestRequest())
view.update()

@fudge.patch('experimental.shoppingbehavior.cart.Cart')
@fudge.patch('collective.shoppingbehavior.cart.Cart')
def testCartViewCallsWithQtyFromRequest(self, Cart):
context = object()
testQty = '3'
Expand All @@ -61,7 +61,7 @@ def testCartViewCallsWithQtyFromRequest(self, Cart):
view = cart.CartView(context, request)
view.update()

@fudge.patch('experimental.shoppingbehavior.cart.Cart')
@fudge.patch('collective.shoppingbehavior.cart.Cart')
def testOnlyCallsCheckoutIfAddSucceeds(self, Cart):
context = object()
testQty = '3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
from plone.behavior.interfaces import IBehaviorAssignable
from plone.behavior.interfaces import IBehavior

from experimental.shoppingbehavior import behaviors
from experimental.shoppingbehavior.testing import StubContext
from collective.shoppingbehavior import behaviors
from collective.shoppingbehavior.testing import StubContext

from plone.testing.zca import UNIT_TESTING


configuration = """\
<configure
package="experimental.shoppingbehavior"
package="collective.shoppingbehavior"
xmlns="http://namespaces.zope.org/zope"
xmlns:plone="http://namespaces.plone.org/plone"
i18n_domain="experimental.shoppingbehavior">
i18n_domain="collective.shoppingbehavior">
<include package="zope.component" file="meta.zcml" />
<include package="plone.behavior" file="meta.zcml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from plone.behavior.interfaces import IBehavior
from zope.annotation.interfaces import IAttributeAnnotatable

from experimental.shoppingbehavior.testing import EXP_SHOPPING_INTEGRATION_TESTING
from collective.shoppingbehavior.testing import EXP_SHOPPING_INTEGRATION_TESTING


class SomeContext(object):
Expand All @@ -17,11 +17,11 @@ class TestConfiguration(unittest.TestCase):

def testBehaviorInRegistry(self):
priced = queryUtility(IBehavior,
name='experimental.shoppingbehavior.behaviors.IPriced')
name='collective.shoppingbehavior.behaviors.IPriced')
self.failUnless(priced is not None)

def testBehaviorProvidesFields(self):
from plone.directives.form import IFormFieldProvider
priced = queryUtility(IBehavior,
name='experimental.shoppingbehavior.behaviors.IPriced')
name='collective.shoppingbehavior.behaviors.IPriced')
self.assertTrue(IFormFieldProvider.providedBy(priced.interface))
16 changes: 8 additions & 8 deletions docs/INSTALL.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
experimental.shoppingbehavior Installation
collective.shoppingbehavior Installation
------------------------------------------

To install experimental.shoppingbehavior into the global Python environment (or a workingenv),
To install collective.shoppingbehavior into the global Python environment (or a workingenv),
using a traditional Zope 2 instance, you can do this:

* When you're reading this you have probably already run
``easy_install experimental.shoppingbehavior``. Find out how to install setuptools
``easy_install collective.shoppingbehavior``. Find out how to install setuptools
(and EasyInstall) here:
http://peak.telecommunity.com/DevCenter/EasyInstall

* Create a file called ``experimental.shoppingbehavior-configure.zcml`` in the
* Create a file called ``collective.shoppingbehavior-configure.zcml`` in the
``/path/to/instance/etc/package-includes`` directory. The file
should only contain this::

<include package="experimental.shoppingbehavior" />
<include package="collective.shoppingbehavior" />


Alternatively, if you are using zc.buildout and the plone.recipe.zope2instance
recipe to manage your project, you can do this:

* Add ``experimental.shoppingbehavior`` to the list of eggs to install, e.g.:
* Add ``collective.shoppingbehavior`` to the list of eggs to install, e.g.:

[buildout]
...
eggs =
...
experimental.shoppingbehavior
collective.shoppingbehavior

* Tell the plone.recipe.zope2instance recipe to install a ZCML slug:

[instance]
recipe = plone.recipe.zope2instance
...
zcml =
experimental.shoppingbehavior
collective.shoppingbehavior

* Re-run buildout, e.g. with:

Expand Down
2 changes: 1 addition & 1 deletion docs/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
experimental.shoppingbehavior is copyright Jesse Snyder
collective.shoppingbehavior is copyright Jesse Snyder

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
3 changes: 0 additions & 3 deletions experimental/shoppingbehavior/config.py

This file was deleted.

6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

version = '1.0'

setup(name='experimental.shoppingbehavior',
setup(name='collective.shoppingbehavior',
version=version,
description="Plone behavior to support price assignment on dexterity content",
long_description=open("README.txt").read() + "\n" +
Expand All @@ -17,10 +17,10 @@
keywords='',
author='Jesse Snyder',
author_email='[email protected]',
url='https://github.com/jessesnyder/experimental.shoppingbehavior',
url='https://github.com/jessesnyder/collective.shoppingbehavior',
license='GPL',
packages=find_packages(exclude=['ez_setup']),
namespace_packages=['experimental'],
namespace_packages=['collective'],
include_package_data=True,
zip_safe=False,
install_requires=[
Expand Down

0 comments on commit 3e5d9ff

Please sign in to comment.