Permalink
Browse files

Merge remote-tracking branch 'origin/master' into Jcrop-0.9.12

Conflicts:
	CHANGES.txt
  • Loading branch information...
2 parents 8ab2df7 + 9404fe3 commit 383b27a629767091fba1d9ea6c483e0afe5a3c15 @saily saily committed Jun 12, 2014
Showing with 1,162 additions and 919 deletions.
  1. +8 −0 .coveragerc
  2. +24 −22 .gitignore
  3. +22 −16 .travis.yml
  4. +31 −2 CHANGES.txt
  5. +4 −0 README.rst
  6. +62 −28 buildout.cfg
  7. +0 −60 instance-4.3.cfg
  8. +45 −51 setup.py
  9. +1 −0 src/__init__.py
  10. +1 −0 src/plone/__init__.py
  11. +1 −0 src/plone/app/__init__.py
  12. +4 −4 src/plone/app/imagecropping/Extensions/Install.py
  13. +3 −6 src/plone/app/imagecropping/__init__.py
  14. +1 −0 src/plone/app/imagecropping/browser/__init__.py
  15. +26 −10 src/plone/app/imagecropping/browser/configure.zcml
  16. +7 −7 src/plone/app/imagecropping/browser/crop.py
  17. +133 −118 src/plone/app/imagecropping/browser/editor.pt
  18. +60 −51 src/plone/app/imagecropping/browser/editor.py
  19. +81 −0 src/plone/app/imagecropping/browser/scaling.py
  20. +36 −45 src/plone/app/imagecropping/browser/settings.py
  21. +92 −96 src/plone/app/imagecropping/browser/static/cropping.js
  22. +64 −58 src/plone/app/imagecropping/configure.zcml
  23. +4 −3 src/plone/app/imagecropping/interfaces.py
  24. +28 −17 src/plone/app/imagecropping/locales/de/LC_MESSAGES/plone.app.imagecropping.po
  25. +19 −13 src/plone/app/imagecropping/locales/en/LC_MESSAGES/plone.app.imagecropping.po
  26. +19 −13 src/plone/app/imagecropping/locales/es/LC_MESSAGES/plone.app.imagecropping.po
  27. +19 −13 src/plone/app/imagecropping/locales/nl/LC_MESSAGES/plone.app.imagecropping.po
  28. +30 −24 src/plone/app/imagecropping/locales/plone.app.imagecropping.pot
  29. +19 −13 src/plone/app/imagecropping/locales/pt_BR/LC_MESSAGES/plone.app.imagecropping.po
  30. +19 −13 src/plone/app/imagecropping/locales/ru/LC_MESSAGES/plone.app.imagecropping.po
  31. +0 −1 src/plone/app/imagecropping/profiles/testing/types/dexterity_content_type_with_two_image_fields.xml
  32. +4 −2 src/plone/app/imagecropping/setuphandler.py
  33. +16 −13 src/plone/app/imagecropping/testing.py
  34. +13 −11 src/plone/app/imagecropping/testing.zcml
  35. +1 −0 src/plone/app/imagecropping/tests/__init__.py
  36. +27 −67 src/plone/app/imagecropping/tests/robot/keywords.robot
  37. +24 −26 src/plone/app/imagecropping/tests/robot/test_imagecropping.robot
  38. +0 −36 src/plone/app/imagecropping/tests/robot/test_imagecropping_for_dexterity_set_fields.robot
  39. +8 −8 src/plone/app/imagecropping/tests/test_controlpanel.py
  40. +105 −23 src/plone/app/imagecropping/tests/test_cropping.py
  41. +25 −16 src/plone/app/imagecropping/tests/test_editor.py
  42. +3 −2 src/plone/app/imagecropping/tests/test_setup.py
  43. +32 −6 src/plone/app/imagecropping/utils.py
  44. +14 −1 test-4.2.cfg
  45. +14 −0 test-4.3.cfg
  46. +2 −6 test-4.1.cfg → test-5.0.cfg
  47. +11 −18 travis.cfg
