Repository: nephila/djangocms-installer
Pull request #256 (2016-05-17 19:03:06)

Merge 254
Merge #254 


Patch:
diff --git a/djangocms_installer/config/__init__.py b/djangocms_installer/config/__init__.py
index b7665c4..a275e2c 100644
--- a/djangocms_installer/config/__init__.py
+++ b/djangocms_installer/config/__init__.py
@@ -285,6 +285,8 @@ def parse(args):
                     requirements.extend(data.REQUIREMENTS['plugins-basic-master'])
             if cms_version == 3:
                 requirements.extend(data.REQUIREMENTS['ckeditor-3.0'])
+            elif cms_version >= 3.3 or cms_version == 'rc':
+                requirements.extend(data.REQUIREMENTS['ckeditor-3.3'])
             elif cms_version >= 3.2:
                 requirements.extend(data.REQUIREMENTS['ckeditor-3.2'])
             elif cms_version == 3.1:
diff --git a/djangocms_installer/config/data.py b/djangocms_installer/config/data.py
index 7dfa39e..48b0826 100644
--- a/djangocms_installer/config/data.py
+++ b/djangocms_installer/config/data.py
@@ -12,17 +12,17 @@ CONFIGURABLE_OPTIONS = ['--db', '--cms-version', '--django-version', '--i18n',
                         '--starting-page']
 
 DJANGOCMS_DEVELOP = 'https://github.com/divio/django-cms/archive/develop.zip?%s' % time.time()
-DJANGOCMS_RC = 'https://github.com/divio/django-cms/archive/3.0c2.zip'
+DJANGOCMS_RC = 'https://github.com/divio/django-cms/archive/develop.zip?%s' % time.time()
 DJANGOCMS_BETA = 'https://github.com/divio/django-cms/archive/3.0.0.beta3.zip'
 
 if sys.version_info < (2, 7):
     DJANGOCMS_SUPPORTED = ('2.4', '3.0', '3.1', '3.2', 'stable', 'develop')
     DJANGOCMS_STABLE = 3.2
 elif sys.version_info >= (3, 5):
-    DJANGOCMS_SUPPORTED = ('3.0', '3.1', '3.2', 'stable', 'develop')
+    DJANGOCMS_SUPPORTED = ('3.0', '3.1', '3.2', 'stable', 'rc', 'develop')
     DJANGOCMS_STABLE = 3.2
 else:
-    DJANGOCMS_SUPPORTED = ('2.4', '3.0', '3.1', '3.2', 'stable', 'develop')
+    DJANGOCMS_SUPPORTED = ('2.4', '3.0', '3.1', '3.2', 'stable', 'rc', 'develop')
     DJANGOCMS_STABLE = 3.2
 
 DJANGO_DEVELOP = 'https://github.com/django/django/archive/master.zip?%s' % time.time()
