Permalink
Browse files

Added testing integration to Travis CI.

  • Loading branch information...
1 parent f875ff5 commit 6ef1a820ee4903b5545c03c56b65bc43a4197f0e @taito taito committed Nov 23, 2012
Showing with 216 additions and 24 deletions.
  1. +8 −0 .travis.yml
  2. +8 −0 MANIFEST.in
  3. +118 −0 bootstrap.py
  4. +8 −7 setup.py
  5. 0 { → src}/collective/__init__.py
  6. 0 { → src}/collective/cart/__init__.py
  7. 0 { → src}/collective/cart/core/__init__.py
  8. 0 { → src}/collective/cart/core/adapter/__init__.py
  9. 0 { → src}/collective/cart/core/adapter/article.py
  10. 0 { → src}/collective/cart/core/adapter/base.py
  11. 0 { → src}/collective/cart/core/adapter/cart.py
  12. 0 { → src}/collective/cart/core/adapter/cartarticle.py
  13. 0 { → src}/collective/cart/core/adapter/cartcontainer.py
  14. 0 { → src}/collective/cart/core/adapter/interface.py
  15. 0 { → src}/collective/cart/core/browser/__init__.py
  16. 0 { → src}/collective/cart/core/browser/base.py
  17. 0 { → src}/collective/cart/core/browser/configure.zcml
  18. 0 { → src}/collective/cart/core/browser/interfaces.py
  19. 0 { → src}/collective/cart/core/browser/miscellaneous.py
  20. 0 { → src}/collective/cart/core/browser/template.py
  21. 0 { → src}/collective/cart/core/browser/templates/cart-content.pt
  22. 0 { → src}/collective/cart/core/browser/templates/cart.pt
  23. 0 { → src}/collective/cart/core/browser/templates/cart_folder.pt
  24. 0 { → src}/collective/cart/core/browser/templates/cart_type.pt
  25. 0 { → src}/collective/cart/core/browser/templates/edit_product.pt
  26. 0 { → src}/collective/cart/core/browser/templates/orders.pt
  27. 0 { → src}/collective/cart/core/browser/viewlet.py
  28. 0 { → src}/collective/cart/core/browser/viewlets/add-to-cart.pt
  29. 0 { → src}/collective/cart/core/browser/viewlets/cart-articles.pt
  30. 0 { → src}/collective/cart/core/browser/viewlets/cart-content.pt
  31. 0 { → src}/collective/cart/core/browser/viewlets/cart_next.pt
  32. 0 { → src}/collective/cart/core/browser/viewlets/cart_totals.pt
  33. 0 { → src}/collective/cart/core/browser/viewlets/cost.pt
  34. 0 { → src}/collective/cart/core/browser/viewlets/edit_product.pt
  35. 0 { → src}/collective/cart/core/browser/viewlets/fixed_info.pt
  36. 0 { → src}/collective/cart/core/browser/viewlets/product_values.pt
  37. 0 { → src}/collective/cart/core/config.py
  38. +3 −1 { → src}/collective/cart/core/configure.zcml
  39. 0 { → src}/collective/cart/core/docs/CONTRIBUTORS.rst
  40. 0 { → src}/collective/cart/core/docs/CREDITS.rst
  41. +5 −0 { → src}/collective/cart/core/docs/HISTORY.rst
  42. 0 { → src}/collective/cart/core/docs/INSTALL.rst
  43. 0 { → src}/collective/cart/core/docs/LICENSE.rst
  44. 0 { → src}/collective/cart/core/error.py
  45. 0 { → src}/collective/cart/core/event.py
  46. 0 { → src}/collective/cart/core/indexer.py
  47. 0 { → src}/collective/cart/core/interfaces/__init__.py
  48. 0 { → src}/collective/cart/core/interfaces/marker.py
  49. +16 −8 { → src}/collective/cart/core/locales/collective.cart.core.pot
  50. +16 −8 { → src}/collective/cart/core/locales/fi/LC_MESSAGES/collective.cart.core.po
  51. 0 { → src}/collective/cart/core/locales/fi/LC_MESSAGES/plone.po
  52. 0 { → src}/collective/cart/core/portlets/__init__.py
  53. 0 { → src}/collective/cart/core/portlets/cart.pt
  54. 0 { → src}/collective/cart/core/portlets/cart.py
  55. 0 { → src}/collective/cart/core/portlets/configure.zcml
  56. 0 { → src}/collective/cart/core/profiles/default/actions.xml
  57. 0 { → src}/collective/cart/core/profiles/default/browserlayer.xml
  58. 0 { → src}/collective/cart/core/profiles/default/catalog.xml
  59. 0 { → src}/collective/cart/core/profiles/default/collective.cart.core_various.txt
  60. 0 { → src}/collective/cart/core/profiles/default/import_steps.xml
  61. 0 { → src}/collective/cart/core/profiles/default/metadata.xml
  62. 0 { → src}/collective/cart/core/profiles/default/portlets.xml
  63. 0 { → src}/collective/cart/core/profiles/default/propertiestool.xml
  64. 0 { → src}/collective/cart/core/profiles/default/rolemap.xml
  65. 0 { → src}/collective/cart/core/profiles/default/types.xml
  66. 0 { → src}/collective/cart/core/profiles/default/types/collective.cart.core.Article.xml
  67. 0 { → src}/collective/cart/core/profiles/default/types/collective.cart.core.Cart.xml
  68. 0 { → src}/collective/cart/core/profiles/default/types/collective.cart.core.CartArticle.xml
  69. 0 { → src}/collective/cart/core/profiles/default/types/collective.cart.core.CartContainer.xml
  70. 0 { → src}/collective/cart/core/profiles/default/viewlets.xml
  71. 0 { → src}/collective/cart/core/profiles/default/workflows.xml
  72. 0 { → src}/collective/cart/core/profiles/default/workflows/cart_default_workflow/definition.xml
  73. 0 { → src}/collective/cart/core/profiles/uninstall/portlets.xml
  74. 0 { → src}/collective/cart/core/setuphandlers.py
  75. BIN { → src}/collective/cart/core/static/article.png
  76. BIN { → src}/collective/cart/core/static/cart.png
  77. 0 { → src}/collective/cart/core/subscriber.py
  78. 0 { → src}/collective/cart/core/tests/__init__.py
  79. 0 { → src}/collective/cart/core/tests/base.py
  80. 0 { → src}/collective/cart/core/tests/functional/anonymous.txt
  81. 0 { → src}/collective/cart/core/tests/functional/anonymous_functional.txt
  82. 0 { → src}/collective/cart/core/tests/functional/browser.txt
  83. 0 { → src}/collective/cart/core/tests/functional/content.txt
  84. 0 { → src}/collective/cart/core/tests/functional/manager.txt
  85. 0 { → src}/collective/cart/core/tests/functional/member.txt
  86. 0 { → src}/collective/cart/core/tests/functional/orders.txt
  87. 0 { → src}/collective/cart/core/tests/functional/portlet.txt
  88. 0 { → src}/collective/cart/core/tests/functional/quantity.txt
  89. 0 { → src}/collective/cart/core/tests/functional/setup_functional.txt
  90. 0 { → src}/collective/cart/core/tests/integration/cart.txt
  91. 0 { → src}/collective/cart/core/tests/integration/cart_folder.txt
  92. 0 { → src}/collective/cart/core/tests/integration/portal.txt
  93. 0 { → src}/collective/cart/core/tests/test_CartAdapter.py
  94. 0 { → src}/collective/cart/core/tests/test_CartArticle.py
  95. 0 { → src}/collective/cart/core/tests/test_CartContainerAdapter.py
  96. 0 { → src}/collective/cart/core/tests/test_anonymous.py
  97. 0 { → src}/collective/cart/core/tests/test_functional.py
  98. 0 { → src}/collective/cart/core/tests/test_manager.py
  99. 0 { → src}/collective/cart/core/tests/test_member.py
  100. 0 { → src}/collective/cart/core/tests/test_portlet.py
  101. 0 { → src}/collective/cart/core/tests/test_setup.py
  102. 0 { → src}/collective/cart/core/tests/test_upgrades.py
  103. 0 { → src}/collective/cart/core/tests/unittest/adapter.txt
  104. 0 { → src}/collective/cart/core/tests/unittest/browser.txt
  105. 0 { → src}/collective/cart/core/tests/unittest/portal_adapter.txt
  106. 0 { → src}/collective/cart/core/tests/unittest/unittest.txt
  107. 0 { → src}/collective/cart/core/tests/unittest/utility.txt
  108. 0 { → src}/collective/cart/core/upgrades.py
  109. 0 { → src}/collective/cart/core/upgrades.zcml
  110. 0 { → src}/collective/cart/core/utility.py
  111. 0 { → src}/collective/cart/core/utility/configure.zcml
  112. 0 { → src}/collective/cart/core/utility/miscellaneous.py
  113. 0 { → src}/collective/cart/core/utility/price.py
  114. 0 { → src}/collective/cart/core/validator.py
  115. +34 −0 travis.cfg
