Skip to content

Commit

Permalink
Fix missing requirement for Flask-HTTPAuth (fixes #72)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Knupp committed Apr 21, 2014
1 parent d8b6d44 commit b833de1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ Questions or comments about `sandman`? Hit me up at [[email protected]](mailto:

# Changelog

## Version 0.9.4

* Fixes a critical bug in the requirements portion of `setup.py`, adding `Flask-HTTPAuth`

## Version 0.9.3

* Authentication supported!
Expand Down
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ [email protected].
Changelog
=========

Version 0.9.4
-------------

- Fixes a critical bug in the requirements portion of ``setup.py``,
adding ``Flask-HTTPAuth``

Version 0.9.3
-------------

Expand Down
20 changes: 15 additions & 5 deletions sandman/sandmanctl.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Script to run sandman via command line
Usage:
sandmanctl.py URI [--show-pks --generate-pks] [--host=host] [--port=port]
sandmanctl.py URI [--show-pks --generate-pks] [--host=host] [--port=port] [--version]
sandmanctl.py --version
Start sandman and connect to database at URI
Expand All @@ -27,14 +28,15 @@
Options:
-h --help Show this screen.
-s --show-primary-keys Display primary key columns in the admin
-s --show-primary-keys Display primary key columns in the admin
interface
-g --generate-pks Use the combination of all columns as the
primary key for tables without primary keys
(primary keys are required by the mapping
engine). Implies --primary-keys
--host=host Host to run sandmanctl on
--port=port Port to run sandmanctl on
-v --version Display current version of sandman and exit
--host <host> Host to run sandmanctl on
--port <port> Port to run sandmanctl on
'postgresql+psycopg2://scott:tiger@localhost/test'
'postgresql+psycopg2://scott:tiger@localhost/test' --generate-pks --host localhost --port 8080
Expand All @@ -43,6 +45,7 @@
"""
from __future__ import absolute_import
import sys

from docopt import docopt

Expand All @@ -51,7 +54,14 @@

def main(test_options=None):
"""Main entry point for script."""
options = test_options or docopt(__doc__)
import pkg_resources
version = None
try:
version = pkg_resources.get_distribution('sandman').version
finally:
del pkg_resources

options = test_options or docopt(__doc__, version=version)
URI = options['URI']
app.config['SQLALCHEMY_DATABASE_URI'] = options['URI']
app.config['SANDMAN_GENERATE_PKS'] = options['--generate-pks'] or False
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def run_tests(self):
'Flask-SQLAlchemy>=1.0',
'SQLAlchemy>=0.8.2',
'Flask-Admin>=1.0.6',
'Flask-HTTPAuth>=2.2.1',
'docopt>=0.6.1',
],
cmdclass={'test': PyTest},
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ deps =
pytest
flask-sqlalchemy
flask-admin
Flask-HTTPAuth

0 comments on commit b833de1

Please sign in to comment.