Merge pull request from sprockets/release-cleanup

Cleanup for release
This commit is contained in:
John Brodie 2014-10-14 13:22:22 -04:00
commit 27ed98f81c
7 changed files with 38 additions and 18 deletions

View file

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

View file

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

View file

@ -1,10 +1,24 @@
Examples 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 .. 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 Version History
--------------- ---------------
- 0.0.0 [YYYY-MM-DD] - 0.1.0 [2014-10-14]
- Change 1 - Initial release
- Change 2

View file

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

View file

@ -1 +1 @@
sprockets<2 tornado

View file

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