Permalink
Browse files

Merge pull request #19 from caulagi/hasjob-travis

Integrate with travis and other changes.
  • Loading branch information...
2 parents 4634598 + 476c003 commit 63fbc6e432fcc2b86a0d1b8a0e1e537711a743d0 @jace jace committed May 2, 2012
Showing with 37 additions and 23 deletions.
  1. +1 −0 .gitignore
  2. +5 −0 .travis.yml
  3. +1 −1 assets.py
  4. +1 −1 models.py
  5. +5 −4 requirements.txt
  6. +1 −1 search.py
  7. +19 −16 website.py
  8. +4 −0 website.wsgi
View
@@ -8,3 +8,4 @@ test.db
.settings
.sass-cache
error.log
+.coverage
View
@@ -0,0 +1,5 @@
+language: python
+python:
+ - 2.7
+script:
+ - nosetests --with-coverage --cover-package=admin,app,assets,forms,get-twitter,loghandler,models,search,twitter,uploads,utils,views,website
View
@@ -1,4 +1,4 @@
-from flaskext.assets import Environment, Bundle
+from flask.ext.assets import Environment, Bundle
from app import app
assets = Environment(app)
View
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta
-from flaskext.sqlalchemy import SQLAlchemy
+from flask.ext.sqlalchemy import SQLAlchemy
from app import app
from utils import random_long_key, random_hash_key, newid
View
@@ -1,9 +1,9 @@
-Flask
-Flask-SQLAlchemy
-Flask-WTF
-Flask-Uploads
+Flask==0.8
+Flask-SQLAlchemy==0.16
+Flask-WTF==0.5.4
Flask-Mail
Flask-Assets
+Flask-Uploads
BeautifulSoup
PIL
pytz
@@ -13,3 +13,4 @@ bitlyapi
whoosh
twill
Flask-Testing
+coverage
View
@@ -1,5 +1,5 @@
import os.path
-from flaskext.sqlalchemy import models_committed
+from flask.ext.sqlalchemy import models_committed
from whoosh import fields, index
from whoosh.qparser import QueryParser
from whoosh.analysis import StemmingAnalyzer
View
@@ -16,26 +16,29 @@
print >> sys.stderr, "Please create a settings.py with the necessary settings. See settings-sample.py."
print >> sys.stderr, "You may use the site without these settings, but some features may not work."
-uploads.configure()
-search.configure()
-views.mail.init_app(app)
+def configure():
+ uploads.configure()
+ search.configure()
+ views.mail.init_app(app)
-log_formatter = loghandler.LocalVarFormatter()
-file_handler = logging.FileHandler(app.config['LOGFILE'])
-file_handler.setFormatter(log_formatter)
-file_handler.setLevel(logging.WARNING)
-app.logger.addHandler(file_handler)
-if app.config['ADMINS']:
- mail_handler = logging.handlers.SMTPHandler(app.config['MAIL_SERVER'],
- app.config['DEFAULT_MAIL_SENDER'][1],
- app.config['ADMINS'],
- 'hasgeek-jobs failure',
- credentials = (app.config['MAIL_USERNAME'], app.config['MAIL_PASSWORD']))
- mail_handler.setLevel(logging.ERROR)
- app.logger.addHandler(mail_handler)
+ log_formatter = loghandler.LocalVarFormatter()
+ file_handler = logging.FileHandler(app.config['LOGFILE'])
+ file_handler.setFormatter(log_formatter)
+ file_handler.setLevel(logging.WARNING)
+ app.logger.addHandler(file_handler)
+ if app.config['ADMINS']:
+ mail_handler = logging.handlers.SMTPHandler(app.config['MAIL_SERVER'],
+ app.config['DEFAULT_MAIL_SENDER'][1],
+ app.config['ADMINS'],
+ 'hasgeek-jobs failure',
+ credentials = (app.config['MAIL_USERNAME'], app.config['MAIL_PASSWORD']))
+ mail_handler.setLevel(logging.ERROR)
+ app.logger.addHandler(mail_handler)
if __name__ == '__main__':
+ configure()
+
import sys
# Create database table
db.create_all()
View
@@ -1,4 +1,8 @@
import sys
import os.path
sys.path.insert(0, os.path.dirname(__file__))
+
from website import app as application
+
+import website
+website.configure()

0 comments on commit 63fbc6e

Please sign in to comment.