forked from ckan/ckanext-archiver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy CKAN extension boiler-plate from core ckan template: paster --pl…
…ugin=ckan create -t ckanext ckanext-archiver
- Loading branch information
David Read
committed
Oct 27, 2015
1 parent
c3a4b81
commit ebca07d
Showing
12 changed files
with
300 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[report] | ||
omit = | ||
*/site-packages/* | ||
*/python?.?/* | ||
ckan/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,52 @@ | ||
*.pyc | ||
*.egg-info | ||
build | ||
*.egg | ||
.DS_Store | ||
*.swp | ||
# archiver settings should not be checked in - only its template | ||
ckanext/archiver/settings.py | ||
*~ | ||
|
||
.DS_Store | ||
# vim | ||
*.sw? | ||
# emacs | ||
*~ | ||
|
||
.ropeproject | ||
node_modules | ||
bower_components | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
sdist/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
env: PGVERSION=9.1 | ||
install: | ||
- bash bin/travis-build.bash | ||
- pip install coveralls | ||
script: sh bin/travis-run.sh | ||
after_success: | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Open Knowledge & Crown Copyright | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include README.rst | ||
recursive-include ckanext/archiver *.html *.json *.js *.less *.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "This is travis-build.bash..." | ||
|
||
echo "Installing the packages that CKAN requires..." | ||
sudo apt-get update -qq | ||
sudo apt-get install postgresql-$PGVERSION solr-jetty libcommons-fileupload-java:amd64=1.2.2-1 | ||
|
||
echo "Installing CKAN and its Python dependencies..." | ||
git clone https://github.com/ckan/ckan | ||
cd ckan | ||
export latest_ckan_release_branch=`git branch --all | grep remotes/origin/release-v | sort -r | sed 's/remotes\/origin\///g' | head -n 1` | ||
echo "CKAN branch: $latest_ckan_release_branch" | ||
git checkout $latest_ckan_release_branch | ||
python setup.py develop | ||
pip install -r requirements.txt --allow-all-external | ||
pip install -r dev-requirements.txt --allow-all-external | ||
cd - | ||
|
||
echo "Creating the PostgreSQL user and database..." | ||
sudo -u postgres psql -c "CREATE USER ckan_default WITH PASSWORD 'pass';" | ||
sudo -u postgres psql -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;' | ||
|
||
echo "Initialising the database..." | ||
cd ckan | ||
paster db init -c test-core.ini | ||
cd - | ||
|
||
echo "Installing ckanext-ckanext-archiver and its requirements..." | ||
python setup.py develop | ||
pip install -r dev-requirements.txt | ||
|
||
echo "Moving test.ini into a subdir..." | ||
mkdir subdir | ||
mv test.ini subdir | ||
|
||
echo "travis-build.bash is done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh -e | ||
|
||
echo "NO_START=0\nJETTY_HOST=127.0.0.1\nJETTY_PORT=8983\nJAVA_HOME=$JAVA_HOME" | sudo tee /etc/default/jetty | ||
sudo cp ckan/ckan/config/solr/schema.xml /etc/solr/conf/schema.xml | ||
sudo service jetty restart | ||
nosetests --nologcapture --with-pylons=subdir/test.ini --with-coverage --cover-package=ckanext.archiver --cover-inclusive --cover-erase --cover-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[extract_messages] | ||
keywords = translate isPlural | ||
add_comments = TRANSLATORS: | ||
output_file = i18n/ckanext-archiver.pot | ||
width = 80 | ||
|
||
[init_catalog] | ||
domain = ckanext-archiver | ||
input_file = i18n/ckanext-archiver.pot | ||
output_dir = i18n | ||
|
||
[update_catalog] | ||
domain = ckanext-archiver | ||
input_file = i18n/ckanext-archiver.pot | ||
output_dir = i18n | ||
previous = true | ||
|
||
[compile_catalog] | ||
domain = ckanext-archiver | ||
directory = i18n | ||
statistics = true |
Oops, something went wrong.