changeset 2361:7fefa0b9afa5

Merged thomaswaldmann/moin-2.0 into default
author sharky93 <rishabhr123@gmail.com>
date Sun, 04 Aug 2013 23:53:41 +0530
parents ed7810b85661 (current diff) c97b585121fb (diff)
children 1d461ab9df80
files
diffstat 7 files changed, 24 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_wikiutil.py	Mon Jul 29 17:13:39 2013 +0530
+++ b/MoinMoin/_tests/test_wikiutil.py	Sun Aug 04 23:53:41 2013 +0530
@@ -33,7 +33,8 @@
     def test_anchor_name_encoding(self):
         tests = [
             # text, expected output
-            (u'\xf6\xf6ll\xdf\xdf', 'A_APYA9g-ll_AN8A3w-'),
+            # note: recent werkzeug encodes a "+" to %2B, giving .2B in the end
+            (u'\xf6\xf6ll\xdf\xdf', 'A.2BAPYA9g-ll.2BAN8A3w-'),
             (u'level 2', 'level_2'),
             (u'level_2', 'level_2'),
             (u'', 'A'),
--- a/MoinMoin/converter/_tests/test_docbook_in.py	Mon Jul 29 17:13:39 2013 +0530
+++ b/MoinMoin/converter/_tests/test_docbook_in.py	Sun Aug 04 23:53:41 2013 +0530
@@ -256,13 +256,13 @@
     def test_link(self):
         data = [
             # Normal link, with conversion of all the xlink attributes
-            ('<article><para><link xlink:href="uri:test" xlink:title="title">link</link></para></article>',
-                # <page><body><div html:class="article"><p><a xlink:href="uri:test" xlink:title="title">link</a></p></div></body></page>
-                '/page/body/div/p/a[@xlink:href="uri:test"][@xlink:title="title"][text()="link"]'),
+            ('<article><para><link xlink:href="http:test" xlink:title="title">link</link></para></article>',
+                # <page><body><div html:class="article"><p><a xlink:href="http:test" xlink:title="title">link</a></p></div></body></page>
+                '/page/body/div/p/a[@xlink:href="http:test"][@xlink:title="title"][text()="link"]'),
             # Old link from DocBook v.4.X for backward compatibility
-            ('<article><para><ulink url="url:test">link</ulink></para></article>',
-                # <page><body><div html:class="article"><p><a xlink:href="url:test">link</a></p></div></body></page>
-                '/page/body/div/p/a[@xlink:href="url:test"][text()="link"]'),
+            ('<article><para><ulink url="http:test">link</ulink></para></article>',
+                # <page><body><div html:class="article"><p><a xlink:href="http:test">link</a></p></div></body></page>
+                '/page/body/div/p/a[@xlink:href="http:test"][text()="link"]'),
             # Normal link, with linkend attribute
             ('<article><para><link linkend="anchor">link</link></para></article>',
                 # <page><body><div html:class="article"><p><a xlink:href="#anchor">link</a></p></div></body></page>
@@ -273,8 +273,10 @@
                 '/page/body/div/p/a[@xlink:href="uri#anchor"][text()="link"]'),
             # Link w/ javascript: scheme
             ('<article><para><ulink url="javascript:alert(\'xss\')">link</ulink></para></article>',
-                # <page><body><div html:class="article"><p><a xlink:href="url:test">link</a></p></div></body></page>
-                '/page/body/div/p/a[@xlink:href=""][text()="link"]'),
+                # the href attribute will default to None because javascript is not an allowed url scheme
+                # we don't care how it gets rendered as long as the javascript doesn't show up
+                # <page><body><div html:class="article"><p><a xlink:href="None">link</a></p></div></body></page>
+                '/page/body/div/p/a[@xlink:href="None"][text()="link"]'),
         ]
         for i in data:
             yield (self.do, ) + i
--- a/MoinMoin/macro/_tests/test_Date.py	Mon Jul 29 17:13:39 2013 +0530
+++ b/MoinMoin/macro/_tests/test_Date.py	Sun Aug 04 23:53:41 2013 +0530
@@ -22,7 +22,7 @@
         expected = 1312695491.0
         assert result == expected
         result = format_datetime(datetime.utcfromtimestamp(result))
-        expected = u'Aug 7, 2011 5:38:11 AM'
+        expected = u'Aug 7, 2011, 5:38:11 AM'  # comma after year was added in recent CLDR
         assert result == expected
         with pytest.raises(ValueError):
             # things after next 10,000 years can't be predicted
--- a/MoinMoin/macro/_tests/test_DateTime.py	Mon Jul 29 17:13:39 2013 +0530
+++ b/MoinMoin/macro/_tests/test_DateTime.py	Sun Aug 04 23:53:41 2013 +0530
@@ -26,7 +26,7 @@
 
     arguments = ['2011-08-07T11:11:11', 'argument2']
     result = macro_obj.macro('content', arguments, 'page_url', 'alternative')
-    expected = u'Aug 7, 2011 11:11:11 AM'
+    expected = u'Aug 7, 2011, 11:11:11 AM'  # comma after year was added in recent CLDR
     assert result == expected
 
     arguments = ['incorrect_argument']
--- a/MoinMoin/translations/pt_BR/LC_MESSAGES/messages.po	Mon Jul 29 17:13:39 2013 +0530
+++ b/MoinMoin/translations/pt_BR/LC_MESSAGES/messages.po	Sun Aug 04 23:53:41 2013 +0530
@@ -1258,7 +1258,7 @@
 #: MoinMoin/templates/destroy.html:20
 #, fuzzy, python-format
 msgid "DESTROY REVISION '%(item_name)s' (rev %(rev_id)s)"
