mirror of
https://github.com/sprockets/sprockets.handlers.heartbeat.git
synced 2024-11-21 19:28:39 +00:00
initial commit
This commit is contained in:
commit
21a3d024c1
19 changed files with 393 additions and 0 deletions
59
.gitignore
vendored
Normal file
59
.gitignore
vendored
Normal file
|
@ -0,0 +1,59 @@
|
|||
# Editor
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
env/
|
||||
bin/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
||||
# Mr Developer
|
||||
.mr.developer.cfg
|
||||
.project
|
||||
.pydevproject
|
||||
|
||||
# Rope
|
||||
.ropeproject
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
*.pot
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
|
26
.travis.yml
Normal file
26
.travis.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
%YAML 1.1
|
||||
---
|
||||
language: python
|
||||
python:
|
||||
- 2.6
|
||||
- 2.7
|
||||
- pypy
|
||||
- 3.2
|
||||
- 3.3
|
||||
- 3.4
|
||||
install:
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi
|
||||
- pip install -r test-requirements.txt
|
||||
- pip install -e .
|
||||
script: nosetests
|
||||
after_success:
|
||||
- coveralls
|
||||
deploy:
|
||||
provider: pypi
|
||||
user: sprockets
|
||||
on:
|
||||
python: 2.7
|
||||
tags: true
|
||||
all_branches: true
|
||||
password:
|
||||
secure: [REPLACE-ME]
|
25
LICENSE
Normal file
25
LICENSE
Normal file
|
@ -0,0 +1,25 @@
|
|||
Copyright (c) 2014 AWeber Communications
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of Sprockets nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
7
MANIFEST.in
Normal file
7
MANIFEST.in
Normal file
|
@ -0,0 +1,7 @@
|
|||
include LICENSE
|
||||
include README.rst
|
||||
include *requirements.txt
|
||||
graft docs
|
||||
graft tests.py
|
||||
global-exclude __pycache__
|
||||
global-exclude *.pyc
|
51
README.rst
Normal file
51
README.rst
Normal file
|
@ -0,0 +1,51 @@
|
|||
sprockets.handlers.heartbeat
|
||||
============================
|
||||
A callback-based heartbeat handler
|
||||
|
||||
|Version| |Downloads| |Status| |Coverage| |License|
|
||||
|
||||
Installation
|
||||
------------
|
||||
``sprockets.handlers.heartbeat`` is available on the
|
||||
`Python Package Index <https://pypi.python.org/pypi/sprockets.handlers.heartbeat>`_
|
||||
and can be installed via ``pip`` or ``easy_install``:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
pip install sprockets.handlers.heartbeat
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
https://sprocketshandlersheartbeat.readthedocs.org
|
||||
|
||||
Requirements
|
||||
------------
|
||||
- `sprockets <https://github.com/sprockets/sprockets>`_
|
||||
|
||||
Example
|
||||
-------
|
||||
This examples demonstrates how to use ``sprockets.handlers.heartbeat`` by ...
|
||||
.. code:: python
|
||||
|
||||
from sprockets import handlers.heartbeat
|
||||
|
||||
# Example here
|
||||
|
||||
Version History
|
||||
---------------
|
||||
Available at https://sprocketshandlersheartbeat.readthedocs.org/en/latest/history.html
|
||||
|
||||
.. |Version| image:: https://badge.fury.io/py/sprockets.handlers.heartbeat.svg?
|
||||
:target: http://badge.fury.io/py/sprockets.handlers.heartbeat
|
||||
|
||||
.. |Status| image:: https://travis-ci.org/sprockets/sprockets.handlers.heartbeat.svg?branch=master
|
||||
:target: https://travis-ci.org/sprockets/sprockets.handlers.heartbeat
|
||||
|
||||
.. |Coverage| image:: https://img.shields.io/coveralls/sprockets/sprockets.handlers.heartbeat.svg?
|
||||
:target: https://coveralls.io/r/sprockets/sprockets.handlers.heartbeat
|
||||
|
||||
.. |Downloads| image:: https://pypip.in/d/sprockets.handlers.heartbeat/badge.svg?
|
||||
:target: https://pypi.python.org/pypi/sprockets.handlers.heartbeat
|
||||
|
||||
.. |License| image:: https://pypip.in/license/sprockets.handlers.heartbeat/badge.svg?
|
||||
:target: https://sprocketshandlersheartbeat.readthedocs.org
|
6
dev-requirements.txt
Normal file
6
dev-requirements.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
-r requirements.txt
|
||||
-r test-requirements.txt
|
||||
flake8>=2.1,<3
|
||||
sphinx>=1.2,<2
|
||||
sphinx-rtd-theme>=0.1,<1.0
|
||||
sphinxcontrib-httpdomain>=1.2,<2
|
2
docs/api.rst
Normal file
2
docs/api.rst
Normal file
|
@ -0,0 +1,2 @@
|
|||
.. automodule:: sprockets.handlers.heartbeat
|
||||
:members:
|
29
docs/conf.py
Normal file
29
docs/conf.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env python
|
||||
import sphinx_rtd_theme
|
||||
|
||||
from sprockets.handlers.heartbeat import version_info, __version__
|
||||
|
||||
needs_sphinx = '1.0'
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinxcontrib.httpdomain',
|
||||
]
|
||||
templates_path = []
|
||||
source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
project = 'sprockets.handlers.heartbeat'
|
||||
copyright = '2014, AWeber Communications'
|
||||
version = '.'.join(__version__.split('.')[0:1])
|
||||
release = __version__
|
||||
if len(version_info) > 3:
|
||||
release += '-{0}'.format(str(v) for v in version_info[3:])
|
||||
exclude_patterns = []
|
||||
pygments_style = 'sphinx'
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
intersphinx_mapping = {
|
||||
'python': ('https://docs.python.org/', None),
|
||||
'requests': ('https://requests.readthedocs.org/en/latest/', None),
|
||||
'sprockets': ('https://sprockets.readthedocs.org/en/latest/', None),
|
||||
}
|
10
docs/examples.rst
Normal file
10
docs/examples.rst
Normal file
|
@ -0,0 +1,10 @@
|
|||
Examples
|
||||
========
|
||||
The following example ...
|
||||
|
||||
.. code:: python
|
||||
|
||||
from sprockets import handlers.heartbeat
|
||||
|
||||
class Foo(object):
|
||||
pass
|
5
docs/history.rst
Normal file
5
docs/history.rst
Normal file
|
@ -0,0 +1,5 @@
|
|||
Version History
|
||||
---------------
|
||||
- 0.0.0 [YYYY-MM-DD]
|
||||
- Change 1
|
||||
- Change 2
|
66
docs/index.rst
Normal file
66
docs/index.rst
Normal file
|
@ -0,0 +1,66 @@
|
|||
sprockets.handlers.heartbeat
|
||||
============================
|
||||
A callback-based heartbeat handler
|
||||
|
||||
|Version| |Downloads| |Status| |Coverage| |License|
|
||||
|
||||
Installation
|
||||
------------
|
||||
``sprockets.handlers.heartbeat`` is available on the
|
||||
`Python Package Index <https://pypi.python.org/pypi/sprockets.handlers.heartbeat>`_
|
||||
and can be installed via ``pip`` or ``easy_install``:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
pip install sprockets.handlers.heartbeat
|
||||
|
||||
Requirements
|
||||
------------
|
||||
@TODO: Put full requirements list here, should match requirements.txt
|
||||
- `sprockets <https://github.com/sprockets/sprockets>`_
|
||||
|
||||
API Documentation
|
||||
-----------------
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
api
|
||||
examples
|
||||
|
||||
Version History
|
||||
---------------
|
||||
See :doc:`history`
|
||||
|
||||
Issues
|
||||
------
|
||||
Please report any issues to the Github project at `https://github.com/sprockets/sprockets.handlers.heartbeat/issues <https://github.com/sprockets/sprockets.handlers.heartbeat/issues>`_
|
||||
|
||||
Source
|
||||
------
|
||||
``sprockets.handlers.heartbeat`` source is available on Github at `https://github.com/sprockets/sprockets.handlers.heartbeat <https://github.com/sprockets/sprockets.handlers.heartbeat>`_
|
||||
|
||||
License
|
||||
-------
|
||||
``sprockets.handlers.heartbeat`` is released under the `3-Clause BSD license <https://github.com/sprockets/sprockets.handlers.heartbeat/blob/master/LICENSE>`_.
|
||||
|
||||
Indices and tables
|
||||
------------------
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
||||
.. |Version| image:: https://badge.fury.io/py/sprockets.handlers.heartbeat.svg?
|
||||
:target: http://badge.fury.io/py/sprockets.handlers.heartbeat
|
||||
|
||||
.. |Status| image:: https://travis-ci.org/sprockets/sprockets.handlers.heartbeat.svg?branch=master
|
||||
:target: https://travis-ci.org/sprockets/sprockets.handlers.heartbeat
|
||||
|
||||
.. |Coverage| image:: https://img.shields.io/coveralls/sprockets/sprockets.handlers.heartbeat.svg?
|
||||
:target: https://coveralls.io/r/sprockets/sprockets.handlers.heartbeat
|
||||
|
||||
.. |Downloads| image:: https://pypip.in/d/sprockets.handlers.heartbeat/badge.svg?
|
||||
:target: https://pypi.python.org/pypi/sprockets.handlers.heartbeat
|
||||
|
||||
.. |License| image:: https://pypip.in/license/sprockets.handlers.heartbeat/badge.svg?
|
||||
:target: https://sprocketshandlersheartbeat.readthedocs.org
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
|
@ -0,0 +1 @@
|
|||
sprockets<2
|
12
setup.cfg
Normal file
12
setup.cfg
Normal file
|
@ -0,0 +1,12 @@
|
|||
[build_sphinx]
|
||||
all-files = 1
|
||||
source-dir = docs
|
||||
build-dir = build/docs
|
||||
|
||||
[nosetests]
|
||||
with-coverage = 1
|
||||
cover-package = sprockets.handlers.heartbeat
|
||||
verbose = 1
|
||||
|
||||
[flake8]
|
||||
exclude = build,dist,docs,env
|
68
setup.py
Normal file
68
setup.py
Normal file
|
@ -0,0 +1,68 @@
|
|||
import codecs
|
||||
import sys
|
||||
|
||||
import setuptools
|
||||
|
||||
|
||||
def read_requirements_file(req_name):
|
||||
requirements = []
|
||||
try:
|
||||
with codecs.open(req_name, encoding='utf-8') as req_file:
|
||||
for req_line in req_file:
|
||||
if '#' in req_line:
|
||||
req_line = req_line[0:req_line.find('#')].strip()
|
||||
if req_line:
|
||||
requirements.append(req_line.strip())
|
||||
except IOError:
|
||||
pass
|
||||
return requirements
|
||||
|
||||
|
||||
install_requires = read_requirements_file('requirements.txt')
|
||||
setup_requires = read_requirements_file('setup-requirements.txt')
|
||||
tests_require = read_requirements_file('test-requirements.txt')
|
||||
|
||||
if sys.version_info < (2, 7):
|
||||
tests_require.append('unittest2')
|
||||
if sys.version_info < (3, 0):
|
||||
tests_require.append('mock')
|
||||
|
||||
setuptools.setup(
|
||||
name='sprockets.handlers.heartbeat',
|
||||
version='0.0.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',
|
||||
author='AWeber Communications',
|
||||
author_email='api@aweber.com',
|
||||
license=codecs.open('LICENSE', encoding='utf-8').read(),
|
||||
classifiers=[
|
||||
'Development Status :: 4 - Beta',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Natural Language :: English',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.2',
|
||||
'Programming Language :: Python :: 3.3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: Implementation :: CPython',
|
||||
'Programming Language :: Python :: Implementation :: PyPy',
|
||||
'Topic :: Software Development :: Libraries',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules'
|
||||
],
|
||||
packages=['sprockets',
|
||||
'sprockets.handlers',
|
||||
'sprockets.handlers.heartbeat'],
|
||||
package_data={'': ['LICENSE', 'README.md']},
|
||||
include_package_data=True,
|
||||
namespace_packages=['sprockets',
|
||||
'sprockets.handlers'],
|
||||
install_requires=install_requires,
|
||||
setup_requires=setup_requires,
|
||||
tests_require=tests_require,
|
||||
test_suite='nose.collector',
|
||||
zip_safe=False)
|
1
sprockets/__init__.py
Normal file
1
sprockets/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
__import__('pkg_resources').declare_namespace(__name__)
|
1
sprockets/handlers/__init__.py
Normal file
1
sprockets/handlers/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
__import__('pkg_resources').declare_namespace(__name__)
|
8
sprockets/handlers/heartbeat/__init__.py
Normal file
8
sprockets/handlers/heartbeat/__init__.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
"""
|
||||
handlers.heartbeat
|
||||
|
||||
A callback-based heartbeat handler
|
||||
|
||||
"""
|
||||
version_info = (0, 0, 0)
|
||||
__version__ = '.'.join(str(v) for v in version_info)
|
3
test-requirements.txt
Normal file
3
test-requirements.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
coverage>=3.7,<4
|
||||
coveralls>=0.4,<1
|
||||
nose>=1.3,<2
|
13
tests.py
Normal file
13
tests.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
"""
|
||||
Tests for the sprockets.handlers.heartbeat package
|
||||
|
||||
"""
|
||||
import mock
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
|
||||
|
||||
class MyTest(unittest.TestCase):
|
||||
pass
|
Loading…
Reference in a new issue