Add travis CI configuration file

--HG--
branch : 1.1-dev
rename : main.py => wger/main.py
This commit is contained in:
Roland Geider
2013-01-25 00:22:03 +01:00
parent b4e0ac4dea
commit 2dfd31cb1c
3 changed files with 28 additions and 4 deletions

9
.travis.yml Normal file
View File

@@ -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 tests

View File

@@ -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'))

View File

@@ -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 template
settings_content = CONFIG_TEMPLATE % dict(