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

Commit

Permalink
CKAN upgrade (~2.8)
Browse files Browse the repository at this point in the history
Merge partial upgrades before archiving
  • Loading branch information
alycejenni committed Nov 26, 2019
2 parents efa5749 + 6a71c92 commit 718f00e
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 38 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: python
python:
- "2.7"
# command to install dependencies
install:
- "pip install -e ."
- "pip install -r requirements.txt"
- "pip install -r dev_requirements.txt"
# command to run tests
script: coverage run --source=ckanext.status setup.py nosetests
after_success: coveralls
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ckanext-feedback
================

[![Travis branch](https://img.shields.io/travis/NaturalHistoryMuseum/ckanext-feedback/master.svg?style=flat-square)](https://travis-ci.org/NaturalHistoryMuseum/ckanext-feedback) [![Coveralls github branch](https://img.shields.io/coveralls/github/NaturalHistoryMuseum/ckanext-feedback/master.svg?style=flat-square)](https://coveralls.io/github/NaturalHistoryMuseum/ckanext-feedback)

Feedback extension for CKAN

This extension provides feedback side bar.
Expand Down
7 changes: 6 additions & 1 deletion ckanext/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# this is a namespace package
#!/usr/bin/env python
# encoding: utf-8
#
# This file is part of ckanext-feedback
# Created by the Natural History Museum in London, UK

try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
Expand Down
7 changes: 6 additions & 1 deletion ckanext/feedback/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# this is a namespace package
#!/usr/bin/env python
# encoding: utf-8
#
# This file is part of ckanext-feedback
# Created by the Natural History Museum in London, UK

try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
Expand Down
28 changes: 17 additions & 11 deletions ckanext/feedback/plugin.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
"""
CKAN Contact Extension
"""
# !/usr/bin/env python
# encoding: utf-8
#
# This file is part of ckanext-feedback
# Created by the Natural History Museum in London, UK

import ckan.plugins as p
from ckan.plugins import SingletonPlugin, implements, interfaces, toolkit

class FeedbackPlugin(p.SingletonPlugin):
"""
CKAN Contact Extension
"""
p.implements(p.IConfigurer)

class FeedbackPlugin(SingletonPlugin):
'''CKAN Contact Extension'''
implements(interfaces.IConfigurer)

## IConfigurer
def update_config(self, config):
p.toolkit.add_template_directory(config, 'theme/templates')
p.toolkit.add_resource('theme/public', 'ckanext-feedback')
'''
:param config:
'''
toolkit.add_template_directory(config, u'theme/templates')
toolkit.add_resource(u'theme/public', u'ckanext-feedback')
4 changes: 2 additions & 2 deletions ckanext/feedback/theme/templates/feedback/bar.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="feedback-bar" data-module="feedback-bar">
<div class="feedback-bar-inner">
<div id="feedback-bar-close" >
<i class="icon-remove-circle"></i>
<i class="fa fa-remove-circle"></i>
</div>

<div class="left">
Expand All @@ -13,7 +13,7 @@
</div>

<div class="right">
<i class="icon-comment"></i>
<i class="fa fa-comment"></i>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSe-YbqogD4nZQUDo8pWuTsZzE8Pi3a9Qq-6_pVuSIfxgtPAAA/viewform" target="_blank">
FEEDBACK
</a>
Expand Down
2 changes: 1 addition & 1 deletion ckanext/feedback/theme/templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block footer %}
{{ super() }}
{% include "feedback/bar.html" %}
{% snippet "feedback/bar.html" %}
{% endblock %}


Expand Down
5 changes: 5 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
nose
mock
httpretty
coveralls
-e git+https://github.com/NaturalHistoryMuseum/ckan.git@ckan-upgrade-2.8.0a#egg=ckan
50 changes: 28 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
from setuptools import setup, find_packages
#!/usr/bin/env python
# encoding: utf-8
#
# This file is part of ckanext-feedback
# Created by the Natural History Museum in London, UK

version = '0.1'
from setuptools import find_packages, setup

version = u'0.2'

setup(
name='ckanext-feedback',
version=version,
description='CKAN Extension providing feedback form',
classifiers=[],
keywords='',
author='Ben Scott',
author_email='ben@benscott.co.uk',
url='',
license='',
packages=find_packages(exclude=['tests']),
namespace_packages=['ckanext', 'ckanext.feedback'],
include_package_data=True,
zip_safe=False,
install_requires=[],
entry_points=\
"""
[ckan.plugins]
feedback=ckanext.feedback.plugin:FeedbackPlugin
""",
)
name=u'ckanext-feedback',
version=version,
description=u'CKAN Extension providing feedback form',
classifiers=[],
keywords=u'',
author=u'Ben Scott',
author_email=u'ben@benscott.co.uk',
url=u'',
license=u'',
packages=find_packages(exclude=[u'tests']),
namespace_packages=[u'ckanext', u'ckanext.feedback'],
include_package_data=True,
zip_safe=False,
install_requires=[],
entry_points= \
u'''
[ckan.plugins]
feedback=ckanext.feedback.plugin:FeedbackPlugin
''',
)

0 comments on commit 718f00e

Please sign in to comment.