Cleanup for release

- Update .travis.yml with pypi password
- Update example in documentation and README
- Add information in the history.rst file
- Update the requirements, removing sprockets and adding tornado
- Set the version in setup.py
This commit is contained in:
Gavin M. Roy 2014-10-14 12:16:12 -04:00
parent 542753eb30
commit 8bb37d30ed
7 changed files with 38 additions and 18 deletions

View file

@ -23,4 +23,4 @@ deploy:
tags: true
all_branches: true
password:
secure: [REPLACE-ME]
secure: "iznyfbrIbZXOVWiGjroqExbpA9wFNgy3OEuyhT0r4nyYaLqAsbHxQFop6EqO7zt0laWiE1Cj0tpQSud6rf+Et1zN9j5Xcc0ftpZWuweVFM2zgULiZIWocG4MhwFPf+DuaGhunsrLcPhxA99Jzi/OxlOdgiGDYFviRAqy4V8GsH4="

View file

@ -20,25 +20,33 @@ https://sprocketshandlersheartbeat.readthedocs.org
Requirements
------------
- `sprockets <https://github.com/sprockets/sprockets>`_
- `tornado <https://github.com/tornadoweb/tornado>`_
Example
-------
This examples demonstrates how to use ``sprockets.handlers.heartbeat`` by ...
This examples demonstrates how to use ``sprockets.handlers.heartbeat`` by
registering the ``check_database`` method that is invoked each time a request
to ``/heartbeat`` is made.
.. code:: python
from sprockets.handlers import heartbeat
from tornado import web
from sprockets.handlers import heartbeat
def check_database():
# Verify connectivity to our database
return is_database_up() # Return True/False
"""Any check method should return a bool specifying the check is ok.
:rtype: bool
"""
return True
# Register the check method
heartbeat.register_callback(check_database)
app = web.Application([(r'/heartbeat', heartbeat.HeartbeatHandler)])
# Create a Tornado application
app = web.Application([('/heartbeat', heartbeat.HeartbeatHandler)])
Version History
---------------

View file

@ -1,10 +1,24 @@
Examples
========
The following example ...
The following example demonstrates how to create a method that is invoked on
each call to ``/heartbeat`` in a web application.
.. code:: python
from sprockets import handlers.heartbeat
from sprockets.handlers import heartbeat
from tornado import web
class Foo(object):
pass
def check_database():
"""Any check method should return a bool specifying the check is ok.
:rtype: bool
"""
return True
# Register the check method
heartbeat.register_callback(check_database)
# Create a Tornado application
app = web.Application([('/heartbeat', heartbeat.HeartbeatHandler)])

View file

@ -1,5 +1,4 @@
Version History
---------------
- 0.0.0 [YYYY-MM-DD]
- Change 1
- Change 2
- 0.1.0 [2014-10-14]
- Initial release

View file

@ -16,8 +16,7 @@ and can be installed via ``pip`` or ``easy_install``:
Requirements
------------
@TODO: Put full requirements list here, should match requirements.txt
- `sprockets <https://github.com/sprockets/sprockets>`_
- `tornado <https://github.com/tornadoweb/tornado>`_
API Documentation
-----------------

View file

@ -1 +1 @@
sprockets<2
tornado

View file

@ -29,7 +29,7 @@ if sys.version_info < (3, 0):
setuptools.setup(
name='sprockets.handlers.heartbeat',
version='0.0.0',
version='0.1.0',
description='A callback-based heartbeat handler',
long_description=codecs.open('README.rst', encoding='utf-8').read(),
url='https://github.com/sprockets/sprockets.handlers.heartbeat.git',