Skip to content

Commit

Permalink
fix issues with travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
aheadley committed Jan 15, 2013
1 parent e5c28c5 commit a2d397d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ php:
- 5.3
- 5.4

install:
- sudo apt-get install -qq python-markdown libxml-xpath-perl

script:
- make connect-pkg
- make all
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ SHELL := /bin/bash
.PHONY: connect-desc connect-pkg all clean

connect-desc:
markdown2 README.md > build/magento-connect-desc-$(shell ./util/get-version.sh).html
markdown_py -o html5 -f "build/magento-connect-desc-$(shell ./util/get-version.sh).html" README.md

connect-changelog:
markdown2 CHANGELOG.md > build/magento-connect-changelog-$(shell ./util/get-version.sh).html
markdown_py -o html5 -f "build/magento-connect-changelog-$(shell ./util/get-version.sh).html" CHANGELOG.md

connect-pkg:
./build/build_package.py -d build/mage-package.xml
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Nexcess.net Turpentine Extension for Magento

[![Build Status](https://travis-ci.org/nexcess/magento-turpentine.png)](https://travis-ci.org/nexcess/magento-turpentine)

Turpentine is a Magento extension to improve Magento's compatibility with
[Varnish](https://www.varnish-cache.org/), a very-fast caching reverse-proxy. By
default, Varnish doesn't cache requests with cookies and Magento sends the
Expand All @@ -18,7 +20,7 @@ to how it works).
- Requires very little configuration for impressive results
- Able to apply new Varnish VCLs (configurations) on the fly, without
restarting/changing Varnish's config files or flushing the cache
- Exclude URL paths, request parameters (__SID, __store, etc) from caching
- Exclude URL paths, request parameters (SID, store, etc) from caching
- Configure cache TTL by URL and individual block's TTL
- Ability to force static asset (css, js, etc) caching
- Supports multiple Varnish instances for clustered usage
Expand Down Expand Up @@ -90,9 +92,9 @@ the page and may differ between different visitors/clients.
the cache).
- **Varnish 2.1 Caveats**: Due to technical limitations, some features are not
available when using Varnish 2.1:
- TTL extension on cache hits does not work
- External ESI requests are not blocked
- Per-block TTLs are not honored, all ESI blocks use their default TTL
- TTL extension on cache hits does not work
- External ESI requests are not blocked
- Per-block TTLs are not honored, all ESI blocks use their default TTL

## Known Issues

Expand Down
8 changes: 7 additions & 1 deletion util/get-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ BASE_DIR="$(dirname "$(dirname "$(readlink -f "$0")")")"
XML_PATH_VERSION='/config/modules/Nexcessnet_Turpentine/version/text()'
CONFIG_XML_PATH='app/code/community/Nexcessnet/Turpentine/etc/config.xml'

echo "$(xpath "$XML_PATH_VERSION" \
if [ -f /etc/redhat-release ]; then
XPATH_BIN="xpath"
else
XPATH_BIN="xpath -e"
fi

echo "$($XPATH_BIN "$XML_PATH_VERSION" \
< "${BASE_DIR}/${CONFIG_XML_PATH}" \
2> /dev/null)"
8 changes: 7 additions & 1 deletion util/warm-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
SITEMAP_URL="$1"
TMP_URL_FILE="/tmp/$(cat /proc/sys/kernel/random/uuid).txt"

if [ -f /etc/redhat-release ]; then
XPATH_BIN="xpath"
else
XPATH_BIN="xpath -e"
fi

if [ -z "$1" ]; then
echo "Need to give me the site's sitemap URL!"
exit 1
fi

curl -ks "$SITEMAP_URL" | \
xpath /dev/stdin '/urlset/url/loc/text()' 2>/dev/null | \
$XPATH_BIN '/urlset/url/loc/text()' 2>/dev/null | \
sed -r 's~http(s)?:~\nhttp\1:~g' > "$TMP_URL_FILE"

siege -b -v -c 1 -r once -f "$TMP_URL_FILE"
Expand Down

0 comments on commit a2d397d

Please sign in to comment.