@@ -45,9 +45,9 @@ else:
 
 CMS_VERSION_MATRIX = {
     'stable': DJANGOCMS_STABLE,
-    'rc': 3.2,
-    'beta': 3.2,
-    'develop': 3.2
+    'rc': 3.3,
+    'beta': 3.3,
+    'develop': 3.3
 }
 DJANGO_VERSION_MATRIX = {
     'stable': DJANGO_STABLE,
@@ -60,6 +60,7 @@ VERSION_MATRIX = {
     3.0: (1.4, 1.7),
     3.1: (1.6, 1.8),
     3.2: (1.6, 1.9),
+    3.3: (1.8, 1.9),
 }
 
 REQUIREMENTS = {
@@ -129,6 +130,10 @@ REQUIREMENTS = {
         'djangocms-admin-style>=1.0.6',
         'djangocms-text-ckeditor>=2.8.1',
     ],
+    'ckeditor-3.3': [
+        'djangocms-admin-style>=1.1.1',
+        'https://github.com/divio/djangocms-text-ckeditor/archive/develop.zip'
+    ],
     'plugins-common': [
         'djangocms-column',
         'djangocms-googlemap',
diff --git a/docs/libraries.rst b/docs/libraries.rst
index e025c60..a7d4241 100644
--- a/docs/libraries.rst
+++ b/docs/libraries.rst
@@ -37,7 +37,7 @@ Debian / Ubuntu
 ---------------
 
 * Pillow: ``sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev``
-* Postgres: ``sudo apt-get install libqd-dev``
+* Postgres: ``sudo apt-get install libpq-dev``
 * MySQL: ``sudo apt-get install libmysqlclient-dev``
 
 


Test patch:
diff --git a/tests/config.py b/tests/config.py
index a715823..14020ff 100644
--- a/tests/config.py
+++ b/tests/config.py
@@ -317,9 +317,7 @@ class TestConfig(BaseTestClass):
             self.assertEqual(supported_versions('stable', 'stable'), (1.6, 3.2))
             self.assertEqual(supported_versions('stable', '3.0'), (1.6, 3.0))
             self.assertEqual(supported_versions('stable', '3.0.10'), (1.6, None))
-            self.assertEqual(supported_versions('stable', 'rc'), (1.6, 3.2))
-            self.assertEqual(supported_versions('stable', 'beta'), (1.6, 3.2))
-            self.assertEqual(supported_versions('stable', 'develop'), (1.6, 3.2))
+            self.assertEqual(supported_versions('stable', '3.2'), (1.6, 3.2))
 
             with self.assertRaises(RuntimeError):
                 supported_versions('stable', '2.4'), (1.5, 2.4)
@@ -336,9 +334,9 @@ class TestConfig(BaseTestClass):
             self.assertEqual(supported_versions('stable', 'stable'), (1.8, 3.2))
             self.assertEqual(supported_versions('stable', '3.1'), (1.8, 3.1))
             self.assertEqual(supported_versions('stable', '3.0.10'), (1.8, None))
-            self.assertEqual(supported_versions('stable', 'rc'), (1.8, 3.2))
-            self.assertEqual(supported_versions('stable', 'beta'), (1.8, 3.2))
-            self.assertEqual(supported_versions('stable', 'develop'), (1.8, 3.2))
+            self.assertEqual(supported_versions('stable', 'rc'), (1.8, 3.3))
+            self.assertEqual(supported_versions('stable', 'beta'), (1.8, 3.3))
+            self.assertEqual(supported_versions('stable', 'develop'), (1.8, 3.3))
 
             with self.assertRaises(RuntimeError):
                 supported_versions('stable', '2.4'), (1.5, 2.4)
@@ -447,7 +445,7 @@ class TestConfig(BaseTestClass):
             '-q',
             '--db=postgres://user:pwd@host/dbname',
             '--i18n=no',
-            '--cms-version=develop',
+            '--cms-version=3.2',
             '--django-version=stable',
             '-f',
             '--apphooks-reload',
@@ -455,7 +453,6 @@ class TestConfig(BaseTestClass):
             '-p'+self.project_dir,
             'example_prj'])
 
-        self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1)
         if sys.version_info < (2, 7):
             self.assertTrue(conf_data.requirements.find('Django<1.7') > -1)
             self.assertTrue(conf_data.requirements.find('django-reversion>=1.8,<1.9') > -1)
@@ -486,14 +483,13 @@ class TestConfig(BaseTestClass):
             '-q',
             '--db=postgres://user:pwd@host/dbname',
             '--i18n=no',
-            '--cms-version=develop',
+            '--cms-version=3.2',
             '--django-version={0}'.format(dj_version),
             '-f',
             '--reversion=yes',
             '-p'+self.project_dir,
             'example_prj'])
 
-        self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1)
         if sys.version_info < (2, 7):
             self.assertTrue(conf_data.requirements.find('Django<1.7') > -1)
             self.assertTrue(conf_data.requirements.find('django-reversion>=1.8,<1.9') > -1)
@@ -503,92 +499,90 @@ class TestConfig(BaseTestClass):
         self.assertTrue(conf_data.requirements.find('django-mptt<0.9') >= -1)
         self.assertTrue(conf_data.requirements.find('django-treebeard') > -1)
 