View
@@ -0,0 +1,8 @@
+language: python
+python: "2.7"
+install:
+ - mkdir -p buildout-cache/eggs
+ - mkdir -p buildout-cache/downloads
+ - python bootstrap.py -c travis.cfg
+ - bin/buildout -N -t 3 -c travis.cfg
+script: bin/test
View
@@ -0,0 +1,8 @@
+recursive-include src *
+include *
+exclude .gitignore
+exclude .travis.yml
+exclude MANIFEST.in
+exclude bootstrap.py
+exclude travis.cfg
+global-exclude *.pyc
View
@@ -0,0 +1,118 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id$
+"""
+from optparse import OptionParser
+import os
+import shutil
+import sys
+import tempfile
+import urllib2
+
+
+tmpeggs = tempfile.mkdtemp()
+
+is_jython = sys.platform.startswith('java')
+
+# parsing arguments
+parser = OptionParser()
+parser.add_option(
+ "-v", "--version", dest="version",
+ help="use a specific zc.buildout version")
+parser.add_option(
+ "-d", "--distribute",
+ action="store_true", dest="distribute", default=False,
+ help="Use Disribute rather than Setuptools.")
+
+parser.add_option(
+ "-c", None, action="store", dest="config_file",
+ help=("Specify the path to the buildout configuration file to be used."))
+
+options, args = parser.parse_args()
+
+# if -c was provided, we push it back into args for buildout' main function
+if options.config_file is not None:
+ args += ['-c', options.config_file]
+
+if options.version is not None:
+ VERSION = '==%s' % options.version
+else:
+ VERSION = ''
+
+USE_DISTRIBUTE = options.distribute
+args = args + ['bootstrap']
+
+to_reload = False
+try:
+ import pkg_resources
+ if not hasattr(pkg_resources, '_distribute'):
+ to_reload = True
+ raise ImportError
+except ImportError:
+ ez = {}
+ if USE_DISTRIBUTE:
+ exec urllib2.urlopen('http://python-distribute.org/distribute_setup.py').read() in ez
+ ez['use_setuptools'](to_dir=tmpeggs, download_delay=0, no_fake=True)
+ else:
+ exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+ if to_reload:
+ reload(pkg_resources)
+ else:
+ import pkg_resources
+
+if sys.platform == 'win32':
+ def quote(c):
+ if ' ' in c:
+ return '"%s"' % c # work around spawn lamosity on windows
+ else:
+ return c
+else:
+ def quote(c):
+ return c
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws = pkg_resources.working_set
+
+if USE_DISTRIBUTE:
+ requirement = 'distribute'
+else:
+ requirement = 'setuptools'
+
+if is_jython:
+ import subprocess
+
+ assert subprocess.Popen(
+ [sys.executable] + ['-c', quote(cmd), '-mqNxd', quote(tmpeggs), 'zc.buildout' + VERSION],
+ env=dict(os.environ, PYTHONPATH=ws.find(pkg_resources.Requirement.parse(requirement)).location)).wait() == 0
+
+else:
+ assert os.spawnle(
+ os.P_WAIT, sys.executable, quote(sys.executable),
+ '-c', quote(cmd), '-mqNxd', quote(tmpeggs), 'zc.buildout' + VERSION,
+ dict(os.environ, PYTHONPATH=ws.find(pkg_resources.Requirement.parse(requirement)).location)) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout' + VERSION)
+import zc.buildout.buildout
+zc.buildout.buildout.main(args)
+shutil.rmtree(tmpeggs)
View
@@ -6,19 +6,17 @@
long_description = (
open("README.rst").read() + "\n" +
- open(os.path.join("collective", "cart", "core", "docs", "INSTALL.rst")).read() + "\n" +
- open(os.path.join("collective", "cart", "core", "docs", "HISTORY.rst")).read() + "\n" +
- open(os.path.join("collective", "cart", "core", "docs", "CONTRIBUTORS.rst")).read() + "\n" +
- open(os.path.join("collective", "cart", "core", "docs", "CREDITS.rst")).read())
+ open(os.path.join("src", "collective", "cart", "core", "docs", "INSTALL.rst")).read() + "\n" +
+ open(os.path.join("src", "collective", "cart", "core", "docs", "HISTORY.rst")).read() + "\n" +
+ open(os.path.join("src", "collective", "cart", "core", "docs", "CONTRIBUTORS.rst")).read() + "\n" +
+ open(os.path.join("src", "collective", "cart", "core", "docs", "CREDITS.rst")).read())
setup(
name='collective.cart.core',
version='0.5.2.4',
description="Yet another cart for Plone.",
long_description=long_description,
- # Get more strings from
- # http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Framework :: Plone",
"Framework :: Plone :: 4.2",
@@ -31,13 +29,16 @@
author_email='taito.horiuchi@gmail.com',
url='https://github.com/collective/collective.cart.core/',
license='BSD',
- packages=find_packages(exclude=['ez_setup']),
+ packages=find_packages('src', exclude=['ez_setup']),
+ package_dir={'': 'src'},
namespace_packages=['collective', 'collective.cart'],
include_package_data=True,
zip_safe=False,
install_requires=[
+ 'Products.CMFPlone>=4.2',
'collective.behavior.salable',
'five.grok',
+ 'five.pt',
'hexagonit.testing',
'plone.app.contentlisting',
'plone.app.dexterity',
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -12,7 +12,9 @@
title="collective.cart.core: View Cart Content"
/>
- <includeDependencies package="." />
+ <include package="five.pt"/>
+ <include package="plone.app.dexterity"/>
+ <include package="collective.behavior.salable"/>
<grok:grok package="." />
<i18n:registerTranslations directory="locales" />
@@ -1,6 +1,11 @@
Change log
----------
+0.5.2.5 (2012-11-XX)
+====================
+
+- Added testing integration to Travis CI. [taito]
+
0.5.2.4 (2012-11-21)
====================
File renamed without changes.
File renamed without changes.
@@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2012-11-20 18:49+0000\n"
+"POT-Creation-Date: 2012-11-23 13:47+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -43,7 +43,6 @@ msgstr ""
msgid "Cart Article"
msgstr ""
-#: ./browser/templates/cart-container.pt:12
#: ./profiles/default/types/collective.cart.core.CartContainer.xml
msgid "Cart Container"
msgstr ""
@@ -52,7 +51,7 @@ msgstr ""
msgid "Cart Default Workflow"
msgstr ""
-#: ./browser/templates/cart-container.pt:26
+#: ./browser/templates/orders.pt:25
msgid "Cart ID"
msgstr ""
@@ -88,7 +87,7 @@ msgstr ""
msgid "ID"
msgstr ""
-#: ./browser/templates/cart-container.pt:28
+#: ./browser/templates/orders.pt:27
msgid "Last Modified"
msgstr ""
@@ -121,7 +120,12 @@ msgstr ""
msgid "Ordered cart can be canceled or paid."
msgstr ""
-#: ./browser/templates/cart-container.pt:29
+#: ./browser/templates/orders.pt:12
+#: ./profiles/default/actions.xml
+msgid "Orders"
+msgstr ""
+
+#: ./browser/templates/orders.pt:28
msgid "Owner"
msgstr ""
@@ -149,7 +153,11 @@ msgstr ""
msgid "Shipped cart can be ..."
msgstr ""
-#: ./browser/templates/cart-container.pt:27
+#: ./profiles/default/actions.xml
+msgid "Show list of orders."
+msgstr ""
+
+#: ./browser/templates/orders.pt:26
msgid "State"
msgstr ""
@@ -173,15 +181,15 @@ msgstr ""
msgid "The cart ID is already in use."
msgstr ""
-#: ./browser/templates/cart-container.pt:14
+#: ./browser/templates/orders.pt:14
msgid "The next cart ID: ${next_cart_id}"
msgstr ""
#: ./browser/viewlets/cart-content.pt:2
msgid "There are no articles within this cart."
msgstr ""
-#: ./browser/templates/cart-container.pt:16
+#: ./browser/templates/orders.pt:16
msgid "There are no carts."
msgstr ""
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2012-11-20 18:49+0000\n"
+"POT-Creation-Date: 2012-11-23 13:47+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -40,7 +40,6 @@ msgstr "Ostoskori"
msgid "Cart Article"
msgstr "Ostoskorituote"
-#: ./browser/templates/cart-container.pt:12
#: ./profiles/default/types/collective.cart.core.CartContainer.xml
msgid "Cart Container"
msgstr "Ostoskorikonteineri"
@@ -49,7 +48,7 @@ msgstr "Ostoskorikonteineri"
msgid "Cart Default Workflow"
msgstr "Oostoskori-oletusworkflow"
-#: ./browser/templates/cart-container.pt:26
+#: ./browser/templates/orders.pt:25
msgid "Cart ID"
msgstr "Ostoskoritunnus"
@@ -85,7 +84,7 @@ msgstr "Siirry ostoskoriin"
msgid "ID"
msgstr "Tunnus"
-#: ./browser/templates/cart-container.pt:28
+#: ./browser/templates/orders.pt:27
msgid "Last Modified"
msgstr "Viimeksi päivitetty"
@@ -118,7 +117,12 @@ msgstr "Tilattu"
msgid "Ordered cart can be canceled or paid."
msgstr "Tilattu ostoskori voi perua tai maksaa."
-#: ./browser/templates/cart-container.pt:29
+#: ./browser/templates/orders.pt:12
+#: ./profiles/default/actions.xml
+msgid "Orders"
+msgstr "Tilaukset"
+
+#: ./browser/templates/orders.pt:28
msgid "Owner"
msgstr "Omistaja"
@@ -146,7 +150,11 @@ msgstr "Lähetetty"
msgid "Shipped cart can be ..."
msgstr "Lähetetty ostoskori voi ..."
-#: ./browser/templates/cart-container.pt:27
+#: ./profiles/default/actions.xml
+msgid "Show list of orders."
+msgstr "Näytä tilauksien lista."
+
+#: ./browser/templates/orders.pt:26
msgid "State"
msgstr "Tila"
@@ -170,15 +178,15 @@ msgstr "Lähetetty tilaan"
msgid "The cart ID is already in use."
msgstr "Sama ostoskoritunnus on jo olemassa."
-#: ./browser/templates/cart-container.pt:14
+#: ./browser/templates/orders.pt:14
msgid "The next cart ID: ${next_cart_id}"
msgstr "Seuraava ostoskoritunnus: ${next_cart_id}"
#: ./browser/viewlets/cart-content.pt:2
msgid "There are no articles within this cart."
msgstr "Tässä ostoskorissa ei ole yhtään tuotetta."
-#: ./browser/templates/cart-container.pt:16
+#: ./browser/templates/orders.pt:16
msgid "There are no carts."
msgstr "Ei ole ostoskoria."
View
@@ -0,0 +1,34 @@
+[buildout]
+extends =
+ https://raw.github.com/collective/buildout.plonetest/master/travis-4.2.x.cfg
+
+allow-hosts =
+ *.plone.org
+ *.python.org
+ *.zope.org
+ abita.fi
+ docutils.sourceforge.net
+ effbot.org
+ prdownloads.sourceforge.net
+
+find-links += http://abita.fi/packages
+
+package-name = collective.cart.core
+
+versions = versions
+
+[versions]
+Pillow = 1.7.8
+collective.behavior.salable = 0.3
+collective.cart.core = 0.5.2.4
+five.pt = 2.2.1
+hexagonit.testing = 1.2.2
+mock = 1.0.1
+zope.pagetemplate = 3.6.3
+
+[test]
+eggs =
+ Pillow
+ ${buildout:package-name}
+ ${buildout:package-extras}
+ ${buildout:test-eggs}

0 comments on commit 6ef1a82

Please sign in to comment.