Self hosted FLOSS fitness/workout, nutrition and weight tracker
Add travis CI configuration file
Roland Geider2dfd31cb1c26
diff --git a/.travis.yml b/.travis.ymlnew file mode 100644index 000000000..c7e06c183--- /dev/null+++ b/.travis.yml@@ -0,0 +1,9 @@+language: python+python:+ - "2.6"+ - "2.7"+install:+ - pip install -r requirements.txt --use-mirrors+ - python extras/scripts/create_local_settings.py+script:+ - ./manage.py test testsdiff --git a/extras/scripts/create_local_settings.py b/extras/scripts/create_local_settings.pynew file mode 100644index 000000000..170526713--- /dev/null+++ b/extras/scripts/create_local_settings.py@@ -0,0 +1,15 @@+#!/usr/bin/env python+# -*- coding: utf-8 -*-++import os+import sys++script_path = os.path.realpath(os.path.dirname(__file__))+sys.path.append(os.path.join(script_path, '..', '..'))++from wger.main import create_settings++if __name__ == "__main__":+ cwd = os.getcwd()+ create_settings(os.path.join(cwd, 'settings.py'),+ os.path.join(cwd, 'database.sqlite'))diff --git a/main.py b/wger/main.pysimilarity index 97%rename from main.pyrename to wger/main.pyindex 5b4c9b87e..1cbd0745d 100755--- a/main.py+++ b/wger/main.py@@ -188,16 +188,16 @@ def create_settings(settings_path, database_path=None, url=None):if database_path is _portable_db_path:database_path = get_portable_db_path()- dbpath_value = 'openslides.main.get_portable_db_path()'+ dbpath_value = 'wger.main.get_portable_db_path()'else:if database_path is None:database_path = get_user_data_path('wger', 'database.sqlite')dbpath_value = repr(fs2unicode(database_path))- print "Please enter the values for your reCaptcha keys "+ print "Please edit your settings file and enter the values for the reCaptcha keys "print "You can leave this empty, but won't be able to register new users"- recaptcha_public_key = raw_input('Public key: ')- recaptcha_private_key = raw_input('Private key: ')+ #recaptcha_public_key = raw_input('Public key: ')+ #recaptcha_private_key = raw_input('Private key: ')# Fill in the config file templatesettings_content = CONFIG_TEMPLATE % dict(