From 57fe9515db9fe73c6e9084563aeaea299794bd3c Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Wed, 29 Jan 2014 17:23:19 -0800 Subject: [PATCH] - support for running uwsgi with virtualenv - text changes in banner - some info about testing in README --- README.md | 9 +++++++++ run.sh | 24 +++++++++++++++--------- static/wb.js | 2 +- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 66790d2d..9424ca9b 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,15 @@ If everything worked, the following pages should be loading (served from *sample | `http://example.com` | [http://localhost:8080/pywb/example.com](http://localhost:8080/pywb/example.com) | [http://localhost:8080/pywb/*/example.com](http://localhost:8080/pywb/*/example.com) | | `http://iana.org` | [http://localhost:8080/pywb/iana.org](http://localhost:8080/pywb/iana.org) | [http://localhost:8080/pywb/*/iana.org](http://localhost:8080/pywb/*/iana.org) | +### Automated Tests + +Currently pywb consists of numerous doctests against the sample archive. +Additional testing is in the works. + +The current set of tests can be run with Nose: + +`nosetests --with-doctest` + ### Sample Setup diff --git a/run.sh b/run.sh index c7f834f4..ec2d1206 100755 --- a/run.sh +++ b/run.sh @@ -15,22 +15,28 @@ app="pywb.wbapp" params="--static-map /static=$mypath/static --http-socket :8080 -b 65536" if [ -z "$1" ]; then - # Standard root config - params="$params --wsgi pywb.wbapp" + # Standard root config + params="$params --wsgi pywb.wbapp" else - # run with --mount - # requires a file not a package, so creating a mount_run.py to load the package - echo "#!/bin/python\n" > $mypath/mount_run.py - echo "import $app\napplication = $app.application" >> $mypath/mount_run.py - params="$params --mount $1=mount_run.py --no-default-app --manage-script-name" + # run with --mount + # requires a file not a package, so creating a mount_run.py to load the package + echo "#!/bin/python\n" > $mypath/mount_run.py + echo "import $app\napplication = $app.application" >> $mypath/mount_run.py + params="$params --mount $1=mount_run.py --no-default-app --manage-script-name" fi +# Support for virtualenv +if [ -n "$VIRTUAL_ENV" ] ; then + params="$params -H $VIRTUAL_ENV" +fi + +# Support for default, non-virtualenv path on OS X osx_uwsgi_path="/System/Library/Frameworks/Python.framework/Versions/2.7/bin/uwsgi" if [ -e "$osx_uwsgi_path" ]; then - uwsgi=$osx_uwsgi_path + uwsgi=$osx_uwsgi_path else - uwsgi="uwsgi" + uwsgi="uwsgi" fi $uwsgi $params diff --git a/static/wb.js b/static/wb.js index eea2b316..a7b39370 100644 --- a/static/wb.js +++ b/static/wb.js @@ -25,7 +25,7 @@ function initBanner() banner.setAttribute("id", BANNER_ID); banner.setAttribute("lang", "en"); - text = "Archived Content"; + text = "This is an archived page "; if (wbinfo && wbinfo.capture_str) { text += " from " + wbinfo.capture_str + ""; }