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
import json | |
from urllib import urlencode | |
from urllib2 import urlopen | |
from urlparse import parse_qsl | |
import oauth2 as oauth | |
ACCESS_TOKEN_URL = 'http://www.tumblr.com/oauth/access_token' | |
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
import time, re | |
from noseselenium.cases import SeleniumTestCaseMixin | |
from django.test import TestCase | |
class sample_test(TestCase, SeleniumTestCaseMixin): | |
def setUp(self): | |
self.verificationErrors = [] | |
def test_sample_test(self): | |
sel = self.selenium |
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
source ~/Envs/user/bin/activate | |
cd ~/staging/$BUILD_TAG/ | |
echo "Updating symlink and deploying." | |
ln -fns ~/staging/$BUILD_TAG ~/staging/makahiki | |
touch ~/staging/makahiki/deploy/pinax.wsgi |
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
source ~/Envs/user/bin/activate | |
cd ~/staging/$BUILD_TAG/ | |
echo "Updating requirements and migrating database." | |
pip install -r requirements.pip -q; | |
python manage.py syncdb | |
python manage.py migrate |
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
echo "Setting up environment." | |
source ~/Envs/user/bin/activate | |
rm -rf ~/staging/$BUILD_TAG/.env | |
echo "Linking settings, db, and files from current." | |
cp ~/staging/local_settings.py ~/staging/$BUILD_TAG/ | |
cd ~/staging/$BUILD_TAG/ | |
rm -rf site_media | |
ln -s ~/staging/site_media site_media |
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
source .env/bin/activate; | |
echo "Copying to staging." | |
# Create new folder | |
mkdir ~/staging/$BUILD_TAG | |
# Copy files over. | |
cp -R . ~/staging/$BUILD_TAG/ |
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
source .env/bin/activate; | |
# Clean files to prep for copy | |
echo "Cleaning local compiled files." | |
./manage.py clean_pyc |
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
source .env/bin/activate; | |
coverage erase | |
coverage run --source="apps/,apps/" manage.py test --with-xunit --exe | |
# generate an xml coverage report | |
coverage xml -o coverage.xml | |
# generate html coverage reports | |
coverage html -d ../../builds/${BUILD_ID}/coverage_html |
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
source .env/bin/activate; | |
rm local_settings.py | |
# rename hudson specific file | |
cp example_settings/local_settings.py.test local_settings.py | |
echo "local_settings.py replaced with hudson version" |
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
source .env/bin/activate; | |
echo "**> Updating requirements." | |
pip install -r requirements.pip -q; |