@@ -6,6 +6,7 @@ env:
|
||||
- PYTHONPATH='.'
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- next
|
||||
install: pip install -r requirements.txt --use-mirrors
|
||||
script: python setup.py test --functional
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
from pecan import make_app
|
||||
from ${package} import model
|
||||
|
||||
|
||||
def setup_app(config):
|
||||
|
||||
model.init_model()
|
||||
|
||||
return make_app(
|
||||
config.app.root,
|
||||
static_root = config.app.static_root,
|
||||
template_path = config.app.template_path,
|
||||
logging = getattr(config, 'logging', {}),
|
||||
debug = getattr(config.app, 'debug', False),
|
||||
force_canonical = getattr(config.app, 'force_canonical', True)
|
||||
static_root=config.app.static_root,
|
||||
template_path=config.app.template_path,
|
||||
logging=getattr(config, 'logging', {}),
|
||||
debug=getattr(config.app, 'debug', False),
|
||||
force_canonical=getattr(config.app, 'force_canonical', True)
|
||||
)
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
# Server Specific Configurations
|
||||
server = {
|
||||
'port' : '8080',
|
||||
'host' : '0.0.0.0'
|
||||
'port': '8080',
|
||||
'host': '0.0.0.0'
|
||||
}
|
||||
|
||||
# Pecan Application Configurations
|
||||
app = {
|
||||
'root' : '${package}.controllers.root.RootController',
|
||||
'modules' : ['${package}'],
|
||||
'static_root' : '%(confdir)s/../../public',
|
||||
'template_path' : '%(confdir)s/../templates',
|
||||
'debug' : True,
|
||||
'errors' : {
|
||||
'404' : '/error/404',
|
||||
'__force_dict__' : True
|
||||
'root': '${package}.controllers.root.RootController',
|
||||
'modules': ['${package}'],
|
||||
'static_root': '%(confdir)s/../../public',
|
||||
'template_path': '%(confdir)s/../templates',
|
||||
'debug': True,
|
||||
'errors': {
|
||||
'404': '/error/404',
|
||||
'__force_dict__': True
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class TestRootController(FunctionalTest):
|
||||
assert response.status_int == 200
|
||||
|
||||
def test_search(self):
|
||||
response = self.app.post('/', params={'q' : 'RestController'})
|
||||
response = self.app.post('/', params={'q': 'RestController'})
|
||||
assert response.status_int == 302
|
||||
assert response.headers['Location'] == 'http://pecan.readthedocs.org/en/latest/search.html?q=RestController'
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ app = {
|
||||
|
||||
logging = {
|
||||
'loggers': {
|
||||
'root' : {'level': 'INFO', 'handlers': ['console']},
|
||||
'root': {'level': 'INFO', 'handlers': ['console']},
|
||||
'${package}': {'level': 'DEBUG', 'handlers': ['console']}
|
||||
},
|
||||
'handlers': {
|
||||
|
||||
@@ -7,16 +7,16 @@ except ImportError:
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name = '${package}',
|
||||
version = '0.1',
|
||||
description = '',
|
||||
author = '',
|
||||
author_email = '',
|
||||
install_requires = [
|
||||
name='${package}',
|
||||
version='0.1',
|
||||
description='',
|
||||
author='',
|
||||
author_email='',
|
||||
install_requires=[
|
||||
"pecan",
|
||||
],
|
||||
test_suite = '${package}',
|
||||
zip_safe = False,
|
||||
include_package_data = True,
|
||||
packages = find_packages(exclude=['ez_setup'])
|
||||
test_suite='${package}',
|
||||
zip_safe=False,
|
||||
include_package_data=True,
|
||||
packages=find_packages(exclude=['ez_setup'])
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user