Skip to content
This repository has been archived by the owner on Feb 9, 2019. It is now read-only.

Commit

Permalink
Add kinto-webpush plugin version in the capability.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Jul 27, 2016
1 parent 2e0ecb2 commit d31ba6b
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Changelog
=========


0.1.0 (unreleased)
------------------

- Initial code.
- Add the plugin capability.
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include CHANGELOG.rst
include LICENSE
include README.rst

recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $(INSTALL_STAMP): $(PYTHON) setup.py

install-dev: $(INSTALL_STAMP) $(DEV_STAMP)
$(DEV_STAMP): $(PYTHON) dev-requirements.txt
$(VENV)/bin/pip install -U pip
$(VENV)/bin/pip install -r dev-requirements.txt
touch $(DEV_STAMP)

Expand Down
8 changes: 7 additions & 1 deletion kinto_webpush/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import pkg_resources

#: Module version, as defined in PEP-0396.
__version__ = pkg_resources.get_distribution(__package__).version


def includeme(config):
# settings = config.get_settings()

# Expose the capabilities in the root endpoint.
message = "Register your WebPush endpoint to get notified on updates."
docs = "https://github.com/Kinto/kinto-webpush"
config.add_api_capability("webpush", message, docs)
config.add_api_capability("webpush", message, docs, version=__version__)
config.scan('kinto_webpush.views')
4 changes: 2 additions & 2 deletions kinto_webpush/tests/test_plugin_setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

from kinto.tests.core.support import unittest

from kinto_webpush import __version__ as webpush_version
from . import BaseWebTest


Expand All @@ -13,6 +13,6 @@ def test_capability_is_exposed(self):
"description": ("Register your WebPush endpoint "
"to get notified on updates."),
"url": "https://github.com/Kinto/kinto-webpush",

"version": webpush_version
}
self.assertEqual(expected, capabilities["webpush"])
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@
with codecs.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
README = f.read()

with codecs.open(os.path.join(here, 'CHANGELOG.rst'), encoding='utf-8') as f:
CHANGELOG = f.read()


REQUIREMENTS = [
'kinto',
]

setup(name='kinto-webpush',
version='0.0.1',
description='Kinto WebPush',
long_description=README,
long_description=README + '\n\n' + CHANGELOG,
license='Apache License (2.0)',
classifiers=[
"Programming Language :: Python",
Expand Down

0 comments on commit d31ba6b

Please sign in to comment.