forked from gratipay/gratipay.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gittip.py
executable file
·92 lines (77 loc) · 2.86 KB
/
gittip.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env python
from fabricate import *
sources = ['program', 'util']
def build():
"""
env: env/bin/swaddle
python2.7 ./vendor/virtualenv-1.7.1.2.py \
--unzip-setuptools \
--prompt="[gittip] " \
--never-download \
--extra-search-dir=./vendor/ \
--distribute \
./env/
./env/bin/pip install -r requirements.txt
./env/bin/pip install ./vendor/nose-1.1.2.tar.gz
./env/bin/pip install -e ./
env/bin/swaddle:
python2.7 ./vendor/virtualenv-1.7.1.2.py \
--unzip-setuptools \
--prompt="[gittip] " \
--never-download \
--extra-search-dir=./vendor/ \
--distribute \
./env/
./env/bin/pip install -r requirements.txt
./env/bin/pip install ./vendor/nose-1.1.2.tar.gz
./env/bin/pip install -e ./
clean:
rm -rf env *.egg *.egg-info tests/env
find . -name \*.pyc -delete
local.env:
echo "Creating a local.env file ..."
echo
echo "CANONICAL_HOST=" > local.env
echo "CANONICAL_SCHEME=http" >> local.env
echo "DATABASE_URL=postgres://gittip@localhost/gittip" >> local.env
echo "STRIPE_SECRET_API_KEY=1" >> local.env
echo "STRIPE_PUBLISHABLE_API_KEY=1" >> local.env
echo "BALANCED_API_SECRET=90bb3648ca0a11e1a977026ba7e239a9" >> local.env
echo "GITHUB_CLIENT_ID=3785a9ac30df99feeef5" >> local.env
echo "GITHUB_CLIENT_SECRET=e69825fafa163a0b0b6d2424c107a49333d46985" >> local.env
echo "GITHUB_CALLBACK=http://localhost:8537/on/github/associate" >> local.env
echo "TWITTER_CONSUMER_KEY=QBB9vEhxO4DFiieRF68zTA" >> local.env
echo "TWITTER_CONSUMER_SECRET=mUymh1hVMiQdMQbduQFYRi79EYYVeOZGrhj27H59H78" >> local.env
echo "TWITTER_CALLBACK=http://127.0.0.1:8537/on/twitter/associate" >> local.env
run: env local.env
./env/bin/swaddle local.env ./env/bin/aspen \
--www_root=www/ \
--project_root=.. \
--show_tracebacks=yes \
--changes_reload=yes \
--network_address=:8537
test: env tests/env data
./env/bin/swaddle tests/env ./env/bin/nosetests ./tests/
tests: test
tests/env:
echo "Creating a tests/env file ..."
echo
echo "CANONICAL_HOST=" > tests/env
echo "CANONICAL_SCHEME=http" >> tests/env
echo "DATABASE_URL=postgres://gittip-test@localhost/gittip-test" >> tests/env
echo "STRIPE_SECRET_API_KEY=1" >> tests/env
echo "STRIPE_PUBLISHABLE_API_KEY=1" >> tests/env
echo "BALANCED_API_SECRET=90bb3648ca0a11e1a977026ba7e239a9" >> tests/env
echo "GITHUB_CLIENT_ID=3785a9ac30df99feeef5" >> tests/env
echo "GITHUB_CLIENT_SECRET=e69825fafa163a0b0b6d2424c107a49333d46985" >> tests/env
echo "GITHUB_CALLBACK=http://localhost:8537/on/github/associate" >> tests/env
echo "TWITTER_CONSUMER_KEY=QBB9vEhxO4DFiieRF68zTA" >> tests/env
echo "TWITTER_CONSUMER_SECRET=mUymh1hVMiQdMQbduQFYRi79EYYVeOZGrhj27H59H78" >> tests/env
echo "TWITTER_CALLBACK=http://127.0.0.1:8537/on/twitter/associate" >> tests/env
data: env
./makedb.sh gittip-test gittip-test
./env/bin/swaddle tests/env ./env/bin/python ./gittip/testing.py
"""
def clean():
autoclean()
main()