View
@@ -0,0 +1,8 @@
+[report]
+omit =
+ /home/*/.buildout/eggs/*
+ /usr/*
+ bin/test
+ buildout-cache/eggs/*
+ eggs/*
+ parts/*
View
@@ -3,38 +3,40 @@
# Packages
*.egg
*.egg-info
-dist
-build
-eggs
-parts
-bin
-var
-sdist
-develop-eggs
-.installed.cfg
+/dist
+/build
+/eggs
+/parts
+/bin
+/var
+/sdist
+/develop-eggs
# Installer logs
pip-log.txt
# Unit test / coverage reports
-.coverage
-.tox
+/.coverage
+/.tox
+/htmlcov
-#Translations
+# Translations
*.mo
-#Mr Developer
-.mr.developer.cfg
-.installed.cfg
-.project
-.pydevproject
-.settings
+# mr.developer
+/.mr.developer.cfg
+/.installed.cfg
+# developement
+/.project
+/.pydevproject
+/.settings
.DS_Store
+*.swp
+local.cfg
# virtualenv
-include
-lib
+/include
+/lib
+/.Python
-# Local development
-local.cfg
View
@@ -1,27 +1,33 @@
language: python
-python:
- - 2.6
- - 2.7
+python: 2.7
env:
- - PLONE_VERSION=4.1
- PLONE_VERSION=4.2
- PLONE_VERSION=4.3
+ - PLONE_VERSION=5.0
matrix:
- exclude:
- - python: 2.7
- env: PLONE_VERSION=4.1
- - python: 2.6
- env: PLONE_VERSION=4.2
- - python: 2.6
- env: PLONE_VERSION=4.3
+ allow_failures:
+ - env: PLONE_VERSION=4.2
+ - env: PLONE_VERSION=5.0
before_install:
- sudo apt-get install -y libjpeg-dev libgif-dev libpng-dev libz-dev
-install:
- - sed -ie "s#travis-4.x.cfg#travis-$PLONE_VERSION.x.cfg#" travis.cfg
- mkdir -p buildout-cache/downloads
- - python bootstrap.py -c travis.cfg -v 2.1.1
- - bin/buildout -c travis.cfg -N -q -t 3
+ - mkdir -p buildout-cache/eggs
+install:
+ - sed -ie "s#test-4.3.cfg#test-$PLONE_VERSION.cfg#" buildout.cfg
+ - python bootstrap.py -c travis.cfg
+ - bin/buildout -t 10 -Nc travis.cfg
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
-script: bin/test
+script:
+ - bin/code-analysis
+ - bin/test
+after_success:
+ - bin/createcoverage run bin/test
+ - pip install -q coveralls
+ - coveralls
+after_failure:
+ - bin/csslint --version
+ - bin/jshint --version
+ - bin/jscs --version
+ - firefox -v
View
@@ -7,8 +7,32 @@ Changelog
- Update Jcrop to version 0.9.12.
[hvelarde]
-- Check for plone.namedfile not Dexterity. It can be used seperately
- [tom_gross]
+- Use ``plone.app.robotframework`` instead of writing all keywords from
+ scratch. This brings us autologin support for faster robot tests. Rewrite
+ tests to test scenarios.
+ [saily]
+
+- Drop Plone 4.1 support and tests.
+ [saily]
+
+- Cleanup code, align to all coding conventions for Plone.
+ Pep8, Flake8, pep3101, sort imports, remove grouped imports, ...
+ [saily]
+
+- Cleanup/refactor javascript code, don't define global variables.
+ [saily]
+
+- Add coveralls, code-analysis and update travis configuration.
+ [saily]
+
+- Check for plone.namedfile not Dexterity. It can be used seperately.
+ *If plone.namedfile is used it needs to be at least version 2.0.1*
+ [tomgross]
+
+- ``@@croppingeditor`` now displays a message to add croppable scales
+ in the controlpanel if there are no croppable scales to show.
+ (previously this caused a `SiteError`)
+ [fRiSi]
- Rename ``imagecropping_keywords.txt`` to ``keywords.robot`` to allow simple
reusage in ``plone.app.robotframework``.
@@ -23,6 +47,11 @@ Changelog
- Prevent fieldname loosing for for current field
[bogdangi]
+- Fixed #21 (cropping was reset on modifying image)
+ [tomgross, fRiSi]
+
+- Only test Plone 4.2 and 4.3 with Python 2.7 on Travis-CI
+ [tomgross]
0.1rc2 (2013-05-03)
-------------------
View
@@ -1,6 +1,9 @@
.. image:: https://travis-ci.org/collective/plone.app.imagecropping.png?branch=master
:target: http://travis-ci.org/collective/plone.app.imagecropping
+.. image:: https://coveralls.io/repos/collective/plone.app.imagecropping/badge.png
+ :target: https://coveralls.io/r/collective/plone.app.imagecropping
+
.. contents::
History
@@ -86,6 +89,7 @@ some javascript. For example::
})
$(document).bind("formOverlayLoadSuccess", function() {
+ imagecropping = new ImageCropping();
imagecropping.init_editor();
})
})
View
@@ -1,38 +1,27 @@
[buildout]
-extends =
- https://raw.github.com/collective/buildout.plonetest/master/test-4.2.x.cfg
-
-package-name = plone.app.imagecropping
-package-extras = [test]
-
-#index = http://c.pypi.python.org
-
+extends = test-4.3.cfg
parts +=
- omelette
- i18ndude
+ packages
rebuild_pot
-
-eggs +=
- plone.app.dexterity [grok]
- plone.app.contenttypes
- plone.reload
-
-test-eggs +=
- Products.ATContentTypes [test]
- plone.app.contenttypes [test]
- plone.app.dexterity [test]
- decorator
- selenium
+ node
+ extras
+ code-analysis
+ createcoverage
versions = versions
-[omelette]
+
+[packages]
recipe = collective.recipe.omelette
eggs = ${instance:eggs} ${buildout:test-eggs}
-[i18ndude]
+
+[extras]
recipe = zc.recipe.egg
-eggs = i18ndude
+eggs =
+ i18ndude
+ zptlint
+
[rebuild_pot]
recipe = collective.recipe.template
@@ -42,16 +31,61 @@ input = inline:
DOMAIN="plone.app.imagecropping"
BASE_PATH=${buildout:directory}/src/plone/app/imagecropping
touch $BASE_PATH/locales/$DOMAIN.pot
- ${buildout:directory}/bin/i18ndude rebuild-pot --pot $BASE_PATH/locales/$DOMAIN.pot --create $DOMAIN ${buildout:directory}/src/
+ ${buildout:directory}/bin/i18ndude rebuild-pot \
+ --pot $BASE_PATH/locales/$DOMAIN.pot \
+ --create $DOMAIN ${buildout:directory}/src/
cd $BASE_PATH
# sync all locales
find locales -maxdepth 1 -mindepth 1 -type d \
| grep -v .svn \
| sed -e "s/locales\/\(.*\)$/\1/" \
- | xargs -I % ${buildout:directory}/bin/i18ndude sync --pot $BASE_PATH/locales/$DOMAIN.pot $BASE_PATH/locales/%/LC_MESSAGES/$DOMAIN.po
+ | xargs -I % ${buildout:directory}/bin/i18ndude sync \
+ --pot $BASE_PATH/locales/$DOMAIN.pot $BASE_PATH/locales/%/LC_MESSAGES/$DOMAIN.po
cd -
mode = 755
+
+[node]
+recipe = gp.recipe.node
+npms = csslint jshint jscs
+scripts = csslint jshint jscs
+
+
+[code-analysis]
+recipe = plone.recipe.codeanalysis
+directory = ${buildout:directory}/src/plone/app/imagecropping
+pre-commit-hook = True
+clean-lines = True
+csslint = True
+csslint-bin = ${buildout:bin-directory}/csslint
+debug-statements = True
+deprecated-aliases = True
+flake8-max-complexity = 12
+imports = True
+jscs = True
+jscs-bin = ${buildout:bin-directory}/jscs
+jscs-exclude =
+ src/plone/app/imagecropping/browser/static/jquery.Jcrop.min.js
+jshint = True
+jshint-bin = ${buildout:bin-directory}/jshint
+jshint-exclude = ${code-analysis:jscs-exclude}
+pep3101 = True
+prefer-single-quotes = True
+return-status-codes = False
+utf8-header = True
+find-untranslated = True
+i18ndude-bin = ${buildout:bin-directory}/i18ndude
+zptlint = True
+zptlint-bin = ${buildout:bin-directory}/zptlint
+
+
+[createcoverage]
+recipe = zc.recipe.egg
+eggs = createcoverage
+
+
[versions]
-plone.app.collection = 2.0b5
+Pillow = 2.4.0
+selenium = 2.40.0
+plone.app.robotframework = 0.9.2
View
@@ -1,60 +0,0 @@
-[buildout]
-extensions = mr.developer
-
-extends =
- https://raw.github.com/collective/buildout.plonetest/master/test-4.3.x.cfg
-
-package-name = plone.app.imagecropping
-package-extras = [test]
-
-#index = http://c.pypi.python.org
-
-parts +=
- omelette
- i18ndude
- rebuild_pot
-
-eggs +=
- plone.app.dexterity [grok]
- plone.app.contenttypes
- plone.reload
-
-test-eggs +=
- Products.ATContentTypes [test]
- plone.app.contenttypes [test]
- plone.app.dexterity [test]
-
-versions = versions
-
-[test]
-defaults = ['-s', '${buildout:package-name}', '--auto-color', '--auto-progress']
-
-[omelette]
-recipe = collective.recipe.omelette
-eggs = ${instance:eggs} ${buildout:test-eggs}
-
-[i18ndude]
-recipe = zc.recipe.egg
-eggs = i18ndude
-
-[rebuild_pot]
-recipe = collective.recipe.template
-output = ${buildout:directory}/bin/rebuild_pot
-input = inline:
- #!/bin/bash
- DOMAIN="plone.app.imagecropping"
- BASE_PATH=${buildout:directory}/src/plone/app/imagecropping
- touch $BASE_PATH/locales/$DOMAIN.pot
- ${buildout:directory}/bin/i18ndude rebuild-pot --pot $BASE_PATH/locales/$DOMAIN.pot --create $DOMAIN ${buildout:directory}/src/
-
- cd $BASE_PATH
- # sync all locales
- find locales -maxdepth 1 -mindepth 1 -type d \
- | grep -v .svn \
- | sed -e "s/locales\/\(.*\)$/\1/" \
- | xargs -I % ${buildout:directory}/bin/i18ndude sync --pot $BASE_PATH/locales/$DOMAIN.pot $BASE_PATH/locales/%/LC_MESSAGES/$DOMAIN.po
- cd -
-mode = 755
-
-[versions]
-plone.app.collection = 2.0b5
Oops, something went wrong.

0 comments on commit 383b27a

Please sign in to comment.