-        conf_data = config.parse([
-            '-q',
-            '--db=postgres://user:pwd@host/dbname',
-            '--i18n=no',
-            '--cms-version=develop',
-            '--django-version=stable',
-            '-f',
-            '--reversion=yes',
-            '-z=yes',
-            '-p'+self.project_dir,
-            'example_prj'])
+        # develop is not supported in python 2.6
+        if sys.version_info >= (2, 7):
+            conf_data = config.parse([
+                '-q',
+                '--db=postgres://user:pwd@host/dbname',
+                '--i18n=no',
+                '--cms-version=develop',
+                '--django-version=stable',
+                '-f',
+                '--reversion=yes',
+                '-z=yes',
+                '-p'+self.project_dir,
+                'example_prj'])
 
-        self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1)
-        if sys.version_info < (2, 7):
-            self.assertTrue(conf_data.requirements.find('Django<1.7') > -1)
-            self.assertTrue(conf_data.requirements.find('django-reversion>=1.8,<1.9') > -1)
-        else:
+            self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1)
             self.assertTrue(conf_data.requirements.find('Django<1.9') > -1)
             self.assertTrue(conf_data.requirements.find('django-reversion>=1.8.7') > -1)
-        self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor') > -1)
-        self.assertTrue(conf_data.requirements.find('djangocms-admin-style') > -1)
-        self.assertTrue(conf_data.requirements.find('pytz') > -1)
-
-        if sys.version_info < (2, 7):
-            dj_version = '1.6'
-        else:
-            dj_version = '1.8'
-        conf_data = config.parse([
-            '-q',
-            '--db=postgres://user:pwd@host/dbname',
-            '--i18n=no',
-            '--cms-version=develop',
-            '--django-version={0}'.format(dj_version),
-            '--reversion=yes',
-            '-z=yes',
-            '-p'+self.project_dir,
-            'example_prj'])
+            self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor/archive/develop') > -1)
+            self.assertTrue(conf_data.requirements.find('djangocms-admin-style') > -1)
+            self.assertTrue(conf_data.requirements.find('pytz') > -1)
 
-        self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1)
-        if sys.version_info < (2, 7):
-            self.assertTrue(conf_data.requirements.find('Django<1.7') > -1)
-            self.assertTrue(conf_data.requirements.find('django-reversion>=1.8,<1.9') > -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor>=2.8') > -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-admin-style>=1.0.6') > -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-teaser') > -1)
-            self.assertTrue(conf_data.requirements.find('south') > -1)
-        else:
-            self.assertTrue(conf_data.requirements.find('Django<1.9') > -1)
-            self.assertTrue(conf_data.requirements.find('django-reversion>=1.8.7') > -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor>=2.8') > -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-admin-style>=1.0.6') > -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-teaser/archive/master.zip') > -1)
-            self.assertTrue(conf_data.requirements.find('south') == -1)
+            if sys.version_info < (2, 7):
+                dj_version = '1.6'
+            else:
+                dj_version = '1.8'
+            conf_data = config.parse([
+                '-q',
+                '--db=postgres://user:pwd@host/dbname',
+                '--i18n=no',
+                '--cms-version=develop',
+                '--django-version={0}'.format(dj_version),
+                '--reversion=yes',
+                '-z=yes',
+                '-p'+self.project_dir,
+                'example_prj'])
 
-        if sys.version_info < (2, 7):
-            dj_version = '1.6'
-        else:
-            dj_version = '1.8'
-        conf_data = config.parse([
-            '-q',
-            '--db=postgres://user:pwd@host/dbname',
-            '--i18n=no',
-            '--cms-version=develop',
-            '--django-version={0}'.format(dj_version),
-            '--reversion=yes',
-            '--no-plugins',
-            '-z=yes',
-            '-p'+self.project_dir,
-            'example_prj'])
+            self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1)
+            if sys.version_info < (2, 7):
+                self.assertTrue(conf_data.requirements.find('Django<1.7') > -1)
+                self.assertTrue(conf_data.requirements.find('django-reversion>=1.8,<1.9') > -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor/archive/develop') > -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-admin-style>=1.1.1') > -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-teaser') > -1)
+                self.assertTrue(conf_data.requirements.find('south') > -1)
+            else:
+                self.assertTrue(conf_data.requirements.find('Django<1.9') > -1)
+                self.assertTrue(conf_data.requirements.find('django-reversion>=1.8.7') > -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor/archive/develop') > -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-admin-style>=1.1.1') > -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-teaser/archive/master.zip') > -1)
+                self.assertTrue(conf_data.requirements.find('south') == -1)
+
+            if sys.version_info < (2, 7):
+                dj_version = '1.6'
+            else:
+                dj_version = '1.8'
+            conf_data = config.parse([
+                '-q',
+                '--db=postgres://user:pwd@host/dbname',
+                '--i18n=no',
+                '--cms-version=develop',
+                '--django-version={0}'.format(dj_version),
+                '--reversion=yes',
+                '--no-plugins',
+                '-z=yes',
+                '-p'+self.project_dir,
+                'example_prj'])
 