-msgstr "Reverter '%(item_name)s' (rev %(rev_no)d)"
+msgstr "Reverter '%(item_name)s' (rev %(rev_id)s)"
 
 #: MoinMoin/templates/diff.html:4
 #, fuzzy, python-format
@@ -1614,7 +1614,7 @@
 #: MoinMoin/templates/revert.html:4
 #, fuzzy, python-format
 msgid "Revert '%(item_name)s' (rev %(rev_id)s)"
-msgstr "Reverter '%(item_name)s' (rev %(rev_no)d)"
+msgstr "Reverter '%(item_name)s' (rev %(rev_id)s)"
 
 #: MoinMoin/templates/search.html:16
 #, python-format
@@ -1644,7 +1644,7 @@
 #: MoinMoin/templates/search.html:59
 #, fuzzy, python-format
 msgid "Revision: %(revid)s Last Change: %(mtime)s"
-msgstr "Revisão %(revno)d em %(date_time)s"
+msgstr "Revisão %(revid)s em %(mtime)s"
 
 #: MoinMoin/templates/search.html:67
 msgid "You don't have read permission for this item."
@@ -1685,7 +1685,7 @@
 #: MoinMoin/templates/show_nonexistent.html:5
 #, fuzzy, python-format
 msgid "Item '%(name)s' does not exist."
-msgstr "%(item_name)s não existe. Criar?"
+msgstr "%(name)s não existe. Criar?"
 
 #: MoinMoin/templates/sitemap.html:3
 #, fuzzy, python-format
--- a/MoinMoin/translations/ru/LC_MESSAGES/messages.po	Mon Jul 29 17:13:39 2013 +0530
+++ b/MoinMoin/translations/ru/LC_MESSAGES/messages.po	Sun Aug 04 23:53:41 2013 +0530
@@ -1255,7 +1255,7 @@
 #: MoinMoin/templates/destroy.html:20
 #, fuzzy, python-format
 msgid "DESTROY REVISION '%(item_name)s' (rev %(rev_id)s)"
-msgstr "Вернуть «%(item_name)s» (вер. %(rev_no)d)"
+msgstr "Вернуть «%(item_name)s» (вер. %(rev_id)s)"
 
 #: MoinMoin/templates/diff.html:4
 #, fuzzy, python-format
@@ -1613,7 +1613,7 @@
 #: MoinMoin/templates/revert.html:4
 #, fuzzy, python-format
 msgid "Revert '%(item_name)s' (rev %(rev_id)s)"
-msgstr "Вернуть «%(item_name)s» (вер. %(rev_no)d)"
+msgstr "Вернуть «%(item_name)s» (вер. %(rev_id)s)"
 
 #: MoinMoin/templates/search.html:16
 #, python-format
@@ -1643,7 +1643,7 @@
 #: MoinMoin/templates/search.html:59
 #, fuzzy, python-format
 msgid "Revision: %(revid)s Last Change: %(mtime)s"
-msgstr "Версия: %(revno)d на момент %(date_time)s"
+msgstr "Версия: %(revid)s на момент %(mtime)s"
 
 #: MoinMoin/templates/search.html:67
 msgid "You don't have read permission for this item."
@@ -1684,7 +1684,7 @@
 #: MoinMoin/templates/show_nonexistent.html:5
 #, fuzzy, python-format
 msgid "Item '%(name)s' does not exist."
-msgstr "Объект %(item_name)s не существет. Создать его?"
+msgstr "Объект %(name)s не существет. Создать его?"
 
 #: MoinMoin/templates/sitemap.html:3
 #, fuzzy, python-format
--- a/setup.py	Mon Jul 29 17:13:39 2013 +0530
+++ b/setup.py	Sun Aug 04 23:53:41 2013 +0530
@@ -76,7 +76,7 @@
     dependency_links=[
         #'https://github.com/mitsuhiko/werkzeug/tarball/master#egg=Werkzeug-0.9.2-dev',
         #'https://github.com/mitsuhiko/flask/tarball/master#egg=Flask-0.11-dev',
-        'https://bitbucket.org/thomaswaldmann/whoosh/get/default.tar.gz#egg=Whoosh-2.5.99dev',
+        #'https://bitbucket.org/thomaswaldmann/whoosh/get/default.tar.gz#egg=Whoosh-2.5.99dev',
         # use a pre-release and fixed flask-themes 0.2.0 as 0.1.3 does not work for flask 0.8.x:
         'https://bitbucket.org/thomaswaldmann/flask-themes/get/a87399231886.tar.gz#egg=Flask-Themes-0.2.0',
         # use a pre-release emeraldtree (port to 2.6/2.7/3.3):
@@ -101,13 +101,12 @@
                               # likely due to the fixtures changes.
         'pytest-pep8<1.0.3',  # coding style checker
                               # note: pytest-pep8 1.0.3 needs pytest 2.3
-        # 'whoosh>=2.4.0',  # needed for indexed search
         'whoosh>=2.5.0',  # needed for indexed search
         'sphinx>=1.1',  # needed to build the docs
         'pdfminer',  # pdf -> text/plain conversion
         'passlib>=1.6.0',  # strong password hashing (1.6 needed for consteq)
         'XStatic>=0.0.2',  # support for static file pypi packages
-        'XStatic-Bootstrap>=2.1.0.1',
+        'XStatic-Bootstrap>=2.3.2.1',
         'XStatic-CKEditor>=3.6.1.2',
         'XStatic-jQuery>=1.8.2',
         'XStatic-jQuery-File-Upload>=4.4.2',