-        self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1)
-        if sys.version_info < (2, 7):
-            self.assertTrue(conf_data.requirements.find('Django<1.7') > -1)
-            self.assertTrue(conf_data.requirements.find('django-reversion>=1.8,<1.9') > -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor') == -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-admin-style') == -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-teaser') == -1)
-            self.assertTrue(conf_data.requirements.find('south') > -1)
-        else:
-            self.assertTrue(conf_data.requirements.find('Django<1.9') > -1)
-            self.assertTrue(conf_data.requirements.find('django-reversion>=1.8.7') > -1)
-            self.assertTrue(conf_data.requirements.find('django-mptt<0.9') > -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor/archive/master.zip') == -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-admin-style/archive/master.zip') == -1)
-            self.assertTrue(conf_data.requirements.find('djangocms-teaser/archive/master.zip') == -1)
-            self.assertTrue(conf_data.requirements.find('south') == -1)
+            self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1)
+            if sys.version_info < (2, 7):
+                self.assertTrue(conf_data.requirements.find('Django<1.7') > -1)
+                self.assertTrue(conf_data.requirements.find('django-reversion>=1.8,<1.9') > -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor') == -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-admin-style') == -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-teaser') == -1)
+                self.assertTrue(conf_data.requirements.find('south') > -1)
+            else:
+                self.assertTrue(conf_data.requirements.find('Django<1.9') > -1)
+                self.assertTrue(conf_data.requirements.find('django-reversion>=1.8.7') > -1)
+                self.assertTrue(conf_data.requirements.find('django-mptt<0.9') > -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor/archive/master.zip') == -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-admin-style/archive/master.zip') == -1)
+                self.assertTrue(conf_data.requirements.find('djangocms-teaser/archive/master.zip') == -1)
+                self.assertTrue(conf_data.requirements.find('south') == -1)
 
     def disabled_test_aldryn_compatibility(self):
         with patch('sys.stdout', self.stdout):
diff --git a/tests/django.py b/tests/django.py
index 481187c..b624e6f 100644
--- a/tests/django.py
+++ b/tests/django.py
@@ -272,7 +272,7 @@ class TestDjango(IsolatedTestClass):
                      reason="django 1.7 only supports python 2.6, 2.7, 3.3, 3.4")
     def test_patch_31(self):
         config_data = config.parse(['--db=sqlite://localhost/test.db',
-                                    '--lang=en', '--cms=develop',
+                                    '--lang=en', '--cms=3.1',
                                     '--django-version=1.6',
                                     '--timezone=Europe/Moscow',
                                     '-f', '-q', '-u', '-zno', '--i18n=no',
@@ -300,7 +300,7 @@ class TestDjango(IsolatedTestClass):
         config_data = config.parse(['--db=sqlite://localhost/test.db',
                                     '--lang=en', '--extra-settings=%s' % extra_path,
                                     '--django-version=1.7', '-f',
-                                    '--cms-version=develop', '--timezone=Europe/Moscow',
+                                    '--cms-version=3.1', '--timezone=Europe/Moscow',
                                     '-q', '-u', '-zno', '--i18n=no',
                                     '-p' + self.project_dir, 'example_path_17_31_settings'])
         install.requirements(config_data.requirements)